Skip to content
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

Syft ignore docker images #670

Closed
stefanm8 opened this issue Dec 13, 2021 · 5 comments
Closed

Syft ignore docker images #670

stefanm8 opened this issue Dec 13, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@stefanm8
Copy link

stefanm8 commented Dec 13, 2021

What would you like to be added:
Ability for syft to ignore specific paths and or docker container

Why is this needed:
Scan only source code vendors, bypassing private registry.

Additional context:

Scanning repository will return:

1 error occurred:
        * failed to determine image source: could not fetch image 'src/main/java/': failed to get image descriptor from registry:

although there is no intention of scanning image, but instead scan filesystem.

@stefanm8 stefanm8 added the enhancement New feature or request label Dec 13, 2021
@spiffcs
Copy link
Contributor

spiffcs commented Dec 13, 2021

Hey @stefanm8! Thanks for the issue. Linking the related issue here.

@wagoodman I'll keep this one open for now, but there might be room for consolidation with #221

@stefanm8
Copy link
Author

Hi @spiffcs

Is quite complementary, as in #221 does not suggest of scanning filesystem only.

There should be at least this option. I may be able to do it, if you give me some hints of where I should look.

Thank you

@spiffcs
Copy link
Contributor

spiffcs commented Dec 14, 2021

Syft also has schemes that can be provided as prefixes to get the behavior you're asking about in that final example when scanning the file system.

syft dir:path/to/yourproject
syft: file:path/to/your/project/file

Example:

git clone git@github.com:anchore/syft.git
syft dir:.

Screen Shot 2021-12-13 at 11 05 06 PM

@kzantow
Copy link
Contributor

kzantow commented Dec 15, 2021

There's a draft PR for #221, which allows for excluding paths from directory, archive, and image scans. Would this accomplish what you're looking to do?

@spiffcs
Copy link
Contributor

spiffcs commented Jul 8, 2022

Closing this issue for now since we have the ability to ignore paths per the above comment. Also with the dir and file directives users have options for generating very specific SBOM configurations. If more features are need feel free to comment and can consider reopening or filing a new issue.

@spiffcs spiffcs closed this as completed Jul 8, 2022
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
Archived in project
Development

No branches or pull requests

3 participants