Repository navigation
🤖 fix: adopt @tanstack/oracles and close the memory redaction leaks its first oracle found - #8228
Conversation
…ction Adds the oracle toolchain (pinned packages, lint presets for ESLint and oxlint, make test-oracles / check-oracles, agent skill pointers, AGENTS.md block) and the first oracle, tests/oracles/memorySecretRedaction.oracle.ts, with six laws. Fixes the leaks and false refusals the oracle found in memorySecretRedaction.ts. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$37.71`_
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (13)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🟢 e2e stories (Haiku): 14 passed21 agent steps · 6 replayed from cache · 15 model calls · 47.7k tokens (23% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 19s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 19.1s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.5s · 2 targets (web, phone) · run artifacts |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 07fff0db65
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Codex security review: password: over hunter2 no longer lost hunter2. A line of one word under a key that ends its line is the key's value again (valueGapOf), as main reads it; a line with a blank in it stays text. The oracle gains the shape and keeps ordinary one-word lines apart from keys. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$37.71`_
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 3030724487
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Codex security review: password=!@#$%^ was no longer redacted. Only a value of Markdown structure or a placeholder (*_~`>|.-) is no value now. CI's random seed found a one-word line under a key that an earlier pass had redacted ((Bearer X became [redacted]]); a word that holds a marker is no next-line value. Oracle: symbol password shape, Bearer-after-paren history. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 06770d795f
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Codex security review: password: over 'hunter2 # comment' leaked. Every
narrower read of the line under a key left a value readable, so the gap is
main's whitespace run again, and the guard refuses at least what main's
passes refuse. NOT_A_KEY also sees a key behind leading punctuation, which
the oracle's random seed found leaking on main ('password=' over
'(API_KEY: <value>').
---
_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 160643525d
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Codex security review: password="[redacted]"hunter2 passed both guards. A quoted marker is the whole value only when no letter or digit follows its closing quote. The oracle's random seed also found that the widened key lookahead read a JSON-escaped line break as punctuation before the next line's key, which left a symbol-only value readable; the lead run now stops at a backslash. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 92d9c7c582
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
`password=hunter2_api_key:` stayed readable: the key pattern skipped a value that looked like a nested key pair, and nothing after it took a value. A key pair is now a nested value only when it starts a later line (YAML `token:` over ` api_key: <value>`); on the key's own line the name is the value's text, so the whole value goes. Bearer tokens follow the same rule. The oracle's secrets-go law gains the shape that leaked; its hard-coded shape indexes now look shapes up by name. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 45da4e4f43
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
A quoted value may start with what ends a JSON string, so the guard that
read such a quote as the string's close left `{"password": ", hunter2"}`
readable (48 of 60 probed forms). The guard is gone: a key that ends a
JSON string after other text takes the string's closing quote as its
value's opening one, as on main, which loses text and never leaks.
The ordinary-text law now writes a key at line end on a JSON-escaped
note's last line only when the note ends in a line break; the secrets-go
law gains a quoted value that starts with a JSON delimiter.
---
_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: a45aa94cfc
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
Review loop paused again: the quoted-marker exemption is not converging. The last two Codex security findings (#9 Open finding #10: Options:
Recommendation: Option B. It applies the rule you chose without the one exception I added. The refusal message already tells the writer to leave the value out. Paused for a maintainer decision. Generated with |
The guards no longer exempt main's key and Bearer reads of a marker: a quoted marker after a key (`"password": "[redacted]"`) and a Bearer marker after a key (`Authorization: Bearer [redacted]`) are refused, as main's guard refuses them. Redaction still returns those lines as they are. Decision by Thomas Kosiewski on PR 8228 (Option B). The marker law states the refusal, and a new history (tails moved, none added) holds tails twice so the guards' repeat counts are judged. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
# Conflicts: # docs/AGENTS.md # src/node/services/agentSkills/builtInSkillContent.generated.ts
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
An edit may now rename the key of an unquoted name=value or name: value pair and keep its value as written (password=hunter2 to API_KEY: hunter2). addsSecretLike owes false there: the same credential under another key. Decision by Thomas Kosiewski on PR 8228 (Option A). A probe of 576 renames (every pair key, line lead, letter and symbol values, 0-2 JSON layers) found every one accepted. The gap that no law covered (main's key read comparing the key with its value) is now killed. Production is unchanged. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 9b6253c502
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Both guards accept a cookie header's marker (Cookie: [redacted]), by decision on this PR. The cookie reader ends the header's value at a quote that a comma, colon or bracket follows, so in curl -H "Cookie: [redacted]",sid=<value> the shell joins the word onto the header and both guards still accepted it (Codex security review). A word glued behind the quote that closes a cookie header's marker is now a tail, read like the key and signed-URL tails: it counts when a letter or digit stands in it, and it ends where a shell word ends (a blank, a quote, a backslash, a shell operator or a backtick). The marker law gains the form and a history that copies such a tail; it failed on the unfixed code (containsSecretLike false) and passes now. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 026a3982ef
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
Pausing the review loop: it is not converging in one area. Codex security findings #5 to #12 are all ways to glue a value onto a quoted marker that the guards accept: glued after a key's quote, after a comma, and now (#12) a second quoted shell segment after a cookie header's marker ( Generated with |
Both guards accepted a cookie header's marker (Cookie: [redacted]), and every rule that told a quoted marker apart from a value glued onto it left another way through: a word behind its closing quote (fixed in 026a398), then a second quoted segment, which the shell joins onto the header (curl -H "Cookie: [redacted]","sid=<value>"). Decision by Thomas Kosiewski on PR 8228 (Option A): drop the exemption. The guards now count the marker that the cookie pattern takes out and writes back, as main's do: containsSecretLike is true for a note that holds one, and addsSecretLike refuses an edit that holds more of them. Redaction still returns such a line unchanged. The tail rule for a word glued behind a cookie marker's quote has no job left and is gone. The marker law states the rule (a cookie header that starts with the marker holds one copy of it, the same in every header) and gains histories that swap one header's marker or tail for another's. It failed on the unfixed code and passes now. A differential fuzz of 400,000 texts and edits against main, cookie headers included, found no text or edit that main's guards refuse and these accept. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review 431ce12 drops the exemption for a cookie header's marker (Option A): both guards count the marker that the cookie pattern takes out and writes back, as |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 431ce12ece
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
Pausing again on the Codex security finding about shell-joined cookie segments in doubly escaped output (
Generated with |
## Summary Memory redaction now treats a cookie header in a shell argument (`curl -H "Cookie: ..."`) as running to the end of its shell word. A word or a quoted segment glued behind the header's closing quote is part of the same argument, so it is redacted too. Examples are `-H "Cookie: sid=a",tok=VALUE` and `-H "Cookie: sid=a","tok=VALUE"`. Before this change, that glued value reached the memory harvest in clear text. ## Background Codex raised this on #8228 (finding 13). We deferred it to this follow-up, with the rule chosen on that PR (Option B): a shell argument's value ends where its shell word ends, while a header string in JSON or a list keeps the item after it. ## Implementation All changes are in `src/node/services/memorySecretRedaction.ts`: - A quote opens a **shell argument** when blanks behind a word come right before it (`-H "`, `echo '`). Behind `[`, `{`, `,`, `:` or `=` it still opens a JSON or list item, whose closing quote ends the value. So `["Cookie: a","Accept: */*"]` keeps `"Accept: */*"`. - After a shell argument's closing quote, `shellValueEnd` extends the value through the glued shell word (`readShellWord`). It does this only when a `,`, `]`, `}` or `:` comes right after the close and the glued text holds a letter or digit. Punctuation alone (`"Cookie: sid=x", then ...` in prose) holds no value, so the close stays. - The shell word reads a quoted segment whole and goes on after it. It takes `\'` as a literal quote, not a segment. It ends at a blank, a tab, an operator, a backtick or the end of its line. In an escaped command (a JSON string that holds the command line), it also ends at an escaped line break or at the close of that JSON string. A `'` is content there: it opens a segment and does not close the string. - A quoted segment that never closes ends at the end of its line, as the header's value does, so it cannot take the lines after it. ## Validation - Oracle `tests/oracles/memorySecretRedaction.oracle.ts`: - 14 new shapes. Ten shell forms must go, among them a quoted segment, a single-quoted segment, `\'`, a tab, an unclosed segment, the end of a line and a command in a JSON string. A prose comma behind the close must stay, two JSON header lists must keep their next item, and a JSON cookie key at the end of its line must keep its closing quote. - A new ordinary line holds a header name with no `:`. - Three constructed histories write the shell forms raw and JSON-escaped once and twice, so the fixed seed reaches every one. - The law and authority text name the shell argument. - Result: **RED** on `main` (33 of 206 tests fail), **GREEN** here (206 pass). - Gap check (`make test-oracles`): **96 gaps, all already open on `main`** (103 gaps there; this branch closes 7 of them). Every mutant in the new functions is killed. While closing those gaps, the oracle found a second leak, now fixed: in a JSON-escaped command, a `'` after the header's close was read as the close of the JSON string, so `,'x VALUE'` stayed readable. - Unit tests: `memorySecretRedaction.test.ts` covers the shell forms raw and JSON-escaped, the unclosed segment, the JSON items that stay, and the guards. `memoryToolText.test.ts` adds the Codex repro: `renderToolValue` of a tool result whose stdout holds the curl line, raw or JSON-escaped. It fails on `main` and passes here. The `memoryService` and `memoryConsolidation` tests pass. - `make static-check` passes except `lint-hadolint`, which is not installed on this host; this PR changes no Dockerfile. ESLint, `make crap-check` and `make dry-check` pass. ## Risks - A shell argument can now lose more text than before: everything glued behind its closing quote, up to the end of the shell word. This happens only when the quote follows blanks behind a word, and a `,`, `]`, `}` or `:` comes right after the close. - A redacted shell word drops the header's closing quote (`curl -H "Cookie: [redacted] https://...`), because that quote was inside the redacted word. - A quoted segment that spans lines in the shell is read only to the end of its line, so text on its later lines stays readable. This matches how the header's value already ends at its line. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$96.27`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs=96.27 -->
Summary
Adopts
@tanstack/oraclesin Xum, starting with an oracle for the memory secret detector (src/node/services/memorySecretRedaction.ts). The oracle states six laws about whatredactSecretLike,redactWithinCap,containsSecretLikeandaddsSecretLikepromise, and checks them against an independent model with generated notes. It found six classes of leaks and false refusals, and this PR fixes them.Background
The detector guards every memory write (
memoryService.tsassertNoNewSecret) and redacts what the memory harvest quotes. Its unit tests pin examples, but the inputs are open-ended: any note, line order, lead character and JSON escaping. An oracle generates those inputs and judges each result against the law, and its gap check mutates the owned code to show which changes no law notices.What the oracle found (fixed here)
The share is the measured share of generated inputs in each family that broke the law before the fix.
token:overapi_key: XBeareror JWT on a later line leaked"a\nsk-..."\"API_KEY=\"inside a JSON string\\\"Cookie: sid=S\\\"password=[redacted],API_KEY: [redacted]main)password=over(API_KEY: <value>]curl -H "Cookie: sid=S"; echo done,["a=]b", "sid=S"]Also tightened: a key pair on the line under a key (YAML's nested
api_key:, or one behind punctuation such as(API_KEY:) is never the value of the key above, so its own value goes, while a key name glued into a value on the key's own line (password=hunter2_api_key:) is the value's text and goes with it, a key's own closing quote is not its value, and an unquoted value of Markdown structure or a placeholder alone (`,**,~~,>,...) is no value, while any other symbols are (password=!@#$%^). Each fix went oracle-first: the law failed on the old code, then passed after the fix. New unit tests also fail on the old code.Implementation
@tanstack/oracles0.0.1,@tanstack/eslint-plugin-oracles0.0.1,fast-check4.11.0,vitest4.1.12, pinned.bunfig.tomlexempts the two TanStack packages from the 7-day release wait; remove that after 2026-12-10.eslint.config.mjs, mirrored in.oxlintrc.json(the plugin is aliased tooracle, its rule prefix).oracle/no-oracle-disablecannot run in oxlint (its JS plugin API lacksgetInlineConfigNodes), socheck-oxlint-config.mjslists it as an intentional gap.make test-oraclesruns the oracles and the gap check (local, about 90 s).make check-oraclesruns only the laws (about 5 s); CI runs it inTest / Unitshard 1, because the gap check exits 0 even when a law fails.vitest.oracle.config.mtsjoins theconfigpath filter.AGENTS.md(the tool's template 4, condensed to the shorter style of 🤖 docs: halve agent-facing text, enforce its rules as checks, and fix the drift it hid #8233), and skill pointers in.agents/skillsand.claude/skillsthat load the skills shipped innode_modules/@tanstack/oracles.tests/oracles/memorySecretRedaction.oracle.ts, six laws: secrets go, ordinary text stays, guards agree, a quoted marker is no credential, the cap shows only its own text, no throw. Laws 1–4 also hold on notes JSON-escaped once or twice.Validation
Gap check: 665 mutants, 562 killed, 103 gaps (268 at the first full run). The guards-agree law now covers a renamed key that keeps its value (
password=hunter2toAPI_KEY: hunter2, accepted), which kills the change that would compare main's key read with its key. Remaining gaps: 68 in the cookie reader's list and quote paths (mostly code that no history reaches, since the regex pass redacts those values first), 18 in marker tails (non-ASCII letters, the]scan), 14 in the]tracking between passes, 3 in the cap.Every unit test file that imports the detector or the memory service passes (2313 tests). The linear-time tests can miss their CPU ceiling on a loaded host; they pass on rerun, and timings match
main.CI runs the laws with a fresh random seed on each run, as the tool intends. That seed found two of the bugs here, one of them also on
main(password=over(API_KEY: <value>leaked the value). A failure prints its seed and a replay line; when it also fails onmain, it is not the PR's bug and should be filed, not block (the tool's own guidance).Risks
Medium, limited to memory notes. Redaction keeps more text in one place: a quoted marker (
password=[redacted]) is accepted when no letter or digit follows its closing quote. A key that ends its line still takes the next line's first word as its value, as onmain, including a heading over prose (## Deploy token:overRotate every password.). This PR first narrowed that read to keep prose readable, and three security-review rounds each found a credential that the narrower read left readable (password:overhunter2, thenhunter2 # comment), so the read ismain's again. For the same reason a key that ends a JSON string after other text ({"title": "## Deploy token:"}) takes the string's closing quote as its value's opening one, as onmain: a quoted value may start with,,}or]({"password": ", hunter2"}, which a guard for that case left readable in 48 of 60 probed forms). The guards refuse at least whatmain's guard refuses, by construction: they also count whatmain's key read andBearerread take out (MAIN_READS), apart from the passes (Option B, chosen after four security reviews in a row found a credential that a rule leaving a key's value out let through). A differential fuzz of 400,000 texts and edits, cookie headers included, found no text or edit thatmain's guards refuse and these accept. The cost ismain's: a note that leaves a value out behind its key's own quote (Set "API_KEY=" before deploy.) or behind Markdown (**Token:** rotate monthly.) is refused, and so is any edit below such a quote, whose read runs to the next quote in the text. The same holds for a marker that main's key read takes as a value: a quoted marker after a key ("password": "[redacted]",credential: "[redacted]", word) and aBearermarker after a key (Authorization: Bearer [redacted]) are refused, as onmain. Redaction still returns those lines unchanged. A cookie header's marker (Cookie: [redacted]) is refused too, as onmain(Option A, third round): every rule that accepted it left a way to glue a value onto it behind its closing quote, which the shell joins onto the header. Every other change redacts more or refuses more.Decisions and follow-ups
Set-Cookie:alone on a line) is still redacted and refused, and the guards refuse a cookie header's marker (Cookie: [redacted]) and a signed URL's marker alone (?sig=[redacted]). The guard refuses at least what main's regex passes refuse, and these refusals expose no secret. The oracle states both as limits."Send the Cookie:\nnext") has a raw frame, so its value runs to the end of the note. That loses text and never leaks. Fixing it needs the reader to track which string the header sits in.curl -H "Cookie: a=b",sid=<value>,curl -H "Cookie: a=b","<value>").maindoes the same in raw and once-escaped text. In twice-escaped textmainremoves it only because its pattern cannot find the header's closing quote and reads to the end of the text; this PR finds that quote at every depth. The guards refuse such a line at every depth, because they count the header's value. The fix needs the cookie reader to tell a quote that closes a shell word from one that closes a JSON list item (["Cookie: a=b","Accept: */*"]), with its own oracle law (a shell argument's value runs to the end of its shell word).Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$37.71