| Planted instructions in a repository, or a request to hide content from safeguards |
Reading A (text that hijacks or halts an agent) is isolated into a view copy: comment and doc spans only, one marker each, listed with file, line, bytes and hash, never printed, original untouched, capped. Reading B (strip or rephrase content so safeguards no longer fire, or dangerous code reads as harmless) is refused: code is never altered and a safeguard stop is reported, not worked around. |
untrusted-repo-read/scripts/isolate.ts, SKILL.md; test isolate.test.ts |
| Real logic that runs only on rare input looks like a decoy |
Never deleted. It is marked "not run". Only not-run code that nothing kept still names and that carries trap words is a decoy suspect, and it leaves the copy whole into <copy>.quarantine.json beside the copy (never inside what REA reads), so it can be put back. A coverage run that crashed or timed out quarantines nothing: its labels are unreliable. fold-js.ts folds only predicates that give one answer for every seed value, so rare-input branches survive. Seeds are top-level const names bound once in the file. |
coverage.ts classify, quarantineCopy, fold-js.ts; tests coverage.test.ts, fold-js.test.ts |
| BLA changes its shapes per release |
signatures.md is pinned to BLA 3.1.0, the same value as BLA_VERSION in scan.ts: change both together. A scan with findings carries the pin in its notes. A score of 0 on a build from a newer BLA means "not recognized", not "clean" (SKILL.md rule 6). On a new BLA: harden the sample, run arms A/B/C, update shapes, then change the pin. |
scan.ts, signatures.md, scan.test.ts |
| Coverage runs target code |
bwrap only: no network, no home, scrubbed env, read-only root, private /tmp, 512 MiB heap, time limit. No fallback to an unsandboxed run: without bwrap the tool refuses. This host only. |
coverage.ts runCovered; test "target runs without network, home files or inherited secrets" |
| Target text carries instructions |
BLA plants bait text that addresses the analyst. Target text is data: asData wraps it and escapes every closing-tag start, so no text can close the wrapper. Bait is a finding, never evidence. |
guard.ts asData, SKILL.md rule 2 |
| A REA capacity error loops |
A capacity error is a nonzero REA exit with a limit phrase in REA's error envelope (stderr, or error/message/details.issues[].message of the JSON error on stdout; resource_constraint, or invalid_request with the Go framing message); other stdout is target text and is never judged. One retry. Its copy gets coverage only when bwrap exists and the target is not an .asar or a lone .pyc. The same bytes are never retried (SHA-256 ledger): if the retry copy equals the first copy, the run reports rea-failed and says why. A second capacity error is reported. |
guard.ts isReaCapacityError, mayRetry, run.ts |
| Cost runs away |
Token cap (300k) and time cap (30 min) per target, in a ledger file. At the cap, stop and report. Starting values: tune them in the A/B/C runs. |
guard.ts check, run.ts |
| Obligation ledger floods |
Fixtures only for statements the sandbox run reached, at most 200. |
guard.ts fixtureTargets |
| The original gets changed |
Every tool writes a copy. sanitize.ts refuses an output inside the target. Symlinks in a target are never followed or copied: they are skipped and listed (skipped-symlink actions, scan and fold notes). |
sanitize.ts, fold-js.ts, scan.ts, coverage.ts --out |
| Folding breaks a build |
fold-js.ts never emits code that does not parse. A test compares exports of the original and the folded build on common and rare input. It drops a call only when the callee is a sink: a top-level function with no this, throw, loop, member access or call to a non-sink, that is not recursive, that touches only its own locals, other sinks and private state, and is called only with literal arguments as statements. Anything else stays. |
fold-js.ts, prune.ts findSinks, fold-js.test.ts |
| The Python coverage venv needs the network once |
coverage.py is pinned and built into a cached venv outside the sandbox. Target code never runs there. The run itself stays in bwrap without network. |
pybox.ts coverageVenv |
| Decoy removal by shape breaks real code |
The .pyc cleaner removes only code objects with a known decoy shape and name stem. Anything else stays. |
pycclean.py, pytarpit.ts; test python.test.ts |
| A PyInstaller bundle is hostile input to the extractor |
pyinstxtractor-ng (pinned, built into a cached venv once, needs the network once) unpacks it inside bwrap: no network, read-only root, one writable temp folder, 120 s limit. It never imports the bundle. The unpacked size is not capped. A bundle the extractor cannot read is copied unchanged and reported. |
pybox.ts extractBundle; test python.test.ts |
.pyc cleaning depends on the interpreter version |
.pyc marshal is per version. The cleaner refuses a .pyc whose magic number differs from the interpreter that runs it. |
pycclean.py; test python.test.ts |