chore: ignore .codex/ and stop shipping a plaintext Gitea credential in tracked docs #713

Closed
opened 2026-07-30 22:29:47 +02:00 by timothy · 0 comments
Owner

Done

What was done: Merged as PR #712 (main @ f9cbd15). Two hygiene changes, both surfaced while closing out #698:

  1. .gitignore gains .codex/. It is generated by codex exec as a machine-local mirror of the .claude hooks — byte-identical copies, including pretooluse-merge-consent.sh. Deliberately not tracked even though .claude/ is (17 files), because .codex/config.toml embeds a plaintext Gitea credential and absolute /Users/timothy/... paths: tracking it would leak the credential and would not be portable to another machine.
  2. docs/handoffs/rest-api.md:79 stopped inlining that same credential in a curl -u example; it now uses "$ETV_GITEA_BASICAUTH" like every other doc.

Root cause: Two independent causes, worth separating because only one is a mistake.

  • The .codex/ directory is generated tooling scaffolding that no rule covered — .gitignore predates the Codex plugin, so nothing said what to do with it. It then blocked scripts/refresh-shared-checkout.sh (H13), which refuses on a dirty tree, leaving the shared checkout 13 commits behind.
  • The credential in docs/handoffs/rest-api.md was committed long ago as a convenience in a copy-pasteable curl line. It is the documented default password from the global CLAUDE.md, on a private LAN instance, so severity is low — but a tracked file is the wrong place for it regardless.

Files changed: .gitignore, docs/handoffs/rest-api.md.

Deferred:

  • Git history is NOT purged. The credential literal still appears in 12 earlier commits and remains recoverable from them. Purging would need filter-repo + force-push on a repo with active worktrees and open PRs, and would still not contain a value that also lives in the global CLAUDE.md. Rotating the password is the cheaper and more effective fix, and is an operator decision — deliberately not taken unilaterally.
  • The .codex/ ↔ PROTECTED merge-gate gap is not fixed here; split to #711 because the better fix may be deriving that path list rather than extending it.

Follow-up issues:

  • #711 — .codex/ mirrors the gate-enforcing hooks but is absent from the merge gate's PROTECTED list (latent while untracked; live the moment anyone tracks it).

Docs updated: docs/handoffs/rest-api.md (the redaction itself). No vault or skill impact — this is repo-local hygiene, not homelab operational knowledge, and the ersatztv skill does not cover the merge gate or repo tooling. CLAUDE.md was separately corrected in PR #710 for the #698 Renovate rule change.

Verification: the credential literal is now absent from every tracked file on main (git grep returns nothing); .codex/ is ignored and preserved locally (15 files intact); scripts/refresh-shared-checkout.sh subsequently fast-forwarded the shared checkout 13 commits to f9cbd15 with a clean tree. PR #712 had green CI and an explicit MERGEABLE verdict — it is not docs-only, so it correctly required a real verdict rather than the automatic exemption.

## Done **What was done**: Merged as PR #712 (`main` @ `f9cbd15`). Two hygiene changes, both surfaced while closing out #698: 1. `.gitignore` gains `.codex/`. It is generated by `codex exec` as a machine-local mirror of the `.claude` hooks — byte-identical copies, including `pretooluse-merge-consent.sh`. Deliberately **not** tracked even though `.claude/` is (17 files), because `.codex/config.toml` embeds a plaintext Gitea credential and absolute `/Users/timothy/...` paths: tracking it would leak the credential and would not be portable to another machine. 2. `docs/handoffs/rest-api.md:79` stopped inlining that same credential in a `curl -u` example; it now uses `"$ETV_GITEA_BASICAUTH"` like every other doc. **Root cause**: Two independent causes, worth separating because only one is a mistake. - The `.codex/` directory is *generated tooling scaffolding* that no rule covered — `.gitignore` predates the Codex plugin, so nothing said what to do with it. It then blocked `scripts/refresh-shared-checkout.sh` (H13), which refuses on a dirty tree, leaving the shared checkout 13 commits behind. - The credential in `docs/handoffs/rest-api.md` was committed long ago as a convenience in a copy-pasteable `curl` line. It is the documented default password from the global `CLAUDE.md`, on a private LAN instance, so severity is low — but a tracked file is the wrong place for it regardless. **Files changed**: `.gitignore`, `docs/handoffs/rest-api.md`. **Deferred**: - **Git history is NOT purged.** The credential literal still appears in **12 earlier commits** and remains recoverable from them. Purging would need `filter-repo` + force-push on a repo with active worktrees and open PRs, and would still not contain a value that also lives in the global `CLAUDE.md`. **Rotating the password is the cheaper and more effective fix**, and is an operator decision — deliberately not taken unilaterally. - The `.codex/` ↔ `PROTECTED` merge-gate gap is **not** fixed here; split to #711 because the better fix may be deriving that path list rather than extending it. **Follow-up issues**: - #711 — `.codex/` mirrors the gate-enforcing hooks but is absent from the merge gate's `PROTECTED` list (latent while untracked; live the moment anyone tracks it). **Docs updated**: `docs/handoffs/rest-api.md` (the redaction itself). No vault or skill impact — this is repo-local hygiene, not homelab operational knowledge, and the `ersatztv` skill does not cover the merge gate or repo tooling. `CLAUDE.md` was separately corrected in PR #710 for the #698 Renovate rule change. **Verification**: the credential literal is now absent from every tracked file on `main` (`git grep` returns nothing); `.codex/` is ignored and preserved locally (15 files intact); `scripts/refresh-shared-checkout.sh` subsequently fast-forwarded the shared checkout 13 commits to `f9cbd15` with a clean tree. PR #712 had green CI and an explicit `MERGEABLE` verdict — it is not docs-only, so it correctly required a real verdict rather than the automatic exemption.
timothy added the ad-hocpriority: lowsecurity labels 2026-07-30 22:29:57 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#713