Skip to content

Add DHI ecosystem - #4388

Merged
another-rex merged 3 commits into
google:masterfrom
cdupuis:add-dhi
Jan 27, 2026
Merged

another-rex merged 3 commits into
google:masterfrom
cdupuis:add-dhi

Conversation

@cdupuis

@cdupuis cdupuis commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

Adding new ecosystem for Docker Hardened Images. relates to #4387.

Signed-off-by: Christian Dupuis <cd@docker.com>
@google-cla

google-cla Bot commented Nov 22, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@cdupuis cdupuis mentioned this pull request Nov 22, 2025
4 of 6 tasks
@jess-lowe
jess-lowe requested a review from michaelkedar January 4, 2026 22:09
@michaelkedar

Copy link
Copy Markdown
Member

/gcbrun

@michaelkedar

Copy link
Copy Markdown
Member

This probably needs to be synced with master to pick up update to the osv-schema submodule with the Docker Hardened Images ecosystem

@another-rex

Copy link
Copy Markdown
Contributor

/gcbrun

@another-rex

Copy link
Copy Markdown
Contributor

/gcbrun

@another-rex
another-rex merged commit 21fbfa0 into google:master Jan 27, 2026
19 checks passed
michaelkedar pushed a commit that referenced this pull request Aug 14, 2026
…5715)

DHI advisories publish release-lineage PURLs — `pkg:apk/dhi/<name>`
(Alpine lineage) and `pkg:deb/dhi/<name>` (Debian lineage) — but the
reverse PURL map only knew `pkg:dhi/<name>`, so PURL-form `/v1/query`
requests never resolved to the `Docker Hardened Images` ecosystem.

This adds `(apk, dhi)` and `(deb, dhi)` to the reverse lookup map. The
`dhi` namespace disambiguates from Alpine `(apk, alpine)` and Debian
`(deb, debian)`, so there is no collision.

Forward generation (`package_to_purl`) is intentionally left as
`pkg:dhi/…`: it receives the ecosystem name after
`ecosystems.normalize()` has stripped the `:Alpine:`/`:Debian:` lineage,
so it cannot choose apk vs deb — and DHI feed records always ship their
own PURL, so that path is not exercised for DHI in practice.

Tests added in `osv/purl_helpers_test.py`. Relates to #4388.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
michaelkedar pushed a commit that referenced this pull request Aug 14, 2026
… Images (#5716)

`Docker Hardened Images` was registered as a `SemverEcosystem`, but DHI
OS packages are repackaged Alpine (apk) and Debian (dpkg) packages that
keep their upstream version syntax (e.g. `8.4.0-r0`,
`7.88.1-10+deb13u2`). Semver comparison mis-orders these — it compares
the apk `-rN` release lexically (so `r10` sorts before `r2`) and does
not understand Debian epochs/revisions.

This adds a `DHIEcosystem` helper that delegates version handling to the
lineage ecosystem named in the `<lineage>:<release>` suffix — Alpine/APK
for `…:Alpine:<rel>`, Debian for `…:Debian:<rel>` — mirroring the
existing `TuxCareEcosystem` wrap-an-inner pattern. As a result `Docker
Hardened Images` is no longer reported as semver.

Tests added in `osv/ecosystems/_ecosystems_test.py`. Relates to #4388.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants