Skip to content

dockerfile: collect all dependencies as extra scan targets - #3408

Merged
jedevc merged 1 commit into
moby:masterfrom
jedevc:dockerfile-sbom-reachable
Dec 14, 2022
Merged

dockerfile: collect all dependencies as extra scan targets#3408
jedevc merged 1 commit into
moby:masterfrom
jedevc:dockerfile-sbom-reachable

Conversation

@jedevc

@jedevc jedevc commented Dec 14, 2022

Copy link
Copy Markdown
Member

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 force-pushed the dockerfile-sbom-reachable branch from 3726dae to 1b0587e Compare December 14, 2022 14:35
@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.

2 participants