Skip to content

feat(core): privacy filter assignment scanner with name segmentation and benign values (#1464, part 2b-1a) - #1506

Merged
ajianaz merged 1 commit into
developfrom
feat/privacy-assignment-scanner
Oct 21, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/privacy-assignment-scanner

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

What

Replaces the single-regex assignment rule with a scanner: a secret-like name must end in a whole secret word (API_KEY, DB_PASS, apiKey; qualifiers like _PROD ignored), the value is read whole (quotes, escaped JSON, :=, =>, table cells, &/; boundaries, passwords with , or \), and benign values (paths, ARNs, digests, versions, ULIDs, dates, emails, shell references, identifiers, placeholders) are left alone. The shared vectors are complete at version 3 (192 cases). A block of key lines is followed to its end, up to 1 MiB.

Why

Part of #1464. The first detector was unsafe by default (139 of 330 benign cases flagged, 62 of 147 secrets missed on the review corpus); this one measures 3 and 16. Still not wired to a write path; that is the next PR. Refs #1464.

Testing

  • clippy -D warnings and fmt clean on the workspace
  • cargo test -p uteke-core --lib privacy passes (19 tests, including all 192 shared vectors, name segmentation and a hostile-input timing test)
  • Reviewed locally with the Cora MCP agent reviewer in an earlier form; its findings are fixed

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 2a33c5a into develop Oct 21, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/privacy-assignment-scanner branch October 21, 2026 06:42
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