Allow File (.envshed-allow)
Exceptions for the hooks installed by envshed agent install, for strings and files that are not secrets but keep getting blocked.
It holds patterns, and it is meant to be committed. A line with no wildcard is ignored, and so is a line that itself looks like a secret.
Location
The hooks and envshed scan use the nearest .envshed-allow, walking up from the working directory. The search stops at the Git repository root or at your home directory, whichever comes first, and reads the file in that directory too. So ~/.envshed-allow applies to directories under your home that are not in a Git repository and have no closer file.
Directories above your home, such as /Users or /tmp, are never searched, because other users can write there. Outside your home and outside a Git repository, only the working directory itself is searched. A file owned by another user is ignored wherever it is (this check is skipped on Windows).
Format
One entry per line. Lines starting with # are comments.
# Our record ids look random but are not secrets
rec_*
# Skip one detection rule everywhere in this repository
rule:high-entropy
# A fixture with fake values that the agent may read
path:tests/fixtures/.env.test
path:.env.ci
| Entry | Applies to | Meaning |
|---|---|---|
<pattern> | Prompts | Do not block a detected string that matches. Must contain * (any text) or ? (one character) and match the whole string. |
rule:<id> | Prompts | Turn off one detection rule. The block message names the rule, such as github-token, phrase, assignment or high-entropy. |
path:<glob> | Tool calls | Let the agent read this .env file. Matches the path as written in the tool call, or the file name. |
envshed scan also uses <pattern> and rule:<id> for known token formats. They do not apply to values from your vault.
path: never applies to ~/.envshed/config.json, which holds the CLI token.
Good to know
- An agent can edit this file like any other, so review changes to it. See the limits of the hooks.
- To let one prompt through without changing anything, add
envshed:allowto it instead.