Skip to content

fix(privacy): protect YAML keys and BOM-prefixed documents - #4527

Open
ScriptedAlchemy wants to merge 1 commit into
release-please--branches--master--components--tracedecayfrom
fix/privacy-structured-key-coverage
Open

ScriptedAlchemy wants to merge 1 commit into
release-please--branches--master--components--tracedecayfrom
fix/privacy-structured-key-coverage

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Merge #4478 first, followed by #4526, #4510, #4524, #4489, #4485, #4527, #4528, #4530, #4531, #4529, #4534, and #4541.

This PR is number 7 of 13, based on #4485. Merge #4528 next.

Use merge commits. After merging a parent PR, change its child's base to master before merging the child. Auto-merge is disabled.

Flat YAML sometimes uses the HTTP-header parser. That parser checked field names for known sensitive meanings and inspected values, but it did not detect credentials in the keys themselves. A credential-shaped key could leave its value exposed. A leading UTF-8 BOM also prevented JSON and TOML from reaching structural checks.

The line-format sanitizer now detects credentials in keys, including keys with empty values. It uses the existing detectors and typed quarantine result.

JSON and TOML processing removes one leading BOM before parsing, finding spans, rewriting, and checking the result. Text output restores the BOM. Admission limits and receipt identity still use the original bytes. Shared JSON parsing and LCM JSON detection accept BOM-prefixed input while preserving duplicate-key refusal and LCM's larger JSON allowance.

The code-source implementation revision and LCM detector revision advance so retained generations and completed rescans cannot continue to certify content accepted by the old checks. The in-place JSON and TOML key redaction and reparse checks from #4515 remain.

Fixes #4519.

Validation

Canonical Bazel validation on the integrated parent tree is recorded below.

  • Integrated parent head: 2af7f6d6f4a0f2badc6951a52749bd22f97ef1ef.
  • Privacy unit tests: 161 passed; search-cache retention: 1 passed; affected Rust formatting passed. Fresh Bazel invocation 29b6c73b-ec84-4468-8a95-3fdc458af26b.
  • Scoped Clippy for both targets passed: ada2671a-ed9b-42ef-b07b-8c3f00d94464.
  • These checks used canonical Bazel targets on Linux. Hosted checks remain independently required.

Structural identity admission correction

Fleet validation on descendant #4528 exposed Kimi and Vibe prefixed-session admission failures. The canonical structural-ID helper now digests quarantined native identifiers using its existing digest format, while sanitizer errors and scan limits still refuse admission. Public and previously protected identities remain stable.

Fix: 699c648217. Controlled Kimi BEFORE failed (0a07923d-9131-47ae-b88a-f63cf501fb8a); the new focused structural-ID regression also failed before the helper change (8c478185-6935-4c54-8f61-515826619192). AFTER: all 163 privacy tests and 633 session tests passed, including both original failing host journeys, plus formatting (84e89e56-2aaa-403c-a04c-3a27b2f41436). Scoped Clippy passed (8e707247-fbe2-415c-bda9-91478a20148f). No host assertions or admission limits changed.

@changeset-bot

changeset-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ab22321

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 381234b to badf167 Compare October 25, 2026 10:34
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch 2 times, most recently from 7cc565b to 5f813ea Compare October 25, 2026 11:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from a146486 to 4c1e387 Compare October 25, 2026 19:37
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch from 5f813ea to f4bc0d4 Compare October 25, 2026 19:42
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 30c54d7 to df38a2f Compare October 25, 2026 19:56
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch from f4bc0d4 to 1b16bf1 Compare October 25, 2026 20:06
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 170dd0d to a58d9fd Compare October 26, 2026 03:39
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch 2 times, most recently from 8df1317 to 55ff1db Compare October 26, 2026 03:51
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 3d0e7e2 to 7988b98 Compare October 26, 2026 03:56
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch from 55ff1db to 792d797 Compare October 26, 2026 03:59
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 97f1f5e to bdc0a03 Compare October 26, 2026 05:09
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch from 792d797 to dcbb4b6 Compare October 26, 2026 05:15
@ScriptedAlchemy
ScriptedAlchemy force-pushed the release-please--branches--master--components--tracedecay branch from 23cd303 to 6b64b1e Compare October 26, 2026 05:30
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/privacy-structured-key-coverage branch from dcbb4b6 to ab22321 Compare October 26, 2026 05:34

This branch has not been deployed

No deployments
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