-
Notifications
You must be signed in to change notification settings - Fork 667
fix: support docker hardened images #6320
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
Open
parker-snyk
wants to merge
2
commits into
main
Choose a base branch
from
CN-488-docker-hardened-image-purl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
b0379c9 to
66fedc9
Compare
Contributor
66fedc9 to
7410166
Compare
7410166 to
ece6b23
Compare
danlucian
approved these changes
Nov 20, 2025
j-luong
requested changes
Dec 4, 2025
Collaborator
j-luong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parker-snyk before merging, please can this be
- Rebased
- Commits squashed
- Update commit from
feat: ...tofix: ...(if you want to include this in the next hotfix)
137da7e to
c7a64ee
Compare
c7a64ee to
45d8389
Compare
Contributor
|
Your PR has not had any activity for 30 days. In 2 days I'll close it. Make some activity to remove this. |
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.
Pull Request Submission Checklist
Highlights breaking API changes (if applicable)n/aIncludes manual testing instructions (if necessary)n/aUpdates relevant GitBook documentation (PR link: ___)n/aWhat does this PR do?
Updates
snyk-docker-pluginto version8.12.0to add support for Docker Hardened Images (DHI) package identification. DHI packages now use thedhinamespace in their PURLs instead of the distro namespace (debian), allowing the vulnerability service to correctly match vulnerabilities to the package.Example PURL change:
pkg:deb/debian/curl@7.88.1-10+deb12u8?distro=debian-bookwormpkg:deb/dhi/curl@7.88.1-10+deb12u8?distro=debian-bookwormThis prevents false positives from matching DHI's patched packages against vulnerability data for unpatched distro packages.
Where should the reviewer start?
test/tap/cli-test/cli-test.docker-dhi.spec.tsto understand the expected behaviorpackage.jsondependency update forsnyk-docker-pluginThe actual DHI detection logic (parsing the
Maintainerfield from dpkg database) lives insnyk-docker-plugin- this PR just integrates that change.What's the product update that needs to be communicated to CLI users?
The CLI now correctly identifies Docker Hardened Images (DHI) packages through snyk-docker-plugin. This prevents false positive vulnerability reports on DHI's patched packages. No action required from users - the detection happens automatically when scanning DHI containers.
Risk assessment (Low)?
Low
snyk-docker-plugindependency updateMaintainerfield parsingAny background context you want to provide?
Docker Hardened Images patches binaries in their container images to fix vulnerabilities. Without namespace differentiation, Snyk was incorrectly matching these patched packages against the standard distro vulnerability feed, causing false positives.
The vulnerability service maintains a separate feed for DHI packages, but needs the PURL namespace (
dhivsdebian) to determine which feed to query.What are the relevant tickets?
CN-488
snyk-docker-plugin diff
snyk/snyk-docker-plugin@v8.10.2...main
Only a few lines changed, the rest of the changes are test fixures and tests