Add OpenVEX vulnerability triage#267
Merged
Merged
Conversation
The OSV scanner surfaces every known CVE on every run with no way to record that a vulnerability does not affect the product. Add OpenVEX 0.2.0 authoring (vex_statement/build_vex) and apply_vex, which suppresses not_affected/fixed findings and annotates the rest, joining on the vuln id or an alias with optional product scoping. Composes directly with the OSV scanner; wired through the facade, AC_apply_vex executor command, ac_apply_vex MCP tool and Script Builder.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 51 |
| Duplication | 1 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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.



Summary
The OSV scanner (
scan_components) surfaces every known CVE on every run, with no way to record "we checked, this one does not affect us" and drop it. OpenVEX is the standard triage signal for that. This authors OpenVEX 0.2.0 statements and applies them to the scanner's findings.vex_statement(vuln_id, status, *, products, justification, impact_statement)— one validated statement.status∈not_affected/affected/fixed/under_investigation;not_affectedrequires a justification (fromVEX_JUSTIFICATIONS) or an impact statement.build_vex(statements, *, author, vex_id, version, timestamp)— wrap in an OpenVEX document (injecttimestampfor a reproducible@id).apply_vex(findings, vex_doc)— suppressnot_affected/fixedfindings, annotate the rest withvex_status. Joins on the vuln id or any alias, optionally product-scoped.Composes directly with the OSV matcher:
scan_components→apply_vex. Pure stdlib (hashlib/json/datetime); Qt-free.Five-layer wiring
je_auto_control/utils/vex/__init__.py+__all__AC_apply_vexac_apply_vexTests & docs
test/unit_test/headless/test_vex_batch.py(12 tests incl. composition-with-scanner and validation cases)Lint clean: ruff / pylint / bandit / radon (no function CC > 10, ≤5 args).