-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome extensions support #534
base: main
Are you sure you want to change the base?
Chrome extensions support #534
Conversation
add: better id constraints
…rough the ScanInput so no need for this.
Hey @erikvarga I still have a test failing in windows
this is the patch that fixes it diff --git a/extractor/filesystem/misc/chrome/extensions/extensions.go b/extractor/filesystem/misc/chrome/extensions/extensions.go
index a910b29..7aa0ac7 100644
--- a/extractor/filesystem/misc/chrome/extensions/extensions.go
+++ b/extractor/filesystem/misc/chrome/extensions/extensions.go
@@ -180,6 +180,7 @@ func extractExtensionsIDFromPath(input *filesystem.ScanInput) (string, error) {
// following manifest.json v3 specification
func extractLocaleInfo(m *manifest, input *filesystem.ScanInput) error {
messagePath := filepath.Join(filepath.Dir(input.Path), "_locales", m.DefaultLocale, "message.json")
+ messagePath = filepath.ToSlash(messagePath)
f, err := input.FS.Open(messagePath)
if err != nil { which to me seems kinda odd, do you have any idea why using |
I think the issue is that the fs.FS interface expects all paths to be normalized to use forward slashes. On Windows iflepath.Join would add backwards slashes which is not what fs.FS expects. So you can either concatenate the paths with "/" directly or call filepth.ToSlash as you do there. |
Extraction of chrome extensions support for
scalibr
Resources:
Notes:
I used
runtime.GOOS
to detect the operating system where scalibr is running. This approach works when the scan target is the host machine, but it doesn't function as expected when scanning a remote image.Do
scalibr
plugins have a way to detect if the scan target is running a different operating system than the host?