xuanwo on X, 10-29: "我的很多项目名被识别成了 password,一天脱敏了 26M
次". The screenshot: a Codex summary where geodatafusion went as a
made-up word (bsssqojjdekwi) in every path, in rust/geodatafusion/,
geodatafusion.toml and cargo test -p geodatafusion; GEODATAFUSION in
capitals was left. Settings listed it under Passwords.
Cause, reproduced with the repo's own bytes: the geodatafusion repo's
PostGIS test (testing/postgis/README.md, rust/geodatafusion/tests/
postgis/README.md, .github/workflows/postgis-differential.yml) runs on
postgresql://geodatafusion:geodatafusion@127.0.0.1:55432/geodatafusion
The URL PASSWORD rule (user:password@) took the password. Once masked a
value is known (knownSpans) and is masked wherever it is written, case
as written, so the project's name went as a password in every request
for the rest of the run. Neither the local model nor b9f1fcddd's
words-only check is involved: this is a rule's find, which is known
whatever its look. Other projects set up the same way (name:name@)
each made their name known.
The rule: masking a URL's password hides nothing when the same URL has
it written as its user, a label of its host or a part of its path
(postgres:postgres@, root:root@, guest:guest@, app:shopdb@…/shopdb,
geo:geo@db/geo). hiddenInURL leaves such a password as written, so it
is never known. Whole parts only: geo:geod@…/geodb is masked. A
password not written elsewhere in its URL is masked as before, whatever
it looks like, there and as known everywhere after
(postgresql://geo:opensesame@…: opensesame is masked in a later path
too). This is scoped by where the value is in the URL, not by how it
looks: a URL in a tool call's arguments is judged the same way, and a
random password there (Tr0ub4dor3) is masked.
What the user gets: after updating (a restart forgets every known
value, the store is in memory) the project's name goes as written. The
user's ask, choosing what is masked without one exception at a time,
is already in Settings › Privacy: each kind (Passwords among them) has
Mask / Warn / Block, and Warn sends that kind as written while still
recording it; Never mask takes values. Yayoi_no_yume asked under the
same tweet for a switch per kind; that row is it. No new control is added: an Off
that records nothing would be a fourth state beside Warn with little
more to it.
The 26M: maskrec counts every place masked in every request's whole
body, and an agent resends its history each turn, so one known word in
a long Codex history was counted hundreds of times a turn. Filed as
#4193 (with the unmeasured CPU question of MaskJSON having no memo).
Tests: url_password_test.go.
TestURLPasswordWrittenElsewhereGoesAsWritten: the repo's README and
workflow lines, then the screenshot's summary text, then a Codex body
with the URL in exec_command's arguments and "cargo test -p
geodatafusion", each unchanged with 0 masked; postgres:postgres@,
root:root@, guest:guest@, app:shopdb@…/shopdb, redis://:cachebox@cachebox,
geo:geo@db/geo unchanged. TestURLPasswordStillMasked: hunter2pass,
geo:opensesame@…/geodata, geo:geod@…/geodb and redis's r3disPass
masked; Tr0ub4dor3 in a tool call's arguments masked; opensesame
masked again as known in a later path.
Broken by hand: the rule without hiddenInURL: red, both URL lines
masked, the summary 9 places masked as the screenshot shows
(/f745/<made-up>, rust/<made-up>/tests, -p <made-up>), the body 4, and
each of the six same-word URLs masked; green with it.
Run (mote, at 033b17baf + this commit): go test -run
'URLPassword|URLUserinfo|Known' ./internal/redact ok; gofmt -l clean;
GOOS=linux and GOOS=windows go vet ./internal/redact ok. Full suite
go test -count=1 -timeout 45m ./... started on mote; at push time it was
still in internal/agent and internal/gateway (load 60 to 225 from four
suites of other sessions), internal/access ok so far. Shipped without
waiting on it, as the owner asks; any red it names gets its own issue.
Not tried: a real Codex session with the geodatafusion repo; no GUI
change, so no GUI run.