bread-scrub leaks seeded PII through marker, IPv6, URL and dropped-key paths #36

Closed
opened 2026-10-12 22:39:48 +08:00 by Breadway · 7 comments
Owner

Found by independent review of BREAD-15, PR #21 at 4dec9ea9f5. Confidence: high, compiled Rust probe against the immutable crate reproduces every case. Track repairs on existing PR #21, not a duplicate implementation PR.

Reproductions with Scrubber::new(ScrubContext::default()):

  • scrub_text("connect dead:beef::abcd") returns unchanged: IPv6 rule requires a digit although alphabetic-hextet addresses are valid (lib.rs:733-749).
  • scrub_text("remote 2001:db8::1: connected") returns unchanged: trailing punctuation is consumed as part of an invalid candidate.
  • scrub_text("AWS ") returns unchanged: arbitrary uppercase angle-bracket contents are trusted as markers (lib.rs:222,932-940).
  • scrub_text("https://bob:ghp_16C7e42F292c6912E7710c838347Ae178B4a@example.com/x") returns "https://bob:@example.com/x": earlier token redaction splits the URL and leaves credential username bob (lib.rs:478-482,562-596).
  • With username alicesmith, scrub_event_payload for an unlisted event with {"alicesmith":1} keeps alicesmith verbatim in _keys (lib.rs:433-447,948-953). Character shape is not proof of a non-personal key.
  • With hostname pi, scrub_text("host pi") is unchanged because identities shorter than 3 bytes are skipped (lib.rs:326-344).
  • Ingest scrubber maps 203.0.113.42 to IP:1; fresh report scrubber preserves that marker then maps a distinct notes address 198.51.100.7 to IP:1 too (lib.rs:534-547,932-940). Distinct values collide across passes.

Add these to the golden/property corpus, remove bypasses and verify all seeded values disappear while known generated markers remain idempotent. BREAD-15 remains the acceptance gate.

Found by independent review of BREAD-15, PR #21 at 4dec9ea9f52486d7d11fc660e60f2d35665056d2. Confidence: high, compiled Rust probe against the immutable crate reproduces every case. Track repairs on existing PR #21, not a duplicate implementation PR. Reproductions with Scrubber::new(ScrubContext::default()): - scrub_text("connect dead:beef::abcd") returns unchanged: IPv6 rule requires a digit although alphabetic-hextet addresses are valid (lib.rs:733-749). - scrub_text("remote 2001:db8::1: connected") returns unchanged: trailing punctuation is consumed as part of an invalid candidate. - scrub_text("AWS <AKIAIOSFODNN7EXAMPLE>") returns unchanged: arbitrary uppercase angle-bracket contents are trusted as markers (lib.rs:222,932-940). - scrub_text("https://bob:ghp_16C7e42F292c6912E7710c838347Ae178B4a@example.com/x") returns "https://bob:<SECRET>@example.com/x": earlier token redaction splits the URL and leaves credential username bob (lib.rs:478-482,562-596). - With username alicesmith, scrub_event_payload for an unlisted event with {"alicesmith":1} keeps alicesmith verbatim in _keys (lib.rs:433-447,948-953). Character shape is not proof of a non-personal key. - With hostname pi, scrub_text("host pi") is unchanged because identities shorter than 3 bytes are skipped (lib.rs:326-344). - Ingest scrubber maps 203.0.113.42 to <IP:1>; fresh report scrubber preserves that marker then maps a distinct notes address 198.51.100.7 to <IP:1> too (lib.rs:534-547,932-940). Distinct values collide across passes. Add these to the golden/property corpus, remove bypasses and verify all seeded values disappear while known generated markers remain idempotent. BREAD-15 remains the acceptance gate.
Author
Owner

Independent exact-SHA re-review: changes_requested at 3616fcf9cc. Full criterion mapping and actionable file/line repair checklist: #21 (comment). Confidence high: compiled immutable-crate probes reproduce credential/query leaks when generated markers occur inside URLs. https://bob:@example.com/x?account=alice remains unchanged; a query containing IP:1 retains &owner=alice. This continues BREAD-37 and prior rejection 4248, no duplicate bug card needed. Existing original raw-token URL, IPv6, AWS-marker, dropped-key and short-host regressions pass; whole-report pre-reservation and bounded depth pass. 27 unit + 7 corpus/fuzz tests, crate clippy/fmt/docs pass. Multiple-ingest-scope numbering and real two-pass integration remain unverified; open PRs #22/#23 are not integrated evidence. Required exact-head CI run124 pending. Move todo for coordinator repairs on existing PR21, preserve all stacked branches. No merge or done transition. Durable session updated reworking; fresh SHA-bound review and CI required after repairs.

