feat(output): add opt-in risk assessment - #70
Merged
Conversation
limaronaldo
commented
Jul 24, 2026
limaronaldo
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code review verdict: PASS — no unresolved findings.
Checklist:
- opt-in only; default render path is unchanged
- score consumes final report findings after policy and optional CLI baseline filtering
- verdict and process exit status remain authoritative
- console keeps PASS/FAIL before the informational section
- JSON adds data only under explicit opt-in
- SARIF, HTML, explain and DSSE are not modified
- assessment is computed once per render
- model and coverage identities accompany the score
- contributions are deterministic, source-safe and capped at 50
- unsupported combinations fail as invocation errors
- public API change is additive and internal types stay private
- default/no-default and supported feature configurations pass
limaronaldo
marked this pull request as ready for review
July 24, 2026 15:01
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
scan --experimental-riskfor console and JSONagentshield-risk-v1assessment from the final post-policy/post-baseline findings--explaincombinations explicitlyCompatibility and policy
Default console, JSON, SARIF, HTML and DSSE output is unchanged. The flag does not change findings, policy thresholds, verdicts, exit status, fingerprints, baselines or suppressions. The public addition is one renderer function returning a string; internal assessment types remain private.
Safety
At most 50 ordered contributions are emitted, with an explicit omitted count. Contributions contain only fingerprint, rule id, effective severity, confidence and points. No source, snippets, evidence or environment data is copied.
Review
Code review found no blockers. Two evidence gaps were fixed before publication: a real 50-contribution truncation test and a console ordering/label test.
Validation
cargo fmt --all --checkcargo check --workspace --all-targets --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --all-targets --locked— 419 passedcargo test --no-default-features --locked— 385 passedgit diff --check