8000 feat: Use the R cataloger in directory scans by spiffcs · Pull Request #3774 · anchore/syft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Use the R cataloger in directory scans #3774

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

Merged
merged 1 commit into from
Apr 1, 2025
Merged

Conversation

spiffcs
Copy link
Contributor
@spiffcs spiffcs commented Apr 1, 2025

Description

This adds the directory tag to the r cataloger so that when scanning r packages as a tarball with DESCRIPTION files in the archive syft is able to detect and produce package results.

Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@spiffcs spiffcs enabled auto-merge (squash) April 1, 2025 14:07
@@ -69,7 +69,7 @@ func DefaultPackageTaskFactories() Factories {
newSimplePackageTaskFactory(cpp.NewConanInfoCataloger, pkgcataloging.InstalledTag, pkgcataloging.ImageTag, pkgcataloging.LanguageTag, "cpp", "conan"),
newSimplePackageTaskFactory(javascript.NewPackageCataloger, pkgcataloging.InstalledTag, pkgcataloging.ImageTag, pkgcataloging.LanguageTag, JavaScript, Node),
newSimplePackageTaskFactory(php.NewComposerInstalledCataloger, pkgcataloging.InstalledTag, pkgcataloging.ImageTag, pkgcataloging.LanguageTag, "php", "composer"),
newSimplePackageTaskFactory(r.NewPackageCataloger, pkgcataloging.InstalledTag, pkgcataloging.ImageTag, pkgcataloging.LanguageTag, "r"),
newSimplePackageTaskFactory(r.NewPackageCataloger, pkgcataloging.InstalledTag, pkgcataloging.ImageTag, pkgcataloging.LanguageTag, pkgcataloging.DirectoryTag, "r"),
Copy link
Contributor
@kzantow kzantow Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also pkgcataloging.DeclaredTag, I think pkgcataloging.DirectoryTag is what drives cataloger selection, though; yep:

sbom := getSBOM(src, pkgcataloging.InstalledTag, pkgcataloging.DirectoryTag)

@spiffcs
Copy link
Contributor Author
spiffcs commented Apr 1, 2025

I'll fix these failing tests

@spiffcs spiffcs closed this Apr 1, 2025
auto-merge was automatically disabled April 1, 2025 14:45

Pull request was closed

@spiffcs spiffcs reopened this Apr 1, 2025
@spiffcs spiffcs merged commit da62a82 into main Apr 1, 2025
24 of 25 checks passed
@spiffcs spiffcs deleted the update-r-cataloger-dir branch April 1, 2025 15:46
@wagoodman wagoodman added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Apr 24, 2025
@wagoodman wagoodman changed the title feat: adds the DirectoryTag to the r cataloger feat: Use the R cataloger in directory scans Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0