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

Component detection does not scan Linux file system if the image is not a docker image. #691

Open
romahamu opened this issue Aug 2, 2023 · 3 comments
Labels
detector:linux The Linux detector status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@romahamu
Copy link

romahamu commented Aug 2, 2023

Hello,

We were trying to create SBOM for our production image using sbom-tool but it seems we have hit a blocker.

Our image is not created using docker, its a VM image created using packer.

SBOM tool uses component-detection tool to get the dependencies and for Linux it seems only way is passing docker image to the tool.

We tried running to component-detection tool directly on the VM from which we create the image but it does not capture any Linux packages installed on the image.

Linux scanner logs "No instructions received to scan docker images." and then returns.

syft tool does support scanning of a file system which is what component-detection tool uses for Linux scanner.

What is the workaround to detect Linux packages from the filesystem? We are blocked on this currently and unable to meet our SBOM requirement.

AB#2088307

@melotic
Copy link
Member

melotic commented Aug 2, 2023

Unfortunately, this is by design. Component Detection does not support scanning Linux file systems, only docker containers at the moment.

We can investigate utilizing Syft to also scan the current Linux file system with a CLI flag, but this isn't currently on our roadmap. This is also a bit tricky as Syft will also pick up dependencies similiar to Component Detection, but does not provide a graph output.

As a workaround, can you just use Syft to generate your SBOM?

@melotic melotic added status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) detector:linux The Linux detector labels Aug 2, 2023
@romahamu
Copy link
Author

romahamu commented Aug 2, 2023

Unfortunately for the same reason SBOM generated by syft is not according to schema for microsoft's sbom requirements.
Also, it seems component detection tool parses the output produced by syft to generate the cgmanifest.

@melotic
Copy link
Member

melotic commented Aug 9, 2023

We discussed in our Community Meeting that in the future we might forgo a dependency on Syft and manually scan container images ourselfves. The issue with using Syft is the output is in a different format than CD uses internally, and can be nondeterministic depending on the scan location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detector:linux The Linux detector status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
Development

No branches or pull requests

2 participants