feat: mask sensitive infrastructure identifiers before model calls (#…#634
Conversation
Greptile SummaryThis PR adds an opt-in, reversible masking layer that replaces infrastructure identifiers (pods, namespaces, clusters, IPs, emails, etc.) with stable placeholders before LLM calls and restores them in user-facing Slack output. All previously flagged issues — private import of Confidence Score: 5/5Safe to merge — feature is off by default, all prior P0/P1 issues resolved, remaining findings are minor P2 suggestions. All previously flagged blocking issues (private import, per-call compilation, partial-overlap corruption, counter inflation) are properly addressed. No new P0 or P1 defects found. The two remaining observations — unmasked dict keys and the silent ALL_KINDS fallback — are P2 quality improvements that don't affect correctness for the common case. app/masking/context.py (dict-key masking gap) and app/masking/policy.py (silent ALL_KINDS fallback) warrant a second look before the feature is widely enabled. Important Files Changed
|
Adds a reversible masking layer that swaps pod/cluster/host/account/IP/
email identifiers with stable placeholders before sending prompts to the
LLM, and restores the originals in the final Slack report.
Configurable via OPENSRE_MASK_ENABLED and OPENSRE_MASK_KINDS env vars.
Off by default - no behavior change for existing users.
Closes #478