You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG/METRICS] Critical Secrets Exposure Override never sees Aperture's own block reason -- reads "aperture_reason", real key is "reason" #374
gitgalaxy/core/aperture.py always writes the key "reason" (never "aperture_reason") when it blocks a file, e.g. "reason": "Blocked (Machine-Generated Source Code Signature: ...)". aperture_reason is always "".
This feeds the "CRITICAL SECRETS EXPOSURE OVERRIDE" in signal_processor.py:
This is an or with two other independent, working detection paths (extension match, exact filename match), so this isn't a total failure of critical-leak detection -- but it is a fully dead third path. Worth checking whether Aperture's own reason strings ever actually contain the literal substring "CRITICAL LEAK" today (a quick grep of aperture.py's "reason": assignments suggests they currently read more like "Blocked (...)" rather than that exact phrase) -- if so, this may need both the key name AND the matched substring fixed.
🎯 Objective
The critical-leak override should see Aperture's real block reason, not always an empty string.
🛠️ Proposed Implementation
Fix the key name (ghost_meta.get("reason", ""), or thread the correct field through ghost_meta if aperture_reason was meant to be a distinctly-named copy). Confirm the "CRITICAL LEAK" substring match still makes sense against Aperture's actual current reason strings once the key is fixed.
✅ Acceptance Criteria
A file Aperture blocks for a genuine critical-leak reason correctly sets is_critical_leak = True via this path, proven by a test.
Activity
Fix "aperture_reason" -> "reason" key mismatch (#374)
Fix "aperture_reason" -> "reason" key mismatch (#374) (#385)