Repository navigation
fix(tier3): mask skill and home paths and keep more text in feedback chat evidence - #364
Merged
Merged
Conversation
…ence
The feedback chat only replaced paths that end in the run directory. An
error naming the evaluated skill, such as `<skill>/SKILL.md missing name`,
or any other file under the home directory still reached the provider
with the user name and directory layout.
- The skill directory is written as its name and the home directory as
`~`, matched only as whole paths. The skill directory comes from an
explicit `--skill`, or from a run kept in `<skill>/evals/results`.
- A copied run's path is also found when it starts with `~user/`,
`$HOME/`, `${HOME}/` or `%USERPROFILE%\`.
- A path joined to a copied run's path by `,;:=([{` (other than a drive
letter's colon) starts a path of its own, so `PATH=/usr/bin:/home/a/<id>`
keeps `/usr/bin`. A separator not followed by a root stays part of the
path, so `/home/a/my(project)/<id>` is still masked whole.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A field with no whitespace in the 65,536 characters after its limit was cut back to its last whitespace before masking, so `Error: ` plus a long minified JSON body reached the chat as `Error: ...<truncated>`. Such a field is now cut at its last whitespace or punctuation that no credential pattern takes inside a token (`,` `"` `}` and similar), so it keeps a masked prefix up to its limit. A cut inside a URL's user info would leave part of it unredacted, so the cut moves in front of a `://` that only user-info characters follow. `credential_safe_cut` lives next to the redaction patterns it depends on, and a test checks that no cut point leaves part of a known credential behind. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…chat masking
The CLI reference listed ~user/, $HOME/ and %USERPROFILE% but not ${HOME}/,
which the masking also accepts. It now also says that a root right after one of
, ; : = ( [ { starts a new path, so a directory name ending in one of those
characters before a / is read as two paths and only the second is replaced.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrisknvidia
reviewed
Nov 6, 2026
chrisknvidia
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the path scrubbing: skill, home, ~user/, $HOME/, ${HOME}/ and %USERPROFILE%\ forms are all redacted, and joined paths after separators are covered. I left one inline finding and will push the fix to this branch.
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
marked this pull request as ready for review
November 6, 2026 12:19
rng1995
enabled auto-merge (squash)
November 6, 2026 12:20
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased (#371) Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 9, 2026
…tart (#389) * fix(tier3): end feedback chat URL spans where a path after them can start The feedback chat leaves a URL other than a file: URL unchanged while it masks local paths (#364). Its URL pattern ran to the next whitespace, so in minified JSON such as {"doc":"https://host/e","log":"/home/alice/skill/evals/results/<id>/a.log"} everything after the URL, including the run's, the skill's and the home directory's local paths, reached the provider unmasked. 0.8.0 replaced the run's path there with the run ID. A URL now ends: - at whitespace, at a character a URL never holds unencoded (" < > ` ^ { | }), and at a single quote; - at a \n \r or \t escape (JSON or repr text), so the next line of an escaped env dump or stderr (HOME=..., ERROR:..., --log=..., file://...) is masked; - before an absolute-path root or another scheme that follows a , or ; (a list), a , or ; with an option or variable name and = (DOC=https://h/e;LOG=/x, ,--find-links=file:///x), or a Markdown ](, so a file: URL listed after one is masked. Commas, semicolons, parentheses, = and other backslashes inside a URL still belong to it, so a Windows path in a URL is kept, and a local path in its query or fragment stays unchanged, as #364 intended. A backslash, n, r or t is an escape even when its backslash is doubled, as in JSON inside JSON. It is a Windows folder instead when a name and as many backslashes follow: C:\Users\bob\t\runs\<id> has a folder t, and so does its JSON spelling with doubled backslashes. So a copied Windows or UNC run path with such a folder is masked whole, as in 0.8.0, and a URL holding one is kept. A scheme starts after an escape, not inside it, so \nfile:///x is a file: URL and is masked, not an nfile: URL that is kept. A +file: scheme such as git+file: names a local path, so it is masked like file: instead of being kept as a remote URL; 0.8.0 masked the run path there. A skill or home path right after a \n, \r or \t escape counts as a whole path and is masked. A copied run's path after one, or after a path-list separator and one, keeps the escape and the earlier list item. The scheme is now at most 64 characters. Unbounded, it was rescanned from every word boundary, so 300,000 characters of a.a.a took minutes; it now takes well under a second. The CLI reference now says what a URL keeps and where it ends, and the Unreleased #364 entry describes the fixed behavior. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(tier3): address #389 review: escape, ANSI and UNC path starts - The backslash of a \n, \r or \t escape or of an escaped ANSI code is never an absolute-path root, and only the first backslash of a run can be one, so a relative path after an escape stays relative (also in JSON, evals\\results) and long runs are scanned once. - A root right after an ANSI code (any CSI sequence: colors, erase line, cursor moves; up to 64 parameter characters) starts a path. ANSI codes after a line escape or separator, escaped at the same level, split paths, so /opt/a.py\r\x1b[K/srv/<id> keeps the earlier path; a path colored in parts is masked whole; a drive letter after a code is a drive. - An even run of backslashes, a name, half as many backslashes and a share name is a UNC server (\\nas01\share, \\tsclient\C), not a doubled escape, unless the server is named only n, r or t and an escaped character follows (\\n\u201c from JSON around repr text). - Folders named only n, r or t in a row (\r\n), and folders named like escapes after one (\t\x64\x86, \n\x64@2), are read together, up to eight steps; any \uXXXX or \xNN after such a folder is an escape unless it is a folder itself. In JSON a folder may start with an escaped letter (\\t\\\u00e9cole). The URL pattern mirrors the folder check. - A URL ends at an ANSI escape; the URL's escape checks are case-sensitive and linear on long backslash runs. - file://localhost may start right after an escape. - Docs and the Unreleased CHANGELOG entry describe the rules. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #341, which merged before its last review round. #341's
tier3 feedbackchat replaces absolute paths that end in the run directory with the run ID, and redacts credentials before shortening each field. Four gaps remained./Users/alice/work/acme-skill/evals/results/<id>, the errorSkill validation failed: /Users/alice/work/acme-skill/SKILL.md missing namereached the provider unchanged. Now the evaluated skill's directory is written as its name (acme-skill/SKILL.md) and the home directory as~(~/.codex/config.toml), matched only as whole paths, so/home/alice2is not read as~2. The skill directory comes from an explicit--skill, or from a run kept in<skill>/evals/results, because an inferred skill is otherwise only a name.~/counted as a home root, sosee ~alice/work/acme-skill/evals/results/<id>/jobswas sent unchanged.~user/,$HOME/,${HOME}/and%USERPROFILE%\now start a path too.tried /opt/tool/bin,/home/alice/results/<id>/jobsbecametried <id>/jobs. A root right after,;:=([{(other than a drive letter's colon) now starts a path of its own: the same text becomestried /opt/tool/bin,<id>/jobs, andPATH=/usr/bin:andlog:/var/log/x(are kept as well. A separator that is not followed by a root stays part of the path, so/home/alice/my(project),v2/<id>is still masked whole. The trade-off: a directory name that ends in one of those characters right before a/, such as/home/alice/proj:/<id>, is read as two paths, so only the second is replaced. The CLI reference says so.Error:plus a 125,000-character minified JSON body becameError: ...<truncated>. It is now cut at its last whitespace or punctuation that no credential pattern takes inside a token (,"}and similar), and keeps a masked prefix up to its limit. A cut inside a URL's user info would leave part of it unredacted, so the cut moves in front of a://that only user-info characters follow. The helper,credential_safe_cut, sits inutils/redaction.pynext to the patterns it depends on.docs/cli-reference.mdxand the feat(tier3): addtier3 feedbackchat over a completed run #341 CHANGELOG entry (Unreleased / Added) now say that the skill directory is written as its name and the home directory as~. The CLI reference also covers the home spellings (including${HOME}/) and joined paths.Why
#341 aims to send the run ID, not the host path. The skill path and other paths under the home directory still carried the user name and directory layout. The joined-path and long-field cases leaked nothing, but removed evidence the model could cite, such as which tool path failed or how a provider error starts.
Kept from public
tier3 feedbackchat over a completed run #341's order is unchanged: each field is masked whole before it is shortened. The 65,536-character window, the...<truncated>marker and dropping the token cut at the window's edge are unchanged too. The new cut only moves to characters no token pattern contains, and never into URL user info. A field whose first 65,536 characters have no such character, such aszrepeated 100,000 times, is still sent as...<truncated>.https://host.example/alice/<id>is still masked tohttps:<id>, as onmain.main, it runs in about the same time asmain.Tests
tests/evaluation/test_tier3_feedback_chat.py:open_feedback_sessionreplaces them for an inferred skill in<skill>/evals/resultsand for an explicit--skill(2 cases);~builder/,$HOME/,${HOME}/and%USERPROFILE%\spellings, paths joined by,;:(and a drive-letter;, and a path with(and,masked whole;mainand pass with this change.tests/test_redaction_assignments.py: 7credential_safe_cutcut-point cases, plus 8 cases checking that no cut leaves part of a GitHub, GitHub stateless, AWS,sk-, JWT, Bearer, URL user-info or quoted-assignment credential.tests/evaluation,tests/test_redaction_assignments.py,tests/test_safety_boundaries.py,tests/inference/test_llm_client.py,tests/tier3/test_plugin_signals.py,tests/test_cli.pyandtests/test_oss_packaging.py, run on currentmainplus this change: 858 passed.ruff checkandruff format --checkare clean on the changed files, andscripts/check_oss_boundary.pypasses.🤖 Generated with Claude Code