Independent exact-SHA re-review: changes_requested at 3616fcf9cc21914cc9cfec8f6d6a25adefe2d869. Full criterion mapping and actionable file/line repair checklist: https://git.breadway.dev/Breadway/bread/pulls/21#issuecomment-4284. Confidence high: compiled immutable-crate probes reproduce credential/query leaks when generated markers occur inside URLs. https://bob:<SECRET>@example.com/x?account=alice remains unchanged; a query containing <IP:1> retains &owner=alice. This continues BREAD-37 and prior rejection 4248, no duplicate bug card needed. Existing original raw-token URL, IPv6, AWS-marker, dropped-key and short-host regressions pass; whole-report pre-reservation and bounded depth pass. 27 unit + 7 corpus/fuzz tests, crate clippy/fmt/docs pass. Multiple-ingest-scope numbering and real two-pass integration remain unverified; open PRs #22/#23 are not integrated evidence. Required exact-head CI run124 pending. Move todo for coordinator repairs on existing PR21, preserve all stacked branches. No merge or done transition. Durable session updated reworking; fresh SHA-bound review and CI required after repairs.
Author
Owner

Follow-up integration reproduction, confidence high: composed existing report/store PR23 with scrubber repair a052ed9 in isolated fix/breadbug-two-pass-verification. Existing 40 bread-bug tests pass. New reopened_store_markers_and_report_notes_remain_distinct fails: open Store, append remote 203.0.113.42, close/reopen Store, append remote 198.51.100.8, build actual report. Both logs become remote IP:1. Store::open creates fresh Scrubber without reserving existing on-disk marker numbers. This confirms the multiple-ingest-scope collision already tracked here. Regression preserved in isolated integration worktree. Marker-bearing URL repair passes 28 unit and 7 corpus/fuzz tests plus clippy/fmt and is pushed PR21 at a052ed9805. No merge or done transition.

Follow-up integration reproduction, confidence high: composed existing report/store PR23 with scrubber repair a052ed9 in isolated fix/breadbug-two-pass-verification. Existing 40 bread-bug tests pass. New reopened_store_markers_and_report_notes_remain_distinct fails: open Store, append remote 203.0.113.42, close/reopen Store, append remote 198.51.100.8, build actual report. Both logs become remote <IP:1>. Store::open creates fresh Scrubber without reserving existing on-disk marker numbers. This confirms the multiple-ingest-scope collision already tracked here. Regression preserved in isolated integration worktree. Marker-bearing URL repair passes 28 unit and 7 corpus/fuzz tests plus clippy/fmt and is pushed PR21 at a052ed980566964f58a7ef09ee1bf2952df3b143. No merge or done transition.
Author
Owner

Independent blocked at39ff3130583485dada208fe3c470954cacb56317. Full evidence #21 (comment). URL repairs and377 workspace tests/clippy/fmt/docs pass. Clean report9117355 passes42 tests including restarted logsIP1/IP2 and notesIP3 plus complete URL redaction. However actual consumers remain unmerged/unaccepted, not integrated feature acceptance; required CI129 pending. PR22 also has reproduced strict-cap defect BREAD-40 and missing journal ingest. Leave review, no merge/retarget or done. Coordinator must reconcile prerequisite/full-issue integration scope without waiving criteria, repair consumers and obtain fresh SHA review.

Independent blocked at39ff3130583485dada208fe3c470954cacb56317. Full evidence https://git.breadway.dev/Breadway/bread/pulls/21#issuecomment-4307. URL repairs and377 workspace tests/clippy/fmt/docs pass. Clean report9117355 passes42 tests including restarted logsIP1/IP2 and notesIP3 plus complete URL redaction. However actual consumers remain unmerged/unaccepted, not integrated feature acceptance; required CI129 pending. PR22 also has reproduced strict-cap defect BREAD-40 and missing journal ingest. Leave review, no merge/retarget or done. Coordinator must reconcile prerequisite/full-issue integration scope without waiving criteria, repair consumers and obtain fresh SHA review.
Author
Owner

Independent exact-head review at 39ff313058: library checks pass, full-card verdict blocked. Persisted criterion mapping, scope decision, job-by-job CI and combined-main checks: #21 (comment) . Required check / check (push), run129/job0 attempt2, and every step SUCCESS. Live base05125ef; conflict-free combined tree builds, passes377 workspace tests, clippy and docs. Exact library28 units+7 corpus/fuzz pass. No remaining identified library code defect. Actual cards still require integrated two-pass notes and distinct markers across restarted ingest scopes, which PR21 does not supply. Reconcile actual card/closing-reference scope into a library-only prerequisite with all consumer acceptance retained downstream, then fresh scope-bound gate, or provide accepted integrated consumers/evidence. Preserve stack and review status. No merge, branch deletion or done transition.

