Add rootfs scan type support#1
Merged
Merged
Conversation
The rootfs scan type has identical sandboxing requirements to fs/config (read-only bind mount of the scan target, noexec tmpfs at /tmp) but scans individual binaries and archives (e.g. JAR files) rather than package manifests. This is essential for detecting CVEs in shaded or fat JARs that don't appear in lock files. Without rootfs support, users scanning unpacked Java distributions (e.g. Kafka Connect connectors) get zero findings because fs mode only looks for package manager manifests (pom.xml, go.sum, etc.).
Contributor
Author
|
@lhotari could you take a look at this please? thanks :) |
Owner
|
@rmoff Thanks for contributing. I created a PR to add this to ASF approved actions: apache/infrastructure-actions#711 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rootfsto the scan type case statement alongsidefsandconfigrootfshas identical sandboxing requirements (read-only bind mount, noexec tmpfs)Why
The
rootfsscan type is needed for scanning unpacked Java distributions (e.g. Kafka Connect connectors) where dependencies are shipped as individual JAR files rather than managed by a package manager.Without
rootfs, users get zero findings becausefsmode only looks for package manager manifests (pom.xml,go.sum, etc.), not individual archives:This came up while adding Trivy scanning to Apache Iceberg's Kafka Connect CI, where we switched from
aquasecurity/trivy-actiontosandboxed-trivy-actionfollowing the Trivy supply chain compromise.Test
Verified locally that
rootfsproduces identical Docker mount arguments tofs/config— the only difference is the subcommand passed to the trivy CLI inside the container.