Skip to content

feat: re-judge OpenStack's python packages in the vulnerability report by the OpenStack Security Advisories - #205

Merged
github-actions[bot] merged 2 commits into
developfrom
jim.lin/fix/vuln-handling-4
Oct 19, 2026
Merged

github-actions[bot] merged 2 commits into
developfrom
jim.lin/fix/vuln-handling-4

Conversation

@Eandalf-Bigstack

@Eandalf-Bigstack Eandalf-Bigstack commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind feature

What this PR does / why we need it

The vulnerability report's re-check gains a third source, the OpenStack Security Advisories, for cubecos's fourth 3.2.0 scan-review round, in two commits:

commit change
70f3fcc recheckvulns.py: OpenStack's python packages are re-judged by the OSSAs. grype matches OpenStack's own packages in the service venvs by GitHub's advisories, which can name only the newest series' fix where an OSSA fixed every maintained series. OSSA-2026-007 fixed keystone in 25.0.1, 26.1.1, 27.0.1 and 28.0.1, but its GitHub advisory says < 28.0.1, so a 27.1.0 that carries the fix is reported. The new --ossa pass keeps a checkout of openstack/ossa (opendev.org; OSSA_GIT for a mirror), updated between scans like the kernel CNA's. A python match whose CVE an advisory names for that package is judged by the advisory's own affected versions: outside every range it moves to ignoredMatches with the advisory as the reason, and inside one it stays with that range's fix. projsbom.mk passes --ossa ossa-advisories, a checkout kept beside kernel-vulns.
58f1897 The OSSA pass compares in OpenStack's release order. OpenStack versioned its releases YYYY.N until Liberty (2015.2) and semantically since, but compared as numbers nova 31.3.1 sorts below 2014.1.4. GitHub's advisories state the oldest flaws' fixes as YYYY.N releases, so current releases are reported for flaws fixed in 2012 to 2015, and advisory ranges written in YYYY.N releases took them in too. The pass now compares in OpenStack's order, ranges included, and moves a match to ignoredMatches when the package is a project the advisories name, every fix grype names is a YYYY.N release, and the installed version is semantic. It also reads a range that five advisories split at its comma (>=25.0.0, <26.1.0) as one.

Which issue(s) this PR fixes

Refs bigstack-oss/cubecos#578

Special notes for your reviewer

Note

Pairs with bigstack-oss/cubecos#2122, whose hex bump points at 58f1897. Both repos merge fast-forward, so the SHA stays valid.

Conservative by design: a match is cleared by an advisory only when every advisory naming its CVE for the package gives version ranges; the oldest give prose (All versions, Folsom, Grizzly), and those matches are cleared only by the YYYY.N rule. A fix that is not entirely YYYY.N, an installed YYYY.N release, or a package that is not an OpenStack project the advisories name stays as grype has it. The advisories' YAML is read for its two blocks only (affected-products, vulnerabilities), without a YAML library, as the rest of the script needs none. Versions are compared in PEP 440 order (29.0.0.0rc1 < 29.0.0). The kernel pass's clone-or-update is shared with the new one; its behavior is unchanged.

Verification:

  • Unit tests: scripts/tests/test_recheckvulns.sh, 104 checks, 40 of them new. They cover ranges per series, an affected version keeping its series' fix, product names in any case, quoted and annotated CVE ids, prose versions, a CVE named for another package, YYYY.N fixes and ranges against semantic versions, calendar-versioned packages left alone, split ranges, an advisory updated between scans, an unreachable checkout, and no fetch without --ossa or a python match. test_projsbom.sh passes its 12 checks with the new argument.
  • On a real report: run over the jim build's 3.2.0 report with the opendev checkout. The pass found 17 matches that an advisory names for their package and moves all 17 to ignoredMatches: 7 by the advisory's own ranges, each version past its series' fix, and 10 by a YYYY.N fix. With only the first commit it moved 5.

Additional documentation

NONE

🤖 Generated with Claude Code

…urity Advisories

grype matches OpenStack's own packages in the service venvs by GitHub's advisories, which can name only the newest series' fix where an OpenStack Security Advisory fixed every maintained one: OSSA-2026-007 fixed keystone in 25.0.1, 26.1.1, 27.0.1 and 28.0.1, its GitHub advisory says < 28.0.1, and a 27.1.0 that carries the fix is reported. recheckvulns.py gains a third pass, --ossa. It keeps a checkout of openstack/ossa from opendev.org, updated between scans like the kernel CNA's (OSSA_GIT points at a mirror). A python match whose CVE an advisory names for that package is judged by the advisory's own affected versions. Outside every range it moves to ignoredMatches, with the advisory as the reason; inside one it stays, with that range's fix. A match is cleared only when every advisory naming its CVE for the package gives ranges: the oldest advisories' prose versions leave it as grype has it. The YAML is read without a YAML library, since the rest of the script needs none, and versions are compared in PEP 440 order. The kernel pass's clone-or-update is now shared with the new pass, and projsbom.mk passes --ossa with an ossa-advisories checkout beside kernel-vulns.

