Skip to content

Redact home paths from this public repo, and add a test so it cannot recur - #178

Merged
androidand merged 1 commit into
mainfrom
redact-home-paths
Oct 1, 2026
Merged

androidand merged 1 commit into
mainfrom
redact-home-paths

Conversation

@androidand

Copy link
Copy Markdown
Owner

This repository has been public since it was created (2026-06-17). It accumulated real local paths and nothing re-checked for two months.

How it happened

Not carelessness in one place — a process that decays:

when what
2026-07-25 a launch-readiness change scanned for credential prefixes, /Users/<name> and 192.168., recorded "no matches", and closed the question. That scan was true when it ran.
2026-07-31 cross_repo_test.go added with real absolute paths as test fixtures. Six days later. Fixtures read as code, which is exactly what a scan-then-stop misses.
2026-09-17 an archived proposal carried two real worktree paths in illustrative JSON.
+2 months nothing re-checked.

The scan was correct and the repo still leaked. That is the finding: a manual scan recorded as complete is not a check.

Redacted — 5 occurrences, 3 files

  • cross_repo_test.go — the two fixtures now use /home/user/dev/..., matching the generic style already on the next line. The test exercises path-to-repo-name extraction, not these particular directories, so its intent is unchanged and it still passes.
  • archive/2026-09-17-agent-topology-command/proposal.md — two illustrative paths in the work-item JSON.
  • archive/2026-07-25-launch-readiness/proposal.md — the scan record keeps what it searched for, writing the shape as /Users/<name> rather than the literal username.

The durable part

TestNoPrivateDataInPublicRepo, run by go test ./... — which ci.yml already invokes. So it cannot be skipped by forgetting a CI step, and it fails locally too.

Flags /Users/<lowercase-name>, RFC1918 dotted quads, and credential prefixes. Placeholders like /Users/<name> and prose such as "192.168." are deliberately not matched, so documentation can still describe the shape of a path.

Confirmed it goes red against a re-introduced home path and against an injected ghp_ token. Full suite: 852 passed.

Not done here, and it needs a decision

History still contains the paths. This rewrites the working tree only. Purging 2 months of history on a public repo is destructive and would break every PR reference and commit SHA anyone holds.

Worth weighing before doing it: the exposed material is a macOS username, four private repo names, and two worktree paths. No credentials and no private IP literals are in the history — I checked. So the sensitivity is low and the cost of a rewrite is high.

Your call. If you want it purged, git filter-repo is the right tool and it should be done as a deliberate, separately-communicated event rather than folded into a redaction PR.

Unrelated but adjacent

ci.yml runs on ubuntu-latest, so this repository's CI is also currently blocked by the account-wide Actions billing failure. That is why the 852 tests above were run locally.

…recur

This repository has been PUBLIC since it was created on 2026-06-17.

How it happened, from the history:

- 2026-07-25 — a launch-readiness change ran a scan for credential prefixes,
  /Users/<name> and 192.168., recorded "no matches", and closed the question.
  That scan was TRUE when it ran.
- 2026-07-31 — cross_repo_test.go was added with real absolute paths as test
  fixtures. Six days after the scan. Test fixtures read as code, so it is
  exactly the content a scan-then-stop misses.
- 2026-09-17 — an archived proposal carried two real worktree paths in its
  illustrative JSON.
- Nothing re-checked for the following two months.

Redacted (5 occurrences, 3 files):

- cross_repo_test.go: the two fixtures now use /home/user/dev/..., matching
  the generic style already on the next line. The test exercises
  path-to-repo-name extraction, not these particular directories, so its
  intent is unchanged.
- archive/2026-09-17-agent-topology-command/proposal.md: two illustrative
  paths in the work-item JSON.
- archive/2026-07-25-launch-readiness/proposal.md: the scan record keeps what
  it searched for but writes the shape as /Users/<name>.

Also adds TestNoPrivateDataInPublicRepo, run by `go test ./...` — which ci.yml
already invokes, so it cannot be skipped by forgetting a step, and it fails
locally too. It flags /Users/<lowercase-name>, RFC1918 dotted quads, and
credential prefixes. Placeholders like /Users/<name> and prose such as
"192.168." are not matched, so documentation can still describe the shape.

The point is not the redaction, it is that a manual scan recorded as complete
drifted within a week. A check that only runs when someone remembers is not a
check.

Confirmed the test fails against a re-introduced home path and against an
injected ghp_ token. Full suite: 852 passed.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specsync with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0e3589
Status: ✅  Deploy successful!
Preview URL: https://a2b4be4c.specsync.pages.dev
Branch Preview URL: https://redact-home-paths.specsync.pages.dev

View logs

@androidand
androidand merged commit c7fc2e4 into main Oct 1, 2026
2 checks passed
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