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

dockerfile: collect all dependencies as extra scan targets #3408

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Dec 14, 2022

Previously, we only checked for direct dependencies of the stage, and direct dependencies of any of its parents. However, transitive dependencies would not be detected.

To resolve this, we add a new findReachable function, to find all dependencies, including the transitive dependencies. The logic of this new function doesn't need to worry about circular dependencies: those should never be returned from the toDispatchState function as they are invalid.

Signed-off-by: Justin Chadwell me@jedevc.com

Previously, we only checked for direct dependencies of the stage, and
direct dependencies of any of it's parents. However, transitive
dependencies would not be detected.

To resolve this, we add a new findReachable function, to find all
dependencies, including the transitive dependencies. The logic of this
new function doesn't need to worry about circular dependencies: those
should never be returned from the toDispatchState function as they are
invalid.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc merged commit 20334fd into moby:master Dec 14, 2022
@jedevc jedevc deleted the dockerfile-sbom-reachable branch December 14, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants