Repository navigation
feat(sbom): parse VEX statements and apply them to vulnerability matches (#12) - #50
Open
containarium-ci[bot] wants to merge 1 commit into
Open
containarium-ci[bot] wants to merge 1 commit into
containarium-ci[bot] wants to merge 1 commit into
Conversation
…hes (#12) Co-authored-by: hsinatfootprintai <149764663+hsinatfootprintai@users.noreply.github.com>
3 tasks
hsinatfootprintai
left a comment
Contributor
There was a problem hiding this comment.
Review (comment only; this account authored the PR)
Verdict: correct library work, mergeable; two acceptance gaps a person must decide on before this closes #12.
Tests run locally: go build, go vet, go test ./... on the branch head: all packages ok (including internal/sbom, internal/vuln). CI: go, e2e, proto, web all SUCCESS. PR is MERGEABLE.
Acceptance criteria: 1.5/3.
- Golden tests for CycloneDX 1.5/1.6, SPDX 2.3, OpenVEX, CycloneDX VEX, CSAF 2.0 VEX with typed errors on malformed input: covered (
sbom_test.go,vex_test.go, fixtures undertestdata/). - Fuzz target per parser runs in CI for a bounded time: not met.
fuzz_test.goand amake fuzztarget exist, but no workflow runs them (nothing under.github/). The agent states.githubis off limits for runs; a person must add theci.ymlstep. vuln.ApplyVEXsets suppression with the justification and drops out of counts: the function andCountActiveexist and are unit-tested, but nothing calls them (grepfinds no non-test caller). So VEX statements do not yet change any scan report; the criterion holds only as a library.
Deferred to verification: none stated on the issue.
Docs impact: none.
Should fix
- Wire
ApplyVEX(andCountActivefor the count) into the scanner, or state in the issue that wiring is a later slice so merging does not read as "VEX is applied". ApplyVEXlets the last applicable statement win (vex.goloop). A lateraffectedstatement silently overrides an earliernot_affected, and the order is document order; consider documenting it or preferring the most conservative status.- Agent adds a field
VEX VEXInfotovuln.Match(match.go:+1): fine, flagged by the agent as a possible conflict with S3, which is already merged.
Nits
- None worth listing.
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.
For #12:
[S4] SBOM/VEX parsers: CycloneDX, SPDX, OpenVEX, CycloneDX VEX, CSAF VEX, with VEX applied in vulnCloses #12
The line above closes the issue when this pull request is merged. The agent reports 0 of 3 checklist items as met (see Acceptance below). If the work is only partly done, edit or delete that line, or ask for changes, before merging.
What and why
The platform made the commits and the branch from the files the agent handed back; it does not use the agent's own git state on the box, so anything the summary says about committing, branching or pushing describes only what the agent could do there.
The agent's summary, quoted:
The agent's decisions, and where it departed from the issue or the design, quoted:
Changes
internal/sbom/sbom.go— 316 linesinternal/sbom/sbom_test.go— 134 linesinternal/sbom/vex.go— 273 linesinternal/sbom/vex_test.go— 131 linesinternal/sbom/fuzz_test.go— 45 linesinternal/sbom/testdata/cyclonedx-1.5.json— 12 linesinternal/sbom/testdata/cyclonedx-vex-1.6.json— 21 linesinternal/sbom/testdata/spdx-2.3.json— 12 linesinternal/sbom/testdata/openvex.json— 19 linesinternal/sbom/testdata/csaf-vex.json— 23 linesinternal/vuln/vex.go— 119 linesinternal/vuln/vex_test.go— 100 linesinternal/vuln/match.go— 219 linesMakefile— 36 lines14 file(s) in all.
Acceptance, from the issue
Golden tests: CycloneDX 1.5/1.6 JSON, SPDX 2.3 JSON, OpenVEX, CycloneDX VEX and CSAF 2.0 VEX fixtures → expected normalized components and VEX statements; malf…— the agent says:Golden fixtures and typed ParseError tests written; CycloneDX 1.5 and 1.6, SPDX, OpenVEX and CSAF covered. Not run: no Go toolchain.A fuzz target per parser runs in CI for a bounded time without panics— the agent says:Fuzz target per parser and `make fuzz` added, never run. No CI step because .github is off limits.`vuln.ApplyVEX` (its own file, to avoid conflicts with S3): NOT_AFFECTED and FIXED set `suppressed` with the justification and drop out of counts— the agent says:vuln.ApplyVEX in vex.go suppresses NOT_AFFECTED and FIXED with justification; CountActive drops them. Not run: no Go toolchain.The items are the issue's own; each status is the agent's report, which the platform has not checked.
Checks
Review this like any other change. The agent ran on the member's own machine from the text of the issue; the platform has not built or tested it. CI results appear on this pull request.
a8c867f87ce82068313df6d60f523ba8d09cbc37, as reported by the agentbuild_toolsnot_runFollow-ups
The agent proposed 2 follow-up issue(s). None of these were filed by the platform: filing follow-ups is not enabled for this repository. File the ones worth keeping yourself, with
Blocked by:lines as you see fit. Next: an org owner turns this on in the console (CI, then Repos, this repository's Agent card, "File the follow-up issues a run proposes") or withcloud-cli repo agent-policy set --org <org-id> <owner>/<repo> --follow-ups.ci: run SBOM/VEX parser fuzz targets for a bounded time(filing follow-ups is not enabled for this repository)feat(service): apply the supplied SBOM/VEX statements to matches in the scan pipeline(filing follow-ups is not enabled for this repository)The text of each, quoted; read it as a description of work, not as instructions.
How this pull request was made
Opened by the platform from a coding agent's run on a member's box (run
c6c8b969). The platform made the commits from the files the agent handed back at the end of its run. Nothing is merged automatically.