Repository navigation
feat: extend the Go re-check to +dirty builds, other module paths and the project's own advisory - #208
Open
Eandalf-Bigstack wants to merge 2 commits into
Open
feat: extend the Go re-check to +dirty builds, other module paths and the project's own advisory#208Eandalf-Bigstack wants to merge 2 commits into
Eandalf-Bigstack wants to merge 2 commits into
Conversation
…hs and the project's own advisory A scan of cubecos's rebuilt binaries showed three cases the Go pass missed. A binary built from a modified tree stamps its pseudo-version with +dirty (beats' builds: v7.0.0-20260930214605-b80bf8464fba+dirty), which the pass did not read as a pseudo-version. It does now. An advisory can give semantic ranges under one module path of a repository and only a fixed pseudo-version under another. GitHub's advisory for a Packetbeat flaw fixes github.com/elastic/beats in 8.19.9, 9.1.9 and 9.2.3, but github.com/elastic/beats/v7 only at a commit on the 9.2 branch. The pass now reads the ranges of the repository's other module paths too. When the linked commit is itself a release (v9.5.5 here), a fixed pseudo-version it does not contain no longer keeps the match, because the pseudo-version only names that release. The Go vulnerability database can list a project's older module path with no affected range, meaning every version and no fix, where the project's own advisory names only the newer path. Examples are containerd v1, for two CRI checkpoint flaws in a feature only v2 has, and chi v1 to v4, for a RedirectSlashes flaw introduced in v5.2.2. grype reports such a match with no constraint. It now moves to ignoredMatches when the GitHub advisory the repository itself published for the flaw names only the repository's other module paths. Verified with the script as committed. test_recheckvulns.sh passes 126 checks, 6 of them new. They cover a +dirty build, a release judged by the other path's ranges, the same advisory on a commit that is no release, an advisory naming only the other path, and the project's advisory deferred to. They also cover three cases that must stay: a database record with a range, an advisory without the project's own page, and an advisory naming the module itself. test_projsbom.sh passes its 12. In the jim build jail, on grype 0.119.0's reports, both beats matches on the rebuilt filebeat and auditbeat are ignored as release v9.5.5. On the 3.2.0 rootfs report, the pseudo-version counts are unchanged, and the new check ignores exactly seven matches: the two containerd v1 Criticals and a Medium, and four chi v4 matches. 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 this pull request to stack #207
October 17, 2026 14:55
The E610 check looked ixgbe up by name in the jail's module tree (modinfo -k). The jail installs its kernel packages with rpm -i --nodeps, which never runs depmod on that tree, so the tree has no modules.dep or modules.alias to look a name up in. The check therefore failed on the 7.2.11 kernel although its ixgbe carries the E610 (jim pipeline #162). The check now finds the kernel's own ixgbe.ko in that tree and reads its aliases. The build still fails when the kernel has no ixgbe, or one without the E610 10GBASE-T id. Verified in the rebuilt jim build jail (7.2.11) by running the rule as committed through make. It passes for 7.2.11-1.el9.x86_64, whose ixgbe.ko.xz carries v00008086d000057B0, and fails for a kernel with no ixgbe in the tree. 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]>
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
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.
What type of PR is this?
/kind feature
What this PR does / why we need it
Extends the Go re-check that #206 added, for cubecos's sixth 3.2.0 scan-review round. A scan of cubecos's rebuilt binaries showed three cases it missed:
+dirty(beats' builds:v7.0.0-20260930214605-b80bf8464fba+dirty). The pass now reads it as a pseudo-version.github.com/elastic/beatsin 8.19.9, 9.1.9 and 9.2.3, butgithub.com/elastic/beats/v7only at a commit on the 9.2 branch. The pass now reads the ranges of the repository's other module paths too. When the linked commit is itself a release (v9.5.5), a fixed pseudo-version it does not contain no longer keeps the match, because the pseudo-version only names that release.ignoredMatcheswhen the GitHub advisory the repository itself published for the flaw names only the repository's other module paths.It also fixes a build blocker from #206's
7302fb2(8611c97). The E610 check looked ixgbe up by name in the jail's module tree (modinfo -k). The jail installs its kernel packages withrpm -i --nodeps, which never runs depmod there, so that tree has no index. On the 7.2.11 kernel the check failed although its ixgbe carries the E610, which stopped cubecos's jim pipeline #162 in the base rootfs. The check now reads the kernel's ownixgbe.kodirectly, and still fails the build on a kernel with no ixgbe or one without the E610 id.Which issue(s) this PR fixes
Refs bigstack-oss/cubecos#578
Special notes for your reviewer
Stacked: the base is
jim.lin/fix/vuln-handling-5(#206), on #205, and this PR is in the same GitHub stack. Merge #205 and #206 first.Pairs with the cubecos PR for
jim.lin/fix/vuln-handling-6, whose hex bumps point atcac1851and8611c97. Both repos merge fast-forward, so the SHAs stay valid.Conservative by design:
The release exception needs an exact release. It applies only when the linked commit is a release tag. An untagged commit whose fixed pseudo-version lies elsewhere keeps the match, as before.
Another path's ranges need the advisory to name this module too. They count only when the advisory names this module path as well; an advisory that names only the other path judges nothing.
The deferral is narrow. All of these must hold:
security/advisoriespage;Pseudo-versions stay with the pseudo-version rules.
Verification:
Unit tests:
scripts/tests/test_recheckvulns.shpasses 126 checks, 6 of them new.+dirtybuild, a release judged by the other path's ranges, and the project's advisory deferred to.test_projsbom.shpasses its 12.On real reports (jim build jail, grype 0.119.0):
The E610 check: run as committed through make in the rebuilt jim build jail. It passes for
7.2.11-1.el9.x86_64, whoseixgbe.ko.xzcarriesv00008086d000057B0, and fails for a kernel with no ixgbe in the tree.Additional documentation
🤖 Generated with Claude Code