Skip to content

A live key was sitting in an unignored log; .bak files were unignored too - #56

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/gitignore-bak-and-logs
Aug 3, 2026
Merged

A live key was sitting in an unignored log; .bak files were unignored too#56
ThinkOffApp merged 1 commit into
mainfrom
fix/gitignore-bak-and-logs

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Found on the Mini while checking it for the hole #55 found on the MacBook. Different file, same shape.

A live key was in an untracked file

logs/start-all.out was untracked, unignored, and contained a live xfb_ agent key. *.log did not cover it because start-all writes .out. This is a clone of a public repo, so one git add -A publishes it.

Alongside it, 14 backup files were equally unignored:

README.md.bak                              CHANGELOG.md.bak
bin/cli.mjs.bak                            src/config.mjs.bak
src/background.mjs.bak                     src/actions.mjs.parallel-bak
src/confirmations.mjs.bak_20260704-183213  src/confirmations.mjs.live-bak.20260621
scripts/start-all.sh.bak_prehardening_20260709   ...and 5 more

The existing *.bak.* rule requires a dot after bak. So it matches foo.bak.1 and silently does not match plain foo.bak anywhere outside config/. The cp-before-edit habit that produced these is a good one — it is the ignore rules that never matched the names it actually produces.

Verification

Tested against the real filenames found on disk, not invented ones. All 15 are now ignored:

file rule
README.md.bak *.bak
scripts/claude-gui-wake.sh.bak_20260707 *.bak_*
src/actions.mjs.parallel-bak *-bak
src/confirmations.mjs.live-bak.20260621 *-bak.*
logs/start-all.out logs/
foo.bak.1 *.bak.* (existing rule, still works)

And confirmed not caught: src/confirmations.mjs, README.md, package.json, bin/cli.mjs.

Independent of #55

Deliberately appended rather than edited in place, leaving the existing config block untouched, so this does not collide with #55's config/*.env insertion. The two PRs are independent and merge in either order — verified by keeping my diff to pure additions at the end of the file.

The pattern, three times in one day

This is the third instance of one defect shape: a rule written for one variant, correct for that variant, never extended to its neighbour.

  1. CodeWatch: thinkoff_green corrected to a light value while thinkoff_green_light kept the dark one, across 21 call sites.
  2. IAK: config/*.json protecting .json in that directory but not .env.
  3. IAK: *.bak.* protecting foo.bak.1 but not foo.bak.

In all three the original rule stayed correct, so nothing failed where anyone was looking. Worth a habit: when writing a rule that names a variant, ask what its siblings are called.

Not addressed here

scripts/claudemm-uik-daemon.sh is untracked in the Mini clone and contains machine-specific paths. It should not live in this repo at all, but removing it is petrus's call and not a .gitignore matter.

🤖 Generated with Claude Code

Found on the Mini while checking it for the hole claudeMB found on the
MacBook. Different file, same shape.

logs/start-all.out was untracked, unignored, and CONTAINED A LIVE xfb_
agent key. `*.log` did not cover it because start-all writes .out. In a
clone of a public repo, one `git add -A` publishes it.

Alongside it, 14 backup files were equally unignored. The existing
`*.bak.*` rule requires a dot AFTER "bak", so it matches "foo.bak.1" and
silently does not match plain "foo.bak" anywhere outside config/. The
cp-before-edit habit that produced them is a good one - it is the ignore
rules that did not match the names it actually produces.

Verified against the real filenames rather than invented ones: every one
of the 15 is now ignored, and src/, README.md, package.json and bin/ are
confirmed still tracked.

Deliberately appended rather than edited in place, leaving the existing
config block untouched, so this does not collide with #55 (config/*.env).
The two are independent and merge in either order.

Third instance today of one defect shape: a rule written for one variant,
correct for that variant, never extended to its neighbour. thinkoff_green
fixed while thinkoff_green_light kept the dark value; config/*.json
protecting .json but not .env; *.bak.* protecting foo.bak.1 but not
foo.bak.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef69e97c35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitignore
# A log is a plausible place for a key to land: the file that prompted this
# was logs/start-all.out on the Mini, which contained a live xfb_ agent key.
logs/
*.out

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict the global .out ignore to run logs

When a contributor adds a legitimate .out artifact, such as an expected-output test fixture, this root-level wildcard silently excludes it from every directory. The preceding logs/ rule already covers the cited logs/start-all.out credential leak, and a repo-wide search found no other run-log location that requires ignoring all .out files, so this should be scoped to the log directory or the specific generated file.

Useful? React with 👍 / 👎.

@ThinkOffApp
ThinkOffApp merged commit 99c6bf0 into main Aug 3, 2026
3 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.

2 participants