Independent exact-head review at 39ff3130583485dada208fe3c470954cacb56317: library checks pass, full-card verdict blocked. Persisted criterion mapping, scope decision, job-by-job CI and combined-main checks: https://git.breadway.dev/Breadway/bread/pulls/21#issuecomment-4498 . Required check / check (push), run129/job0 attempt2, and every step SUCCESS. Live base05125ef; conflict-free combined tree builds, passes377 workspace tests, clippy and docs. Exact library28 units+7 corpus/fuzz pass. No remaining identified library code defect. Actual cards still require integrated two-pass notes and distinct markers across restarted ingest scopes, which PR21 does not supply. Reconcile actual card/closing-reference scope into a library-only prerequisite with all consumer acceptance retained downstream, then fresh scope-bound gate, or provide accepted integrated consumers/evidence. Preserve stack and review status. No merge, branch deletion or done transition.
Author
Owner

Scope reconciliation for the review at #21 (comment). PR21 no longer closes BREAD-15; its body now scopes it as the library half of BREAD-15 and BREAD-37. The two-pass ingest and report criteria and the cross-restart, multi-scope marker criterion stay open on both cards. They are verified on integrated main after PR22 and PR23, and neither card moves to done on this merge.

Scope reconciliation for the review at https://git.breadway.dev/Breadway/bread/pulls/21#issuecomment-4498. PR21 no longer closes BREAD-15; its body now scopes it as the library half of BREAD-15 and BREAD-37. The two-pass ingest and report criteria and the cross-restart, multi-scope marker criterion stay open on both cards. They are verified on integrated main after PR22 and PR23, and neither card moves to done on this merge.
Author
Owner

Scope-bound library prerequisite PASS at39ff3130583485dada208fe3c470954cacb56317, persisted #21 (comment) . Accepted live scope reconciliation; no closing reference remains in PR body, although breadboard retains stale closes metadata. Final head39ff313/base05125ef, exact-head required check and run129/job0 attempt2 every step success, reviews API empty and mergeability confirmed immediately before normal expected-head-conditioned merge. Actual merged=true and merge SHA4a164fd98a9c749a6afa1ffd7b70ce0a5df83b86 confirmed. Head branch preserved for PR22. Independent library35 tests and combined-tree377 workspace tests/build/clippy/docs pass as recorded4498. This is NOT full-card acceptance or done: keep review pending integrated-main two-pass ingest/report notes and cross-restart/multi-scope marker verification after accepted PR22/23. No tags or manual release.

Scope-bound library prerequisite PASS at39ff3130583485dada208fe3c470954cacb56317, persisted https://git.breadway.dev/Breadway/bread/pulls/21#issuecomment-4523 . Accepted live scope reconciliation; no closing reference remains in PR body, although breadboard retains stale closes metadata. Final head39ff313/base05125ef, exact-head required check and run129/job0 attempt2 every step success, reviews API empty and mergeability confirmed immediately before normal expected-head-conditioned merge. Actual merged=true and merge SHA4a164fd98a9c749a6afa1ffd7b70ce0a5df83b86 confirmed. Head branch preserved for PR22. Independent library35 tests and combined-tree377 workspace tests/build/clippy/docs pass as recorded4498. This is NOT full-card acceptance or done: keep review pending integrated-main two-pass ingest/report notes and cross-restart/multi-scope marker verification after accepted PR22/23. No tags or manual release.
Author
Owner

Retained consumer gate now verified on integrated main at PR23 merge 6699643099. Clean detached worktree: cargo test --locked -p bread-bug -p breadbug --lib passes 47+11. Includes scrubbed-on-disk ingest, cross-app/rotation marker reservation after reopen, report-time seeded PII absence, and reopened_store_markers_and_report_notes_remain_distinct (IP:1/IP:2 from store, IP:3 from notes with URL credentials/query removed). Library independent review remains PR21 comment 4523; composed report independent pass is PR23 comment 4672. Dev-release success at integrated merge SHA.

Retained consumer gate now verified on integrated main at PR23 merge 6699643099a82023ab1334b2e1bd0304b8e9d862. Clean detached worktree: cargo test --locked -p bread-bug -p breadbug --lib passes 47+11. Includes scrubbed-on-disk ingest, cross-app/rotation marker reservation after reopen, report-time seeded PII absence, and reopened_store_markers_and_report_notes_remain_distinct (IP:1/IP:2 from store, IP:3 from notes with URL credentials/query removed). Library independent review remains PR21 comment 4523; composed report independent pass is PR23 comment 4672. Dev-release success at integrated merge SHA.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread#36
No description provided.