fix: address repository audit findings - #64
Merged
Conversation
kitlangton
force-pushed
the
chore/simplify-repository
branch
from
August 20, 2026 17:31
2d2749e to
48388f6
Compare
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.
What
Fixes concrete correctness, security, deployment, and capture issues found by a repository-wide review of Drive and the catalog.
Before / After
Before: malformed service state could pass a negative PID to
process.kill, an idle control client could block shutdown, the catalog dev server could read files outsidepublic/through double-encoded traversal, sibling/lab/catalogueURLs were claimed by the Worker, parallel capture workers lost revision-qualified IDs, flow previews printed deleted paths, and the Cloudflare token was present while build scripts ran.After: process IDs are constrained to safe positive integers, idle sockets are closed without interrupting active stop requests, public file resolution is root-confined, Worker routes are exact, capture workers preserve planned IDs and sequential preview semantics,
HEADcaptures use detached commits, failed frame fetches can retry, and only the Wrangler step receives the deployment token.How
packages/drive: validates service PIDs and tracks idle control sockets, with regression tests.apps/catalog: adds path-safe public asset resolution, exact Worker routing, retryable frame caching, deterministic parallel capture IDs, durable flow preview behavior, and committed-onlyHEADcapture preparation..github/workflows: separates build and deploy credential scopes while retaining post-deploy verification.Scope
Larger architectural findings such as artifact leases, atomic visible-instance registration, transactional capture publication, and renderer consolidation are intentionally excluded from this focused fix set.
Testing
bun run checkbun run testbun run build && bunx wrangler deploy --dry-runinapps/cataloggitleaks protect --redact --no-bannerFlow