Public: anyone can read this; the crew can change it.

Advisory integrations: notify on a new exploited advisory #17326

opened this

Merged 33h 3m ago, live in production

The forge now flags advisories that CISA lists as known exploited, and files one issue for each exploited advisory that hits a pinned package. bun x tsc --noEmit is clean and test/security-osv.test.ts passes (26 tests).

Notes

opened this

The forge now flags advisories that CISA lists as known exploited, and files one issue for each exploited advisory that hits a pinned package. bun x tsc --noEmit is clean and test/security-osv.test.ts passes (26 tests). I did not run the full suite, the design lint or the rest of the check; the forge runs those on this push.

  • Flagging: the hourly refresh reads CISA's known-exploited catalogue from www.cisa.gov, which I added to forge.json egress. A mirrored advisory whose CVE id is on it is stamped once. The request is made once per pass, and not at all while no mirrored advisory has a CVE id. A refusal or a rate limit is reported the way the other feeds report one.
  • Where it shows: findings from the dependency scan API carry exploited: true. The terminal Dependencies row reads "high, exploited, EPSS 4.30%".
  • The notification is an issue. The hourly fix-issues duty files "Exploited: GHSA-… in lodash 4.17.20 (CISA KEV)" in each opted-in repository's tracker. It is filed once per advisory and pin, ahead of the bump issues, and counts toward the existing cap of 3 new issues per repository per pass.
  • Reused: the existing feed refresh (refreshFeeds), bounded reader (answerOf) and limited rate-limit check, the forge_epss stamping pattern, and the fileFixIssues dedupe by title.
  • Not done:
    • No phone push through crew/notify.ts. Those lines are per-person asks, and an issue reaches the crew and the feed without per-person settings.
    • No web page, because the scan has none; the web side is the API field.
    • No re-notice when an advisory is later removed from the catalogue.
  • Tests: they cover the catalogue parsing, one request per pass, and none when the mirror has no CVE. They also cover the exploited finding, the terminal row, and one issue filed once and not again. An existing test that counted calls to hosts other than first.org now also leaves out cisa.gov.
  • To try: put a repository in osv.repos, or use the forge's own, and let the hourly duty run. Then open the repository in the terminal and use the "Dependencies" palette entry.

The commit says No door: for the web page. I added an empty Try: commit, which the pre-push hook asked for.

Closes #17144

commented

The forge now flags advisories that CISA lists as known exploited, and files one issue for each exploited advisory that hits a pinned package. bun x tsc --noEmit is clean and test/security-osv.test.ts passes (26 tests). I did not run the full suite, the design lint or the rest of the check; the forge runs those on this push.

  • Flagging: the hourly refresh reads CISA's known-exploited catalogue from www.cisa.gov, which I added to forge.json egress. A mirrored advisory whose CVE id is on it is stamped once. The request is made once per pass, and not at all while no mirrored advisory has a CVE id. A refusal or a rate limit is reported the way the other feeds report one.
  • Where it shows: findings from the dependency scan API carry exploited: true. The terminal Dependencies row reads "high, exploited, EPSS 4.30%".
  • The notification is an issue. The hourly fix-issues duty files "Exploited: GHSA-… in lodash 4.17.20 (CISA KEV)" in each opted-in repository's tracker. It is filed once per advisory and pin, ahead of the bump issues, and counts toward the existing cap of 3 new issues per repository per pass.
  • Reused: the existing feed refresh (refreshFeeds), bounded reader (answerOf) and limited rate-limit check, the forge_epss stamping pattern, and the fileFixIssues dedupe by title.
  • Not done:
    • No phone push through crew/notify.ts. Those lines are per-person asks, and an issue reaches the crew and the feed without per-person settings.
    • No web page, because the scan has none; the web side is the API field.
    • No re-notice when an advisory is later removed from the catalogue.
  • Tests: they cover the catalogue parsing, one request per pass, and none when the mirror has no CVE. They also cover the exploited finding, the terminal row, and one issue filed once and not again. An existing test that counted calls to hosts other than first.org now also leaves out cisa.gov.
  • To try: put a repository in osv.repos, or use the forge's own, and let the hourly duty run. Then open the repository in the terminal and use the "Dependencies" palette entry.

The commit says No door: for the web page. I added an empty Try: commit, which the pre-push hook asked for.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs