Skip to content

fix(audit): report maximum SARIF descriptor severity - #916

Merged
runkids merged 1 commit into
runkids:mainfrom
salmonumbrella:fix/sarif-descriptor-severity-nov15
Nov 16, 2026
Merged

runkids merged 1 commit into
runkids:mainfrom
salmonumbrella:fix/sarif-descriptor-severity-nov15

Conversation

@salmonumbrella

Copy link
Copy Markdown
Contributor

Python credential scans can report a HIGH finding in a comment before a CRITICAL finding in code for the same rule. SARIF currently keeps the first finding's descriptor score, reporting 7.0 instead of 9.0.

Use the highest observed severity for each rule descriptor and its default level. Keep each result's level and the existing rule indices. This is the SARIF follow-up separated from #753; rule loading was handled in #882.

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal
  • Approved feature or large change

Linked Issue

Refs #753 (comment)

Verification

  • Reproduced through the CLI on unchanged main using an inert Python text fixture, never executed.
  • The regression failed with descriptor score 7 instead of 9 before the fix.
  • Targeted SARIF tests cover ascending and descending severities, cross-result aggregation, fallback IDs, result levels and stable indices.
  • The fixed CLI produces score 9 with identical result objects.
  • go test ./internal/audit -run "^TestToSARIF_" -count=1 and make check passed in the Linux devcontainer. Existing platform, permission and unavailable-shell skips remain unchanged.
  • Independent Codex correctness, rules, spec, consumer and cleanup reviews found no issues.

Checklist

  • CONTRIBUTING.md, including the AI-assisted contributions section, was read
  • I've reviewed every line of the diff and can explain it — human author review pending; independent Codex review is recorded separately
  • Tests included and passing (make check)
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Python credential scans can produce a HIGH comment before a CRITICAL
code finding for the same rule. Keeping the first descriptor score hides
the later severity. Promote the shared descriptor while retaining each
result's level and the first-seen rule index.
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T02:31:27.645686Z 523ad4c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@salmonumbrella
salmonumbrella marked this pull request as ready for review November 16, 2026 02:28
@runkids
runkids merged commit 22fdb28 into runkids:main Nov 16, 2026
9 checks passed
@runkids

runkids commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Thanks for splitting this out and for the clear write-up. Merged in 22fdb28, so it will ship with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants