PII - alexherrero/agentm GitHub Wiki
AgentM is a public repo. You must keep personal information out of it. This includes real email addresses, personal file paths, API keys, phone numbers, and private names. A layered guardrail protects your code. You use safe stand-ins while you write. You run an on-demand scan before you commit. A hard block stops you before every push. A final scan runs in CI. This page lists what to avoid and shows you how to check.
| Don't commit | Use instead |
|---|---|
| Email addresses | the GitHub handle alexherrero, or @example.com / @example.org (RFC 2606) for fakes in docs |
Personal paths β /Users/<name>/, C:\Users\<name>\, /home/<name>/
|
a <your-user>/ placeholder, or $HOME
|
API keys / tokens β sk-β¦, gho_β¦, ghp_β¦, glpat-β¦, AKIAβ¦
|
<API_KEY> |
| Phone numbers |
555-0100β555-0199 (reserved for fiction) |
| Private project names, internal hostnames, IP addresses | anything already public |
Three layers keep personal information out. They range from interactive checks to absolute blocks.
| Layer | What it is | When it fires |
|---|---|---|
pii-scrubber skill |
the agent-facing interactive layer, from the sibling crickets install | An agent runs it before a commit or push: it shows findings by file:line, offers redactions, and loops until clean. |
| Pre-push git hook |
templates/hooks/pre-push β copy it in once: cp templates/hooks/pre-push .git/hooks/ && chmod +x .git/hooks/pre-push
|
On every git push. Scans the push range (or the whole tree for a new branch) and blocks the push before it leaves your machine. |
CI gate (pii-guardrails) |
check-no-pii.sh --all + gitleaks, in the Linux CI job |
Every PR (and manual workflow_dispatch/full-battery runs), server-side β a plain push to main runs only the lightweight syntax job under the worktree-native flow (ratified 2026-07-06). A hit on a PR blocks the merge β the backstop you can't skip there. |
bash scripts/check-no-pii.sh --all # the whole working tree (what CI runs)
bash scripts/check-no-pii.sh --staged # only staged changes
bash scripts/check-no-pii.sh --diff origin/main..HEAD # a git range (what the pre-push hook runs)
gitleaks detect --source . --config .gitleaks.toml # the secret scanThe scanner may flag a false positive. This happens when a doc example looks like PII but is not.
-
Rephrase to dodge the match. Use
[email protected],555-0100, or<API_KEY>. This is the right fix. -
Allowlist the value if it must look real. You might need this when you test the scanner itself. Add the value to
ALLOWLIST_PATTERNS=inscripts/check-no-pii.sh. You can also add it to[allowlist].regexesor.pathsin.gitleaks.toml. Add a comment explaining your reason. Note the reason in your commit message. The scanner has no silent suppression.
-
CI gates β The
pii-guardrailsgate backstops the scan. - Repo layout β The guardrail scripts and hooks live here.
Reference Β· Architecture Β· Home