---
id: scan-secret-files
track: coding
version: 0.1.1
label: blocks
keyword: block
where: write turn-end
sha256: a2c51f9ff2b9f0d51b5b70f6b56ef459d552333cb6b6a91a52d83df85f698c3a
source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/scan-secret-files
catalog_ref: 1e60d211c1bb767152c6ab0167932da06ab3a10f
---

# Scan Secret Files

scan-secret-files · version 0.1.1

Blocks — Blocks on an agent's file writes and at turn end. Chock adds friction. It is not a security boundary. 

In a git repo: at commit (Chock refuses the commit, locally and in CI.)



## What it does

Friction, not a security boundary: flags files that are secrets by name or content -- private keys and key stores, Google service-account/OAuth JSON, kubeconfig users, AWS, npm, PyPI, netrc, git, pgpass, docker, Composer, NuGet, Maven credentials, tfstate/tfvars, non-template .env, framework secret files, browser stores. Blocks; encrypted keys, notebook outputs and test, fixture, example, doc, lock and eval paths ask. Misses: renamed binary stores other than PKCS#12/JKS/DER, unlisted secret names, values split or encoded.

## Its label on each agent

- Claude Code (tested): Blocks — Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=claude-code&p=scan-secret-files
- Cursor (tested): Blocks — Blocks on an agent's file writes and at turn end. Where its description says it asks, it refuses at both points, because this client cannot prompt at either point. Builder: /coding/builder/#client=cursor&p=scan-secret-files
- Codex (tested): Blocks — Blocks on an agent's file writes and at turn end. Where its description says it asks, it refuses at both points, because this client cannot prompt at either point. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run). Builder: /coding/builder/#client=codex&p=scan-secret-files
- GitHub Copilot (tested): Blocks — Blocks at turn end only. It does not check a file write when it happens. Where its description says it asks, it refuses at turn end, because this client cannot prompt there. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run). Builder: /coding/builder/#client=copilot&p=scan-secret-files
- Devin (tested): Blocks — Blocks at turn end only. It does not check a file write when it happens. Where its description says it asks, it refuses at turn end, because this client cannot prompt there. If the hook errors, the action goes through (vendor docs only, not witnessed). Builder: /coding/builder/#client=devin&p=scan-secret-files
- Grok (tested): Not graded yet for Grok. Builder: /coding/builder/#client=grok&p=scan-secret-files
- goose (tested): Not graded yet for goose. Builder: /coding/builder/#client=goose&p=scan-secret-files
- Antigravity (tested): Not graded yet for Antigravity. Builder: /coding/builder/#client=antigravity&p=scan-secret-files
- OpenHands (untested): Not graded yet for OpenHands. Builder: /coding/builder/#client=openhands&p=scan-secret-files
- Kimi Code (untested): Not graded yet for Kimi Code. Builder: /coding/builder/#client=kimi-code&p=scan-secret-files
- Factory Droid (untested): Not graded yet for Factory Droid. Builder: /coding/builder/#client=factory-droid&p=scan-secret-files

## What it misses

Renamed binary stores other than PKCS#12/JKS/DER, unlisted secret names, values split or encoded.

## Examples

- Refused: A kubeconfig with an inline user token is committed.
- Allowed: A file already in HEAD with a token gains an unrelated comment.

## Latest change

0.1.1 · 2026-10-07 — Promoted from draft to production: every test case ran and passed, and no bug report was open. Behaviour unchanged.

## Provenance

- Tested by 25 of 25 cases run automatically
- SHA-256: `a2c51f9ff2b9f0d51b5b70f6b56ef459d552333cb6b6a91a52d83df85f698c3a`
- Catalog commit: https://github.com/open-coder-ai/chock-catalog/commit/1e60d211c1bb767152c6ab0167932da06ab3a10f
- Source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/scan-secret-files (catalog path `base/scan-secret-files`)
- Presets: Secrets
- JSON: `/api/coding/policies/scan-secret-files.json`
- Report a problem: https://chock.sh/report/?policy=scan-secret-files&version=0.1.1&page=%2Fcoding%2Fpolicies%2Fscan-secret-files%2F
