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
Commit 1de9355
Browse filesBrowse the repository at this point in the historyBrowse files
fix(harness): close four review findings — redaction, mutation gate, chunk boundaries
Each fix has a regression test verified to FAIL against the pre-fix code.
- compaction: redactLedgerDetail missed `curl.exe` and path-qualified curl
spellings, so a Windows `curl.exe -u user password` left the credential
unredacted in the facts ledger. Recognize the .exe suffix and both path
separators.
- compaction: credentialShaped treated any `x:y` token as user:password,
so `docker run --user 1000:1000` had its UID:GID redacted out of the
ledger. Require an alphabetic character before the colon; anything
alphabetic is still redacted, so no credential regresses.
- idle-done: GNU sed documents `-i[SUFFIX], --in-place[=SUFFIX]`, but only
the short form counted as mutating. `sed --in-place` therefore mutated the
worktree without advancing the mutation watermark, letting a stale green
verification satisfy the idle-done gate.
- tool-result-cap: line chunking used a fixed 2,000-code-unit slice stride,
which split astral characters across chunks; assemble() rejoins chunks with
a newline, so a surviving pair replayed as two lone surrogates. Back the
boundary off a high surrogate. Three (padding, cap) witnesses were observed
corrupting output pre-fix and are pinned as tests.
expect(SessionCompaction.redactLedgerDetail("curl -u alice https://example.com")).not.toContain("alice")
398
398
})
399
+
400
+
test("recognizes curl through .exe and path spellings",()=>{
401
+
// A bare `-u user password` is only redacted because the shell segment is
402
+
// recognized as curl. `curl.exe` (Windows) and path-qualified spellings
403
+
// previously missed that check and leaked the credential into the ledger.
404
+
for(constcommandof[
405
+
"curl.exe -u alice dummy-password https://example.com",
406
+
"CURL.EXE -u alice dummy-password https://example.com",
407
+
"/usr/bin/curl -u alice dummy-password https://example.com",
408
+
"/usr/local/bin/curl.exe -u alice dummy-password https://example.com",
0 commit comments