The gate scanned only `*.md *.yml *.yaml *.json *.toml *.sh *.ts *.js`. A `postgres.env`, a `.container` quadlet, an `.ini`, or an extension-less dotfile — exactly the shapes the dotfiles tier is made of — was never read at all. Discovered while deciding what else belongs in `dotfiles/`: `~/.config` carries `containers/systemd/postgres.env` with a real `POSTGRES_PASSWORD`, which the ignore list did not cover either (`git check-ignore` says so: `.env` does not match `postgres.env`). Token SHAPES now scan the entire staged diff, every file type; bcrypt hashes and `Authorization: Basic` headers joined the shape list. Credential ASSIGNMENTS are scanned in non-prose files only — the auto-learned memory tier is prose *about* credentials (7 such hits measured on the tracked tree), and a gate that fires there gets overridden until it means nothing. Markdown keeps shape detection, which is what it had before. Three invariants, each pinned by a test in tests/secret-gate.bats (13 tests, black-box: the hook is copied into a scratch repo and git itself runs it): - Fail closed. The first version of this rewrite passed `-I` to `git diff`, which is not valid there; the empty file list made every secret commit sail through, and a blind gate looks exactly like a clean tree. If the hook cannot read the staged diff it now refuses the commit. - Only ADDED lines can leak. The gate refused the redaction commit in this branch because the diff still carried the removed password — a gate that blocks the removal of a secret holds the leak hostage. - Path-valued variables (`…_FILE=`, `…_PATH=`) and placeholder/indirected values are not secrets, so the gate stays worth listening to. `.gitignore` quarantines `*.env` at any name, and gains the theme-media rule whose untracking lands in the next commit. `AGENTS.md` states the new contract. Refs #40
90 lines
2.6 KiB
Plaintext
90 lines
2.6 KiB
Plaintext
# ============================================================================
|
|
# Command-center repo: config in, state out.
|
|
# Everything ignored here is runtime state a running agent mutates constantly.
|
|
# Git history must mean "the configuration changed", not "the agent breathed".
|
|
# ============================================================================
|
|
|
|
# --- databases + sqlite sidecars (hot, binary, unbounded growth) -----------
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|
|
*.sqlite
|
|
*.sqlite3
|
|
|
|
# --- runtime state dirs -----------------------------------------------------
|
|
cache/
|
|
agent/cache/
|
|
logs/
|
|
run/
|
|
sessions/
|
|
terminal-sessions/
|
|
ssh-control/
|
|
remote-host/
|
|
|
|
# --- quarantined secrets: never tracked, ever ------------------------------
|
|
auth.json
|
|
**/auth.json
|
|
.env
|
|
**/.env
|
|
*.env
|
|
# `*.env` is the rule that matters: `.env` alone does not match `postgres.env`
|
|
# or `frank-job-hunt.env`, and those are the files that actually carry
|
|
# POSTGRES_PASSWORD / API keys on this fleet (issue #40).
|
|
trust.json
|
|
**/trust.json
|
|
*.pem
|
|
*.key
|
|
identity*
|
|
|
|
# --- dependency installs (regenerable from manifests) ----------------------
|
|
node_modules/
|
|
bun.lock
|
|
package-lock.json
|
|
|
|
# --- misc ephemera ----------------------------------------------------------
|
|
gpu_cache.json
|
|
last-changelog-version
|
|
.DS_Store
|
|
*.swp
|
|
*.tmp
|
|
|
|
# --- per-host runtime identity + caches (never config) ---------------------
|
|
agent/blobs/
|
|
install-id
|
|
puppeteer/
|
|
webcache/
|
|
|
|
# --- local backups + staging artifacts: kept on disk, never in history -----
|
|
.AGENTTRASH/
|
|
*.save
|
|
*.bak-*
|
|
|
|
# deploy quarantine — never tracked
|
|
.quarantine/
|
|
|
|
# harness runtime transcripts: local-only, may contain raw session secrets
|
|
agent/sessions/
|
|
|
|
# harness diagnostic report bundles (tarballs of logs + session state)
|
|
reports/
|
|
|
|
# --- agent runtime scratch: research runs, decode predictions, worktrees ----
|
|
autoresearch/
|
|
agent/predict/
|
|
local/
|
|
wt/
|
|
|
|
# --- per-worktree memory buckets: keyed on ephemeral worktree paths ---------
|
|
# A session run inside a git worktree mints a bucket named after the worktree
|
|
# path; the worktree is deleted, the bucket is orphan state, not config.
|
|
agent/memories/--home-blank-.omp-wt-*
|
|
|
|
# --- theme media: content the pipeline consumes, not configuration ---------
|
|
# 23 wallpapers, 80 MiB. Tracked until 2026-10-20; every clone of a config repo
|
|
# was carrying a library no diff can review. The files stay on disk because
|
|
# ~/.local/share/noctalia/wallpapers symlinks into here, and every filename
|
|
# carries its wallhaven ID, so a fresh box restores them with
|
|
# `curl -L -o <name> https://wallhaven.cc/w/<id>` + deploy.sh.
|
|
# Law: omp-docs/tools/dotfiles-deploy.md
|
|
dotfiles/noctalia/.local/share/noctalia/wallpapers/
|