Skip to content

chore: ignore loose password/credential scratch files at any depth - #434

Merged
JasonYeYuhe merged 1 commit into
mainfrom
ignore-loose-credential-files
Aug 15, 2026
Merged

chore: ignore loose password/credential scratch files at any depth#434
JasonYeYuhe merged 1 commit into
mainfrom
ignore-loose-credential-files

Conversation

@JasonYeYuhe

Copy link
Copy Markdown
Collaborator

The gap

A 44-byte pw5523.txt has been sitting untracked at the repo root since 2026-08-07 — the same day one git add -A published 176 files to this public repo. It shows up as ?? in every git status, so any future add -A or a careless add . takes it.

Nothing in the existing credential block matched it. Every pattern there targets key material by extension:

*.p8  *.p12  *.pfx  *.jks  *.keystore  *.key  *.mobileprovision  AuthKey_*

pw5523.txt is a .txt. It sailed straight through.

Not root-anchored, on purpose

This file already records why, a few blocks down: the 2026-07-31 internal-docs patterns were written root-anchored "so docs/ content is unaffected", and that is exactly what let 49 files under docs/ through on 08-07. Repeating that mistake in the credential block would be worse.

Verified to fire, not merely to pass

check result
catches the real pw5523.txt .gitignore:44
docs/pw1.txt ✅ ignored
CLI Pulse Bar/passwords.txt ✅ ignored
backend/my_password.txt ✅ ignored
helper/aws-credentials.json ✅ ignored
deep/a/b/secrets2.txt ✅ ignored
shadows anything already tracked? nogit ls-files match set is empty

That last row matters as much as the others: an ignore rule that covers a tracked file leaves it tracked but silently un-re-addable after any move, which is a trap that surfaces months later.

pw5523.txt itself is untouched on disk — this only stops it being swept into a commit. Relocating it to the out-of-repo secrets directory is the owner's call.

🤖 Generated with Claude Code

A 44-byte `pw5523.txt` sat untracked at the repo root from 2026-08-07 to
2026-08-15 — created the same day one `git add -A` published 176 files to this
PUBLIC repo. Nothing in the existing credential block matched it, because every
pattern there targets key material by extension (*.p8, *.p12, *.key, AuthKey_*)
and this is a .txt.

Deliberately NOT root-anchored, for the reason already recorded further down in
this file: the 2026-07-31 internal-docs block was written root-anchored "so
docs/ content is unaffected", and that is precisely what let 49 files under
docs/ through on 08-07.

Verified to FIRE rather than merely to pass:
  - catches the real pw5523.txt (`git check-ignore` -> .gitignore:44)
  - catches synthetic files at depth: docs/pw1.txt, "CLI Pulse Bar/passwords.txt",
    backend/my_password.txt, helper/aws-credentials.json, deep/a/b/secrets2.txt
  - shadows NOTHING already tracked (`git ls-files` match set is empty), so no
    tracked file silently becomes un-re-addable later

The file itself is left alone on disk — this only stops it being swept into a
commit. Moving it to the out-of-repo secrets directory is the owner's call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 05:10

Copilot AI 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.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JasonYeYuhe
JasonYeYuhe merged commit b87fff5 into main Aug 15, 2026
3 checks passed
@JasonYeYuhe
JasonYeYuhe deleted the ignore-loose-credential-files branch August 15, 2026 05:14
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