chore(deps): bump the trivy group across 1 directory with 2 updates - #2640
Conversation
23832de to
29d79f0
Compare
Bumps the trivy group with 1 update in the / directory: [github.com/aquasecurity/trivy](https://github.com/aquasecurity/trivy). Updates `github.com/aquasecurity/trivy` from 0.72.0 to 0.74.0 - [Release notes](https://github.com/aquasecurity/trivy/releases) - [Changelog](https://github.com/aquasecurity/trivy/blob/main/CHANGELOG.md) - [Commits](aquasecurity/trivy@v0.72.0...v0.74.0) Updates `github.com/aquasecurity/trivy-db` from 0.0.0-20260629102122-a0049d7ad12f to 0.0.0-20260813095258-0e0340a01b57 - [Release notes](https://github.com/aquasecurity/trivy-db/releases) - [Commits](https://github.com/aquasecurity/trivy-db/commits) --- updated-dependencies: - dependency-name: github.com/aquasecurity/trivy dependency-version: 0.74.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: trivy - dependency-name: github.com/aquasecurity/trivy-db dependency-version: 0.0.0-20260813095258-0e0340a01b57 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: trivy ... Signed-off-by: dependabot[bot] <support@github.com>
29d79f0 to
486916a
Compare
There was a problem hiding this comment.
Pull request overview
Updates Trivy and Trivy DB dependencies, improves JAR manifest parsing, and adds RapidFort vulnerability-source support.
Changes:
- Upgrades Trivy and related dependencies.
- Adds bounded, folded JAR manifest parsing.
- Adds RapidFort CVE handling and refreshes tests and fixtures.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Summary |
|---|---|
scanner/trivy/jar/parse.go |
Improves bounded manifest parsing. |
scanner/trivy/jar/parse_test.go |
Adds manifest parsing and folding tests. |
scanner/testdata/golden/juddiv3-war-3.3.5.war.json |
Updates expected scanner output. |
models/vulninfos_test.go |
Tests RapidFort severity scoring. |
models/cvecontents.go |
Adds RapidFort source support. |
models/cvecontents_test.go |
Tests RapidFort source mapping. |
go.sum |
Refreshes dependency checksums. |
go.mod |
Updates dependency versions. |
Suppressed comments (3)
models/cvecontents.go:461
- Adding
TrivyRapidFortto this shared list makesVulnInfo.Cvss3Scoresvisit it in both loops (models/vulninfos.go:536and:558). RapidFort entries contain onlyCvss3Severity(as the new test demonstrates), so the first loop emits a zero-score entry and the second emits the calculated score; reporters enumeratingCvss3Scoreswill show duplicate RapidFort rows, including aNone HIGHrow. Filter severity-only content from the direct-score loop or otherwise emit each source once, and add a regression test forCvss3Scores.
return []CveContentType{Trivy, TrivyNVD, TrivyRedHat, TrivyRedHatOVAL, TrivyDebian, TrivyUbuntu, TrivyCentOS, TrivyRocky, TrivyFedora, TrivyAmazon, TrivyAzure, TrivyOracleOVAL, TrivySuseCVRF, TrivyAlpine, TrivyArchLinux, TrivyAlma, TrivyCBLMariner, TrivyPhoton, TrivyCoreOS, TrivyBottlerocket, TrivyRapidFort, TrivyRubySec, TrivyPhpSecurityAdvisories, TrivyNodejsSecurityWg, TrivyGHSA, TrivyGLAD, TrivyOSV, TrivyWolfi, TrivyChainguard, TrivyBitnamiVulndb, TrivyK8sVulnDB, TrivyGoVulnDB, TrivyAqua, TrivyEcho, TrivyMinimOS, TrivyRootIO}
scanner/trivy/jar/parse.go:295
- The splitter has a separate CRLF path (
advance++), but the new tests cover LF and lone CR only. Add a CRLF manifest case (including the section separator) so a regression in the two-byte advance cannot silently change the parsed main-section attributes and library identity.
if i+1 < len(data) && data[i+1] == '\n' {
advance++
}
scanner/trivy/jar/parse.go:275
- The decompressed-size guard is security-relevant, but no test exercises a MANIFEST.MF larger than
maxManifestSize. Add an oversized fixture and assert parsing fails; otherwise a future removal or incorrect wiring ofMaxBytesReaderwould go unnoticed and reintroduce unbounded manifest reads.
return parseManifestMainSection(xio.MaxBytesReader(file, maxManifestSize))
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Match trivy-db's AllSourceIDs precedence (RapidFort last) and the convention of previous source additions (Echo, MinimOS, RootIO are appended at the tail). Also record the upstream provenance of the MANIFEST.MF parser port in scanner/trivy/jar so the next trivy bump knows to re-diff it against upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (1)
scanner/trivy/jar/parse.go:34
- Could you add a regression test for the new decompressed-size limit? The current tests cover section selection and folding, but never feed
parseManifesta manifest larger thanmaxManifestSize; asserting the propagated limit error would ensure future parser changes cannot silently bypass this decompression-bomb protection.
const maxManifestSize = 10 << 20 // 10 MiB
Merge the two manifest test functions into one table, and cover the common shapes (LF/CRLF endings, every supported attribute, empty manifest, %variable skipping) alongside the existing corner cases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Test through the exported surface only: parse_test.go becomes package jar_test, and export_test.go bridges the unexported parseManifest and manifest fields for expectations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Build each test input from a lines slice joined with an explicit lineBreak, so the line-ending variant under test is a table field instead of escape sequences embedded in one long string. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (2)
models/cvecontents.go:461
- The new RapidFort precedence is not covered by
TestGetCveContentTypes: that test never exercises the Trivy branch. Add a case assertingGetCveContentTypes(string(Trivy))containsTrivyRapidFortas its final Trivy source, so a future omission or reordering cannot silently change which source supplies vulnerability fields.
return []CveContentType{Trivy, TrivyNVD, TrivyRedHat, TrivyRedHatOVAL, TrivyDebian, TrivyUbuntu, TrivyCentOS, TrivyRocky, TrivyFedora, TrivyAmazon, TrivyAzure, TrivyOracleOVAL, TrivySuseCVRF, TrivyAlpine, TrivyArchLinux, TrivyAlma, TrivyCBLMariner, TrivyPhoton, TrivyCoreOS, TrivyBottlerocket, TrivyRubySec, TrivyPhpSecurityAdvisories, TrivyNodejsSecurityWg, TrivyGHSA, TrivyGLAD, TrivyOSV, TrivyWolfi, TrivyChainguard, TrivyBitnamiVulndb, TrivyK8sVulnDB, TrivyGoVulnDB, TrivyAqua, TrivyEcho, TrivyMinimOS, TrivyRootIO, TrivyRapidFort}
scanner/trivy/jar/parse.go:281
- The new decompressed-size guard is not covered by the added tests. A regression that removes the
MaxBytesReaderwrapper or stops propagating its limit error would still pass every current case, even though this protects parsing untrusted ZIP entries from decompression bombs. Add a test with more than 10 MiB of short, non-empty manifest lines (so it exceeds the total limit without hitting Scanner's per-line limit) and assert that parsing returns the limit error.
return parseManifestMainSection(xio.MaxBytesReader(file, maxManifestSize))
This PR carries additional commits on top of the Dependabot bump, adapting vuls to the Trivy 0.74 changes:
bc1e5b3): follow Trivy 0.74's fix "read artifact properties only from the MANIFEST.MF main section" (fix(java): read artifact properties only from the MANIFEST.MF main section aquasecurity/trivy#11066). The manifest parser now reads only the main section (stopping at the first empty line), unfolds continuation lines, handles CRLF/LF/lone-CR line terminators, and caps the decompressed manifest at 10 MiB — ported from upstream's unexported parser, with a provenance comment for future bumps. Golden data updated: entries that used to pick up per-entryName:section attributes (e.g.xml-apis) now fall back to filename + SHA-1 and are resolved via the Trivy Java DB at detect time (verified end-to-end with the juddiv3 WAR: all:artifactIdentries are completed to fullgroupId:artifactIdcoordinates byvuls report).bc1e5b3,4105815): register the new trivy-db sourcerapidfortas CveContentTypetrivy:rapidfort, placed last in the trivy precedence lists to match trivy-db'sAllSourceIDsorder and the convention of previously added sources (echo, minimos, rootio).c9ba3d0,928c5db,41934e3): manifest parser tests are table-driven in an externaljar_testpackage (viaexport_test.go), with inputs expressed aslines+lineBreakand basic cases (LF/CRLF, all supported attributes, empty manifest,%variableskipping) alongside the corner cases.For reference, the trivy-db bump (
a0049d7...0e0340a, not itemized by Dependabot below) consists of exactly two commits:rapidfort, appended last inAllSourceIDsprecedence) — the counterpart of the models change above.notes[category=description]— data-side only, no new SourceID; vuls does not mapredhat-csaf-vexyet.Bumps the trivy group with 1 update in the / directory: github.com/aquasecurity/trivy.
Updates
github.com/aquasecurity/trivyfrom 0.72.0 to 0.74.0Release notes
Sourced from github.com/aquasecurity/trivy's releases.
Changelog
Sourced from github.com/aquasecurity/trivy's changelog.
Commits
e1fd17arelease: v0.74.0 [main] (#11037)ed3557fchore(deps): update golang.org/x modules (#11094)63b3f3fchore(deps): bump the docker group with 2 updates (#11090)d6664d7docs: update release branch ruleset instructions (#11093)3c15b84chore(deps): bump the common group across 1 directory with 7 updates (#11086)9e85b6bfix(misconf): unmark cty values outside the evaluation context (#11078)b307b12chore(deps): bump the aws group across 1 directory with 6 updates (#11053)d59f0f8fix(misconf): parse Azure flexible server parameters under their own names (#...d1985dachore(deps): bump the docker group with 2 updates (#11054)2c3b86cfeat: add RapidFort curated image scanner (#10452)Updates
github.com/aquasecurity/trivy-dbfrom 0.0.0-20260629102122-a0049d7ad12f to 0.0.0-20260813095258-0e0340a01b57Commits
Most Recent Ignore Conditions Applied to This Pull Request