Verified with scripts/tests/test_recheckvulns.sh, 89 checks, 25 of them new: ranges per series, an affected version keeping its series' fix, product names in any case, quoted and annotated CVE ids, prose versions, an advisory updated between scans, an unreachable checkout, and no fetch without --ossa or a python match. test_projsbom.sh passes its 12 checks with the new argument. Over the jim build's 3.2.0 report, with the opendev checkout, the pass found 17 matches an advisory names for their package and moved 5 to ignoredMatches, each version past its series' fix in the advisory's own ranges; the other 12 are named only by the oldest advisories, whose versions are prose.

Refs bigstack-oss/cubecos#578

Signed-off-by: Jim Lin <[email protected]>
Co-authored-by: Eandalf <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@Eandalf-Bigstack
Eandalf-Bigstack requested a review from a team as a code owner October 17, 2026 10:12
… re-check

OpenStack versioned its releases YYYY.N until Liberty (2015.2) and semantically since, so every semantic version came after every YYYY.N one; compared as numbers, nova 31.3.1 sorts below 2014.1.4. GitHub's advisories state the oldest flaws' fixes as YYYY.N releases, so grype reports current releases for flaws fixed in 2012 to 2015, and an advisory whose own ranges are written in YYYY.N releases took them in too. The OSSA pass now compares in OpenStack's order, an advisory's ranges included. It also moves a match to ignoredMatches when the package is a project the advisories name, every fix grype names is a YYYY.N release, and the installed version is semantic. The oldest advisories give their versions as prose, so this rule is what judges them. It also reads a range that a few advisories split at its comma as one range: '<=2014.2.3, >=2015.1.0, <=2015.1.1' and '>=25.0.0, <26.1.0' mean bounded ranges, not everything from the lower bound up. A lower bound alone, followed by an upper bound alone, is one range, as in all five advisories that write it so. The descriptor counts what each rule ignored.

Verified with scripts/tests/test_recheckvulns.sh, 104 checks, 15 of them new: a prose advisory's YYYY.N fix, an OpenStack project no advisory names the CVE for, mixed fixes and a calendar-versioned package left alone, an installed YYYY.N release, advisory ranges in YYYY.N releases, a split range read whole and still taking in its own versions, and the version orders. Over the jim build's 3.2.0 report with the opendev checkout, the pass now clears all 17 matches an advisory names for their package, 7 by its ranges and 10 by a YYYY.N fix, where the previous commit cleared 5.

Refs bigstack-oss/cubecos#578

Signed-off-by: Jim Lin <[email protected]>
Co-authored-by: Eandalf <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Eandalf-Bigstack added a commit to bigstack-oss/cubecos that referenced this pull request Oct 17, 2026
Moves hex to bigstack-oss/hex jim.lin/fix/vuln-handling-4 (58f18975, bigstack-oss/hex#205). Its two commits give the vulnerability report's re-check a third source, the OpenStack Security Advisories, read from a checkout of openstack/ossa kept beside kernel-vulns in the build tree. 70f3fcc judges a match on an OpenStack python package by the affected versions of the advisory that names its CVE: GitHub's advisories, which grype matches the service venvs' packages by, can name only the newest series' fix, so a package carrying its own series' fix was reported. 58f1897 compares in OpenStack's release order, where every semantic version came after the old YYYY.N releases that GitHub states the 2012-2015 fixes in, and reads a range a few advisories split at its comma as one. A match the advisories' data clears moves to ignoredMatches. Both repos merge fast-forward, so this SHA stays valid when the hex branch lands.

Over the jim build's 3.2.0 report with the opendev checkout, the pass clears all 17 matches on the epoxy venv's packages that an advisory names: 7 by the advisory's own ranges and 10 by a YYYY.N fix. hex's test_recheckvulns.sh (104 checks) and test_projsbom.sh (12) pass.

Refs #578

Signed-off-by: Jim Lin <[email protected]>
Co-authored-by: Eandalf <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@Eandalf-Bigstack
Eandalf-Bigstack added this pull request to stack #207 October 17, 2026 13:45
@SekiXu SekiXu added the done Merge the pull request label Oct 19, 2026
@github-actions
github-actions Bot merged commit 58f1897 into develop Oct 19, 2026
7 checks passed
@github-actions
github-actions Bot deleted the jim.lin/fix/vuln-handling-4 branch October 19, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done Merge the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants