Repository navigation
Close Companion token and local secret-handling safety gaps - #107
Merged
Merged
Conversation
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.
Protected Companion launches could publish delegated authority before owning the listener, reuse standalone tokens, and race token cleanup with a successor launch. Bind before publication, issue a fresh token per launch, hold the listener through owned-token cleanup, and keep provider admission closed until publication validation and the final grant check finish.
Also close the earlier reviewed local handling gaps:
mktemp.Regression coverage includes competing starts, stale cleanup, publication failures, cancellation, retained descriptors, delayed focus loss and late output-path creation. No dependencies, entitlement changes, provider-policy changes or new Vault/WebView networking.
Validation: fresh
./scripts/check.shpassed on head28a010cf47c7610f08bdbec4cea050603e6a249b: Rust tests/fmt/clippy, all 98 Companion tests and 4 Reader-publication tests with no failures/skips, Swift helper typecheck, secret scan, entitlement/policy pins, network/import checks, cargo-deny and production TypeScript/Vite build. Independent scoped and final integration reviews found no open merge-blocking findings. All development uses fictional data. An initial run correctly refused fixtures under the shared system temporary directory; the successful run used a preflight-verified private folder with protected ancestors, without changing source or weakening checks.Scope: this PR does not implement encrypted native Agent Key entry or the new ChatGPT setup tools. The fictional native encryption/Touch ID proof and later integration remain pending. Existing plaintext custody and unverified account, tunnel and provider controls remain disclosed. Local plans and the fictional prototype remain ignored and preserved in the worktree.