ccvet
A risk-classifying permission gate for Claude Code.
ccvet is a PreToolUse hook that auto-approves low-risk tool calls, hard-blocks dangerous ones, and only asks you about the genuinely ambiguous middle. Most of that classification happens with plain rules and heuristics, not a model call. For the leftover gray zone, you can optionally point it at any local LLM server (Ollama, LM Studio, vLLM) for a second opinion, without ever giving that model the power to block anything on its own.
Status: early, published and installable, but new. Expect rough edges (see the badge above for the current version). See Docs/PLAN.md for the build plan and Docs/risk-taxonomy.md for the full rule set.
Contents
- Why this exists
- How it works
- Install
- Seeing what ccvet decided
- Tuning the policy
- Layer 2: an optional LLM second opinion
- Uninstalling
- Security model and limitations
- Contributing
- License
Why this exists
Claude Code's permission prompts protect you, but on a busy session the constant "allow this?" for obviously safe commands (git status, cat, ls) trains people to stop reading them. The next prompt that actually matters gets approved on autopilot too.
ccvet front-loads a deterministic, rule-based engine that handles the overwhelming majority of tool calls with zero model calls at all, and only escalates genuinely ambiguous actions to an optional local model or to you. The goal is fewer prompts overall, so the ones that remain are worth reading.
How it works
Four layers, evaluated in order:
- Hard-coded safety guards. Things like
rm -rf /,sudo,git push --force, credential-file access, and obfuscated or piped-to-shell commands are always blocked. No configuration, LLM opinion, or user override can bypass this layer. It is the floor everything else sits on. - Program allow and ask lists. Read-only commands (
ls,cat,git status,git log, and so on) are auto-approved. Mutating-but-reversible commands (git commit,npm install,docker build) ask by default. This list ships in a plain YAML file you can extend. - Your own policy rules. Once you've reviewed a specific command and decided it's fine, promote it with one command (
ccvet allow) so you never get asked about it again. These rules can loosen or further restrict ccvet's own defaults, but they can never override layer 1. - Optional LLM classifier. For anything left in the gray zone, point ccvet at a local model server for a second opinion. It can only promote a command toward "allow". It can never produce a "deny", so a misconfigured or hallucinating model can't block your agent's work.
Full detail, including the exact command-by-command classification table, is in Docs/risk-taxonomy.md.
Install
pip3 install ccvet
ccvet init
Or, to track the repo directly instead of PyPI:
pip3 install git+https://github.com/saicharansreedhara2/ccvet.git
ccvet init
ccvet init wires the PreToolUse hook into your project's .claude/settings.json (or ~/.claude/settings.json with --global), merging into any hooks you already have rather than overwriting them.
Seeing what ccvet decided
Claude Code does not show a hook's reason in the normal chat transcript for auto-approved ("allow") actions, only for blocks and escalations. To see ccvet's reasoning for every decision, including allows, in real time, run Claude Code with:
claude --debug
Otherwise, use ccvet's own audit log:
ccvet log --tail 20
That gives a human-readable record of every decision ccvet has made, regardless of whether you're in debug mode. ccvet status summarizes the overall state: which hooks are wired, which policy files exist, whether Layer 2 is configured, and how large the audit log has grown.
Tuning the policy
ccvet check "docker build ." # see what ccvet would decide, without running it for real
ccvet allow "docker build ." # promote it to allow after you've reviewed it
ccvet policy edit # hand-edit the project's .ccvet/policy.yaml directly
Your rules can only loosen, or further restrict, ccvet's own judgment-call defaults. They can never bypass a hard-coded safety guard like rm -rf / or git push --force, even if you explicitly try to allow one.
Layer 2 (optional): an LLM second opinion on the gray zone
For commands that don't match any rule at all, point ccvet at any OpenAI-compatible local model server:
ccvet config set classifier.base_url http://localhost:11434/v1
ccvet config set classifier.model <your-model-name>
ccvet init also auto-detects a running Ollama or LM Studio server and offers to wire it up for you. Layer 2 is advisory in one specific direction only: it can promote a gray-zone command to "allow", but it can never turn anything into a "deny". The hard-coded safety guards keep exclusive authority to block, so a misconfigured or hallucinating local model cannot unilaterally stop your agent from working. If Layer 2 is unreachable, times out, or returns something that doesn't parse, ccvet simply falls back to asking you, exactly as if Layer 2 were never configured.
Uninstalling
ccvet uninstall
Removes only ccvet's own hook entry from .claude/settings.json (or ~/.claude/settings.json with --global), leaving any other hooks you've configured untouched.
Security model and limitations
ccvet is a heuristic and optional-LLM advisory gate, not a sandbox. It reduces the chance of an obviously destructive command slipping through on autopilot. It does not replace running Claude Code with least-privilege permissions, in a container, or on a disposable machine for anything you don't fully trust. See SECURITY.md for the full threat model and known gaps.
Contributing
Issues and pull requests are welcome, especially new entries for the risk taxonomy (a command you think should be classified differently, or a pattern that's missing entirely). See CONTRIBUTING.md.
License
MIT. See LICENSE.
Metadata
Release files for ccvet 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ccvet-0.1.1.tar.gz | 106.0 kB | With provenance | Details for ccvet-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ccvet-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ccvet-0.1.1-py3-none-any.whl |
Total release size: 150.5 kB
Release files / ccvet-0.1.1.tar.gz
| Download URL | ccvet-0.1.1.tar.gz |
|---|---|
| Size | 106.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
719641de30f85968b83d25e6b802c7391e974f519c4e545960082a5d85f4f260
|
|
BLAKE2b-256 checksum How to use checksums |
64cd92ebfdde198e9fcfaf05fe26ade5234cde983a3e05386d57e9ecb53b318f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / ccvet-0.1.1-py3-none-any.whl
| Download URL | ccvet-0.1.1-py3-none-any.whl |
|---|---|
| Size | 44.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb83d87a8fabbbd6acc50d7e76e80ebaeb2cd0a19a5508239db21e5681f437fc
|
|
BLAKE2b-256 checksum How to use checksums |
103d46c682b9b4abbfbba4b0c7810fa3b015361096e29d09485342571da0a8ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for ccvet 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ccvet-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.