Skip to content

feat(echo-osv): add provider for Echo OSV language advisories#1174

Open
orizerah wants to merge 3 commits into
anchore:mainfrom
orizerah:add-echo-osv
Open

feat(echo-osv): add provider for Echo OSV language advisories#1174
orizerah wants to merge 3 commits into
anchore:mainfrom
orizerah:add-echo-osv

Conversation

@orizerah

Copy link
Copy Markdown
Contributor

Adds an echo-osv provider for Echo's OSV feed (https://advisory.echohq.com/osv/all.zip), separate from the existing echo (OS) provider so OS-level and language-ecosystem advisories are handled by their respective schemas.

Pinned to OSVSchema("1.7.5") because the feed uses the upstream field (added in OSV 1.7.0) and the ECHO- id prefix (registered upstream in v1.7.4). Adds schema/vulnerability/osv/schema-1.7.5.json accordingly. Only the language ecosystems (Echo:PyPi, Echo:npm) are kept; OS-level Echo entries continue to flow through the existing echo provider.

Test plan

  • make unit, make check-types, make test (py3.13 + py3.14) all pass.
  • Verified against the live feed: 52 records produced, all validate against the bundled OSV 1.7.5 schema.

@orizerah orizerah marked this pull request as draft May 17, 2026 10:57
@orizerah orizerah marked this pull request as ready for review May 18, 2026 14:21
orizerah and others added 3 commits May 18, 2026 17:22
Adds a new "echo-osv" provider that ingests the Echo OSV feed
(https://advisory.echohq.com/osv/all.zip), filtering to language
ecosystems (currently Echo:PyPi and Echo:npm) so that OS-level
"Echo" entries continue to be handled by the existing "echo" provider.

Records are emitted under the OSV 1.7.5 schema, which is the earliest
version that both supports the `upstream` field used for CVE/GHSA
cross-references and accepts the "ECHO-" id prefix (registered upstream
at osv-schema v1.7.4). The OSV 1.7.5 validation schema is also added
to schema/vulnerability/osv/.

Signed-off-by: Ori Zerah <ori.zerah@echohq.com>
Signed-off-by: Ori Zerah <ori.zerah@echohq.com>
Set database_specific.anchore.record_type = "advisory" on every record so
grype-db's OSV transformer (anchore/grype#3252) routes the affected ranges
into UnaffectedPackageHandle rather than the affected store. Echo ships
patched builds of upstream PyPI/npm packages; treating those ranges as
"X is vulnerable" would false-positive every non-Echo consumer.

Also merge OSV 1.7 `upstream` into `aliases` (deduped) so cross-source
CVE/GHSA bridging works at scan time -- the transformer reads aliases but
not upstream, and without that bridge grype can't link an ECHO-* unaffected
record to a GHSA/NVD match on the same package.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Ori Zerah <ori.zerah@echohq.com>
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.

1 participant