-
Notifications
You must be signed in to change notification settings - Fork 598
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
Possiblity to run Syft on a Dockerfile #1074
Comments
@vargenau Do you know how tern accomplishes this? |
In case it helps, https://github.com/tern-tools/tern/blob/main/tern/analyze/default/dockerfile/run.py But also see moby/buildkit#2773 I would love to hear more about the use cases here. Is this something that should sit between |
I do not really know. I am testing both Syft and Tern and comparing features and results. |
That process looks very heavy and error prone. I think it would make more sense given the state of all tooling to just build a dockerfile then scan it rather than having Syft try to untangle the layers |
I tend to agree. I'm still curious about the use cases but IMHO static analysis will be extremely limited for the SBOM use case, and anything related to packages/dependencies at that level can probably be handled (if it isn't already) by linters. There's a spectrum of dynamic analysis options (like the In general, I think trying to produce an SBOM from an otherwise non-annotated Dockerfile can only yield an "envelope" SBOM, e.g., reference the base file, reference it's part of a larger codebase but not actually get into component substance without dynamic introspection at which point the OCI image has already materialized somewhere |
Only somehow adjacent, for future reference: https://medium.com/nttlabs/buildg-ide-90cf200abe0a |
It looks like tern is just building the image and then analyzing it: https://github.com/tern-tools/tern/blob/717ea47be7310d055b86fb1b80d39fb472c0ddbf/tern/analyze/default/dockerfile/run.py#L177 We're closing this as "not planned" because we don't think it's correct for Syft to execute The reason we're taking a sort of firm stance here is this: Syft is a security tool, and it doesn't trust the artifacts it's pointed at, and building a Dockerfile requires trusting it. |
What would you like to be added:
It would be nice to be able to run Syft on a Dockerfile.
Why is this needed:
Additional context:
Tern allows this.
The text was updated successfully, but these errors were encountered: