Repository navigation
Keep a password-field dictation withheld from the log after a cancelled paste - #397
Merged
Merged
Conversation
…ed paste runTranscribeInject read the shared pressContext after awaiting the paste. Cancelling during .injecting makes the phase terminal at once, so a new press could install its own context before the old pipeline logged. The developer-mode log then judged the old transcript by the new press's field and could write a password in plaintext to dictations.jsonl. Snapshot this press's context before any await and pick the logged transcript (withheld / unverified / text) from that snapshot, so a later press can no longer change what is redacted. Found by a Claude Security scan (F7); patch reviewed by its agent panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity/f7-cancelled-paste-log-redaction # Conflicts: # Sources/BlurtEngine/Pipeline/DictationSession+Pipeline.swift
alexkroman
enabled auto-merge
November 25, 2026 05:26
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
The cancelled-paste test reuses GatedInjector rather than a private copy of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
runTranscribeInjectread the sharedpressContext(viacapturedContext) after awaiting the paste. Cancelling during.injectingmakes the phase terminal immediately without waiting for the pipeline task, so a new press could install its ownPressContextbefore the old pipeline wrote its developer-mode log line. The log then judged the old transcript by the new press's field (nil, or an ordinary field) and could write a password dictated into a secure field to~/Library/Logs/Blurt/dictations.jsonlin plaintext.let press = pressContext) before any await, and choose the logged transcript from that snapshot'ssecurity—withheldTranscriptfor.secure,unverifiedTranscriptfor.unknown, the text only for.ordinary— then log withpress?.resolved. A later press can no longer change what gets redacted.makeEntryalready swapped.securetext forwithheldTranscript).Preconditions: developer mode on (opt-in, off by default), a password-field dictation cancelled mid-paste, and a retry press that wins the race. Severity LOW.
Provenance
Found by a Claude Security scan of
Sources/(finding F7). The patch was reviewed by an independent verifier and a fresh adversarial reviewer before it was written; both found no remaining route and no new weakness.Test plan
CancelledPasteLogTests: parks a secure paste, cancels, accepts a second press whose read lands as an ordinary field, releases the paste, and asserts the password never reaches the log seamswift test --filter 'CancelledPasteLog|DictationSessionContext|DictationSessionUnknownSecurity|CancelRace|DictationLog'— 59 tests passed locallyswift test -Xswiftc -warnings-as-errorspassed in the review workspace (1353 tests)scripts/check.sh --lint-only— swift-format, swiftlint, invariants clean🤖 Generated with Claude Code