Skip to content

Label whole-project security findings by class - #2219

Merged
remigiusz-antczak merged 2 commits into
mainfrom
lane/g6-labels
Nov 4, 2026
Merged

remigiusz-antczak merged 2 commits into
mainfrom
lane/g6-labels

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Security audit reports now label each finding with a class and one primary path:line, and the report linter enforces it. This fixes the dominant G6 set1 failure: reports cited bare file names and carried no class, so real findings could not be matched or classified.

What changes

  • whole-project-report.md defines a ## Findings line format: [<class>] <repo-relative path>:<line> <severity>: <text>, with a fixed 18-class vocabulary. Evidence cites go after evidence:. A chain finding cites its end-state line as the primary.
  • report_contract_lint.py gains two rules:
    • finding-no-class: missing or unknown class label.
    • finding-multi-cite: a second real file cite before evidence:.
  • The linter also reads a - (stdin) report and accepts path:12,15,20 line lists. Prose, indented continuation lines and attack-path or chain subsections are not linted.
  • security-review-mode.md step 5 writes the Findings section and pipes the draft through the linter before emitting.

Review: an independent reviewer found 2 🔴 and 5 🟡, all fixed in this commit:

  • 🔴 host:port text was read as a second cite.
  • 🔴 bullets under subheadings were linted.
  • 🟡 continuation lines, uppercase classes, hyphenated severities, the heading anchor, and splitting a.py,2fa.py.

A re-review came back clean. Known gap: a second cite to a file that does not exist is not flagged as a multi-cite.

Checks run locally: pre-commit green, run-ci-tests.sh --affected exit 0, test_report_contract_lint.py 34/34.

🤖 Generated with Claude Code

remigiusz-antczak and others added 2 commits November 4, 2026 01:33
Add a Findings format to whole-project-report.md (one finding per line,
`[class] path:line severity: text`, fixed class vocabulary, one primary
cite per finding). report_contract_lint.py gains finding-no-class and
finding-multi-cite, accepts `path:12,15,20` line lists and `-` (stdin),
and keeps bad-citation for bare names. security-review-mode.md pipes the
draft through the linter before emitting.

Tests: 34/34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests: 34/34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 4c18b90 into main Nov 4, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the lane/g6-labels branch November 4, 2026 00:57
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.

1 participant