Skip to content

fix(privacy): skip a run of bare [REDACTED markers in a loop over the whole text - #1816

Merged
ajianaz merged 1 commit into
developfrom
fix/privacy-bare-marker-recursion
Nov 26, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/privacy-bare-marker-recursion

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

What

assignment_value in uteke-privacy skips the bare [REDACTED markers in front of a value in a loop over the whole text, before the 4096-byte window of one value is taken. The recursive skip inside assignment_value_in is removed.

Why

Found by the Cora review of the v0.24.2 release PR (#1815), which is the first review that diffs the whole release against main. It flagged the recursion in the #1794 change. Checking it:

The loop fixes both: no recursion, and the markers no longer count against the window.

Testing

  • New test a_long_run_of_bare_redacted_markers_does_not_hide_the_secret: 1, 455, 456, 457 and 200 000 markers in front of a secret; the output is the markers plus [REDACTED:env-secret] and the token is gone. It failed before the change (token in clear for 200 000) and passes after.
  • cargo test -p uteke-privacy passes (29 + 2)
  • cargo clippy -p uteke-privacy --all-targets -- -D warnings and cargo fmt --all -- --check pass
  • Mutation gate on the diff (cargo mutants -p uteke-privacy --in-diff): 19 mutants, 19 caught

Related Issues

Refs #1794. Blocks the v0.24.2 release PR #1815 (it needs to be refreshed from develop after this merges).

… whole text (#1794)

The skip of a bare `[REDACTED` in front of a value ran inside the 4096-byte
window of one value and recursed once per marker. A run of 456 or more
markers filled the window, so the secret behind it was never read, and the
recursion depth followed untrusted input.

The skip is now a loop in assignment_value, over the whole text, before the
window is taken. Test: 1, 455, 456, 457 and 200 000 markers in front of a
secret, all masked. Mutation gate on the diff: 19 mutants, 19 caught.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 0907e9b into develop Nov 26, 2026
18 checks passed
@ajianaz ajianaz mentioned this pull request Nov 26, 2026
4 tasks done
ajianaz added a commit that referenced this pull request Nov 26, 2026
Patch release v0.24.2: doc create on stores that went through schema v11 (#1806), the website build (#1813), the secret detector gap (#1794, #1810, #1816), list_pinned with schema v28 (#1804), dependency updates and the MCP Registry rename. See the CHANGELOG entry [0.24.2].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant