Skip to content

Security & secret guard

A built-in guard that stops secrets, keys, env files, and your own private data from ever being committed or published — across all content, every time.

cckit’s guard checks code, docs, the cookbook, examples, and templates. It runs in the local gate and as a pre-commit hook, so a leak is caught before it leaves your machine.

  • Forbidden files — .env* (including .env.example), *.pem / *.key / keystores, id_rsa, .netrc, *.tfvars, project id dumps.
  • Secret content — provider key prefixes, private-key blocks, JWTs, and secret-looking assignments. Placeholders like <...>, ${...}, and YOUR_… are allowed.
  • Your private terms — a denylist you control (below).

Nothing project-specific is hardcoded in cckit. You declare what is private to you.

  1. Copy the example into the state directory (the target is gitignored). secret-guard.sh reads the one shared .cckit/ for the whole repository, so a plain relative cp run from a worktree writes a file the scan never reads — and it would ignore KIT_STATE_DIR. Let the resolver name the destination:

    Terminal window
    # works from the primary checkout and from any worktree, and honors KIT_STATE_DIR
    d="$(git rev-parse --git-common-dir)"; case "$d" in /*) ;; *) d="$PWD/$d" ;; esac
    d="${KIT_STATE_DIR:-$(cd "$d/.." && pwd)/.cckit}"
    mkdir -p "$d" && cp privacy-denylist.example "$d/privacy-denylist"

    From the primary checkout with no override, that is just .cckit/privacy-denylist.

  2. List your terms — org names, hosts, emails, anything private to you, one per line.

  3. Commit something — the guard fails if any term appears in a tracked file.

cckit ships the list empty — it never guesses what is yours.

The guard runs in two places:

WhereWhat it isHow to enable
Local gatescripts/check.shRuns as part of the check suite
Pre-commit hookgithooks/pre-commitgit config core.hooksPath githooks

A finding blocks the commit. The guard is not optional and is not bypassed by the permission consent described in Config & permissions.

Open a private security advisory on the repository (Security → Advisories), or a regular issue if it is low-risk. Do not include secrets or exploit details in a public issue.

Independent, educational project — not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic PBC.Disclaimer & trademarks ·

From Mexico withloveby josegtz