Repository navigation
X-Ray: long payloads are measured; MZ counts only at the start of a file (Part of #7187) - #7209
Conversation
…hes whole segments (Part of #7155) The scanner's proofs mocked the detector and the file filter, so a blind scanner would have passed them. These run it for real over planted fakes. Its allowlist was a substring match, so tests/ also exempted src/latests/. Known misses are strict xfails, tracked in #7179. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts match folders (Part of #7155) X-Ray's bypass extensions also silenced its header check, so an executable named logo.png passed, the tool's own banner example. They now excuse dense data only. X-Ray and the Firewall use path_allowlisted. The controls run the real scanner; known misses are strict xfails (#7187). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inds (Part of #7179) Measured on seven repos first: long-line chunking added no hits, and reading all text added a handful for seconds of scan time. All of it lives in the scanner, so the engine's filter, signatures and scores don't move. Scan errors now show in the summary. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ile (Part of #7187) Long lines and anything past 8 KB were never measured, and MZ anywhere in a file read as an executable. Measured on seven repos first: no new hits outside test folders, and the 9 chance MZ matches go away. All of it lives in X-Ray, so SecurityLens and the engine don't move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The golden corpus showed two false positives my seven-repo sample missed: base64 SVGs in reveal.css and Zig's docs. Runs after base64, are skipped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
reveal.css percent-escapes its base64, which splits a run, so a prefix check still flagged it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…7187) Blessed through crucible_check.py on both legs. Every one of the six was MZ inside ordinary text (MZIPL, MZIPI, IBMZ.V5R3M0, MZ_USE_FUTURES, a string in loader.c), none at a file's start. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No description provided. |
|
PR #7209 @ 85c2825: 1 failed check(s) == mypy-audit (failure) -- real |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvedw9dNhQwBgnauX7Q
|
No description provided. |
|
CI shepherd: the head of this PR (22b98cd) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
|
PR #7209 @ 22b98cd: 13 failed check(s) == crucible (failure) -- infra == durations key (cancelled) -- infra == full-suite (failure) -- real == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (failure) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard 1/2) (cancelled) -- infra == measure (shard 2/2) (cancelled) -- infra == plan the suite parts (cancelled) -- infra == publish-history (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
No description provided. |
Part of #7187. Part of #7155.
Problem
Run for real, X-Ray missed long payloads and flagged ordinary text.
SecurityLens._armorempties lines of 250 or more characters, and X-Ray reads only 8 KB of each file, so a large encoded payload on one line, or past 8 KB, was never measured. MeanwhileMZanywhere in that 8 KB read as a Windows executable, so a COBOL field calledMZIPLwas flagged.What this does
MZcounts only in a file's first two bytes. That's where a Windows executable has it._scan_headhides any otherMZfromscan_binary; other headers are unchanged._dense_run, files up to 5 MB). A run of 256 or more encoded characters with entropy above 5.0 is an anomaly.data:URIs are removed first. Embedded icons are ordinary CSS and HTML.SecurityLensisn't changed, so the engine's signals don't move. Only X-Ray's count does.MZheader still fails.Golden master: why the output changed
Re-blessed through
tests/tools/box/golden-lock.sh python tests/tools/crucible_check.py --update --yes, both legs.xray/anomalies_foundgoes from 69 to 63, and that's the only value that moved (the snapshots that embed it have a new hash).All 6 were chance
MZmatches, each read at its offset, none at the start of a file:cosmopolitan/loader.cMZqFpDcarddemo/COTRN01,COTRN02(3 files)MZIPL,MZIPIzopeneditor-sample/RUNPSAM1.jclIBMZ.V5R3M0racket/eval.cMZ_USE_FUTURESNo new hits. The golden corpus caught two false positives my seven-repo sample missed, base64 SVGs in
reveal.cssand Zig's docs, which is whydata:URIs are excluded, percent-escaped ones included.Measured first
MZmatches removedA planted payload confirmed that measurement wasn't blind. X-Ray on this repo: exit 0, 0 anomalies, about 2.5 seconds.
Do the controls fail when something is broken?
MZmatched anywhere againMZnever matchedThe
MZ nevercase passed at first, because random padding tripped the entropy check. The test now uses plain padding, so only the header can fail it.Trade-offs
data:URI isn't measured.MZanywhere but the first bytes isn't flagged by this check. An embedded PE is still covered only by the entropy checks.Still open on #7187
XOR loops aren't flagged, though the tool prints that as a detection.
.icoand.tarhave no required header.Cost
No new workflow or job. X-Ray now reads whole text files: about 2.5 seconds on this repo.
Checks
tests/ruff_audit.py --cipasses.🤖 Generated with Claude Code