Repository navigation
G6: personal-data leads and report-contract lint fixes - #2228
Merged
Merged
Conversation
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>
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.
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