Repository navigation
Description
Found by the first real-detector control for X-Ray (#7155). X-Ray (binary_anomaly_detector) is a required pre-gate step and a shipped tool. It reads every file type, unlike Vault Sentinel (#7179), but these claims don't hold on planted inert content, with nothing mocked.
Gaps
1. Long lines are never scanned. SecurityLens._armor empties any line of 250 or more characters before scanning, to protect the regexes from slow backtracking. So a base64 payload on one long line is never measured: measured entropy hits stop between 200 and 256 characters. Packed payloads are what the check is meant to catch. This applies to every pattern run on that text, including Vault Sentinel's secrets (#7179).
2. The header check is partly luck. MZ is searched for anywhere in the first 8 KB. Any file containing those two letters is flagged, and a dense payload can be caught by chance. Our first control fixture passed that way, and the entropy check had nothing to do with it: it was only found because breaking the entropy check changed nothing.
3. XOR loops aren't flagged. X-Ray prints "Obfuscated bitwise operations (XOR loops)" as a detection, but a plain XOR decode loop passes. bitwise_ops was 0 for it.
4. Only the first 8 KB is read. A payload after that is never seen.
5. Some bypassed types have no required header. An executable named .ico or .tar passes, because SecurityLens.MAGIC_BYTES has no entry for them. .json and .yml skip the entropy check by design.
Each gap is pinned as a strict expected failure in tests/security_auditing/test_xray_control.py, so fixing one flips that test until it moves to the caught list. Gaps 1 and 2 are the priority.
Why these aren't fixed in the control PR
SecurityLens feeds the engine's signals, so gaps 1, 2 and 3 can move scoring and golden masters. They need measuring first.
Plan
- Measure and fix long lines in X-Ray (X-Ray: long payloads are measured; MZ counts only at the start of a file (Part of #7187) #7209) and Vault Sentinel (Vault Sentinel reads config files, long lines and three more secret kinds (Part of #7179) #7199), without changing
_armor -
MZcounts only at the start of a file (X-Ray: long payloads are measured; MZ counts only at the start of a file (Part of #7187) #7209) - X-Ray measures long encoded runs across the whole text file (X-Ray: long payloads are measured; MZ counts only at the start of a file (Part of #7187) #7209)
- Add required headers for
.icoand.tar, or drop them fromXRAY_BYPASS_EXTENSIONS(X-Ray: required headers for .ico and .tar (Part of #7187) #7234) - Fix or remove the XOR loop claim, so the tool only prints what it can detect (X-Ray: stop claiming XOR loops; print only the repeated indexed XOR it detects (Part of #7187) #7242)
- Move each fixed case from the
known_misstests to the caught list (X-Ray: long payloads are measured; MZ counts only at the start of a file (Part of #7187) #7209)
Activity
squid-protocol commentedon Oct 30, 2026
Heads-up for workers: the fix for long payloads, the 8 KB limit and
MZmatching anywhere is built and tested, on branchfeat/xray-long-payloads, queued behindfeat/vault-sentinel-widen. Please don't redo it. Still open after it lands: XOR loops aren't flagged, and.icoand.tarhave no required header.X-Ray: real-detector controls; a disguised executable fails; allowlis…
Vault Sentinel reads config files, long lines and three more secret k…
X-Ray: drop two helpers a merge duplicated (Part of #7187)
X-Ray: long payloads are measured; MZ counts only at the start of a f…
squid-protocol commentedon Oct 31, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-10-31T03:29Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.squid-protocol commentedon Oct 31, 2026
Churn run
7187-20261031T0143Z(host melek) ended without a PR. plan approved, resumed as 7187-20261031T0145ZX-Ray: required headers for .ico and .tar, so a disguised executable …
X-Ray: stop claiming XOR loops; print only the repeated indexed XOR i…
squid-protocol commentedon Oct 31, 2026
All plan items are merged (#7199, #7209, #7234, #7242). Long lines, MZ-at-start, whole-file encoded runs, .ico/.tar headers and the XOR claim are done. Wording leftovers in github-action-readme.md:76 and docs/wiki/02-06-security-lens.md:33 are docs-only and recorded in #7242's sibling gaps.