Skip to main content
A reference for the terms used throughout the CC Safety Net documentation. If a word in another page is unfamiliar, check here first.

Core concepts

TermDefinition
PreToolUse hookA hook that runs before a tool executes. CC Safety Net registers as a PreToolUse hook (or the equivalent event on each agent) to intercept shell commands before they run. See How It Works.
Fail-closedWhen analysis fails, config is invalid, or input cannot be parsed, the command is blocked rather than allowed. Deny is the safe default. See Design Principles and Security Model.
SegmentA single command split from a compound command by shell operators (&&, ||, |, ;, newline). Each segment is analyzed independently; if any segment is blocked, the whole command is denied.
Analysis engineThe platform-agnostic core that parses a command string and decides whether to block it. Every agent integration feeds the same engine. See Analysis Engine.

Command forms

TermDefinition
Shell wrapperA shell command that wraps another command, such as bash -c 'git reset --hard'. CC Safety Net recursively analyzes wrapped commands up to 10 levels deep.
Interpreter one-linerA command like python -c 'import os; os.system("rm -rf /")' that executes code inline. Detected and analyzed for dangerous patterns by default.
Dynamic substitutionShell command substitution $(...), process substitution <(...), or variable expansion $VAR. Segments containing these are flagged because their output cannot be predicted at analysis time.

rm and paths

TermDefinition
CWD self-targetAn rm -rf target that resolves to the current working directory itself (for example rm -rf .). Always blocked.
Effective cwdThe working directory tracked across cd and pushd commands within a compound command. Used for rm -rf target classification and worktree detection.
Within-cwd targetAn rm -rf target that resolves inside the current working directory. Allowed by default; blocked under paranoid rm mode.

Modes

TermDefinition
Strict modeFail-closed on commands that cannot be tokenized (unterminated quotes, malformed wrappers). Enabled via CC_SAFETY_NET_STRICT=1. See Modes.
Paranoid modeStricter checks enabled via CC_SAFETY_NET_PARANOID=1. Blocks non-temp rm -rf within cwd and interpreter one-liners. Individual toggles: CC_SAFETY_NET_PARANOID_RM, CC_SAFETY_NET_PARANOID_INTERPRETERS.
Worktree relaxationWhen CC_SAFETY_NET_WORKTREE=1 is set, local git discard commands are allowed inside confirmed linked git worktrees, because changes there are disposable.

Rules

TermDefinition
RulebookA JSON file containing a collection of custom blocking rules, fixtures, and metadata. Loaded from local directories or GitHub sources. See Custom Rules.
PolicyThe loaded set of rules from user and project scopes, merged with overrides. Produced by the rulebook policy system.
LockfileA JSON file (rule.lock) tracking rulebook source digests and cached content. Used to detect stale or tampered rulebooks.
Looking for the formal schemas for rulebooks, rules, fixtures, and lockfiles? See the Custom Rules reference. For the JSON shape returned by explain --json, see the Explain trace reference.
Last modified on June 22, 2026