feat: add severity gates and inline IaC suppressions - #133
Conversation
roborev: Combined Review (
|
Addressed in 1df381f. CI still intentionally skips implicit repository config as a trust boundary; the scan/discover help and CLI docs now clearly require --config .cloudburn.yml when CI should use that file, while workflows can pin --fail-on directly. The SDK now exports evaluateScanPolicy(), attaches threshold, qualifyingFindingCount, and violated under ScanResult.policy whenever effective failOn is configured for static or discovery scans, and the CLI consumes the shared evaluator. Added public policy and CloudBurnClient coverage; pnpm verify passes (420 rules, 366 SDK, 123 CLI, and 14 docs tests). |
Already addressed in 1df381f. CI configuration trust behavior is now explicit in command help and CLI documentation, and the SDK exposes shared policy evaluation plus ScanResult.policy for configured failOn thresholds. The full verification suite passes. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1df381fca1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (character === '"' || character === "'") { | ||
| state.quote = character; |
There was a problem hiding this comment.
Do not open YAML quotes inside plain scalars
When a valid CloudFormation plain scalar contains an unmatched quote character—for example, Description: It's legacy before Resources—this branch sets state.quote even though YAML treats the apostrophe as ordinary plain-scalar content. That state persists across lines, so subsequent real # cloudburn-ignore... comments are treated as quoted text and discarded; the affected findings remain active and can incorrectly fail CI gates. Quote tracking should recognize actual quoted-scalar boundaries or use comment information from the parsed YAML document.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 59fca4a. YAML quote state now opens only where a quoted scalar can begin, so apostrophes inside plain scalars no longer hide later suppression comments. Added a CloudFormation regression test; pnpm verify passes with 367 SDK tests.
Summary
Adds severity-aware prioritization and policy controls across CloudBurn's rules, SDK, and CLI.
high,medium, orlowseverity to all 82 built-in rules and propagates it through findings, JSON/table output, andrules list --severity.--fail-on <severity>gates toscananddiscover, with per-modefail-onconfig and preserved--exit-codebehavior.Diagram
flowchart LR Rule["Rule metadata\nseverity"] --> Finding["Active findings"] IaC["Terraform / CFN YAML\nresource comments"] --> Parser["Parser suppression metadata"] Parser --> Partition{"Static result partition"} Finding --> Partition Partition -->|active| Output["Table / JSON output"] Partition -->|suppressed| Audit["suppressed array / count"] Output --> Gate{"--fail-on / fail-on / --exit-code"} Gate -->|qualifying active finding| Exit1["exit 1"] Gate -->|no qualifying finding| Exit0["exit 0"] Audit -. excluded .-> GateValidation
pnpm verifyRelated issues
Closes #101
Closes #102
Closes #103
Follow-ups reviewed but intentionally kept separate: #104, #105, #106, #107, and #122.