Skip to content

G6: personal-data leads and report-contract lint fixes - #2228

Merged
remigiusz-antczak merged 1 commit into
mainfrom
lane/g6-land2
Nov 4, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
lane/g6-land2

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Adds pii_data_map.py, a report-only lead finder for personal data kept or sent in the clear: plaintext national ids, unencrypted national-id model columns, and a raw email or phone passed to an analytics host. It is wired into review_checks.sh and the security-review mode.

Fixes report_contract_lint.py: chunked drafts with ordered parts and private, no-follow side files that are removed on --done; the object-level authorization label; and the citation rule. route_auth_map.py --all now cites a Django route at its view's def line.

Tests 70/70. Privacy, size-ratchet, changelog-fragment and SHA256SUMS gates pass locally. An independent review was done and its fixes verified.

🤖 Generated with Claude Code

Adds pii_data_map.py, a report-only, stdlib-only lead finder for personal
data kept or sent in the clear (JS/TS, Python, Go, Java, Kotlin source;
test paths skipped). Rules: plaintext-national-id (quoted SSN-shaped or
national-id-keyed literals, placeholders skipped),
unencrypted-national-id-column (Python model fields with no
encrypt/hash/vault/mask), and raw-pii-to-third-party (an email or phone
passed to an analytics or tracking host without hashing or masking).
Rows never print the value. Wired into review_checks.sh and the
security-review mode as a lead source that still needs a code read.

report_contract_lint.py:
- chunked drafts (--part N / --done) so long reports avoid one giant
  heredoc; the side files are opened O_NOFOLLOW, must be owned by the
  caller and private, parts must arrive in order, and --done removes them;
- the object-level authorization label maps to the frozen scorer's class;
- citation rule: a token counts as a file citation when it has an
  extension or line anchor, or its first path segment exists under the
  root; empty and ".." prefixes are rejected.

route_auth_map.py: --all now cites a Django route at its resolved view's
def line instead of the urls.py line.

The size budget for references/security-review-mode.md is raised in the
changelog fragment with the reason.

Tests: 70/70 (pii_data_map 15, report_contract_lint 41, route_auth_map 8, csrf_cookie_map 6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 285af52 into main Nov 4, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the lane/g6-land2 branch November 4, 2026 18:40
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