cc-plugin-lock
Lock file for Claude Code plugins: pins plugins and skills to content hashes and verifies them before load.
What it is
cc-plugin-lock pins Claude Code marketplace plugins and skills to content hashes and checks them at every session start, so a plugin that changes upstream cannot silently change what runs on your machine.
For developers and teams who install third-party Claude Code plugins and want the guarantee a package lock file gives: the plugin code that runs is the code you reviewed.
pipx install git+https://github.com/basitalisandhu/cc-plugin-lock
cc-plugin-lock lock -o ~/.claude/cc-plugins.lock.json --store
cc-plugin-lock verify --lock ~/.claude/cc-plugins.lock.json
After one line is added to a locked plugin's hook script (real output from the bundled example plugins):
$ cc-plugin-lock verify
STATUS SEVERITY PLUGIN DETAIL
-------------------------------------------
changed HIGH formatter@demo 1 file(s): hooks 1
unchanged - notes@demo
formatter@demo (HIGH):
modified HIGH hooks scripts/format.sh f09e6a07d63e -> e1aca517ceb5
Part of a set of Claude Code security tools: basitalisandhu.github.io, with agent-config-audit and claude-perm-sim.
Install
pipx install git+https://github.com/basitalisandhu/cc-plugin-lock
# 1. Lock what is installed now (review your plugins first; the lock records what you trust).
cc-plugin-lock lock -o ~/.claude/cc-plugins.lock.json --store
# 2. Any time later: has anything changed?
cc-plugin-lock verify --lock ~/.claude/cc-plugins.lock.json
# 3. Gate every session: print the hook block and merge it into ~/.claude/settings.json.
cc-plugin-lock hook --lock ~/.claude/cc-plugins.lock.json
From the README; see the full README for every option.
Links
Releases
Posts about it
- Gating Claude Code skills in CI with a pull request comment
A how-to for skill-scan-gate: block risky skills, hooks and MCP servers in pull requests, adopt it with a baseline, and read its sticky comment.
More in Security tooling
- agent-off-switch: Find every AI agent identity in Microsoft 365, AWS and GitHub, see what it can reach, and switch it off. Offline on saved exports.
- skill-scan-gate: CI gate for Claude Code skills and plugins, with SARIF output. GitHub Action and CLI.
- agent-threat-model: Threat modeling for AI agents: describe the system in YAML, get a STRIDE and OWASP Agentic threat model.
- agent-config-audit: Audit AI agent configuration files for security risks.
- agentic-semgrep-rules: Semgrep rules for AI agent code in Python, TypeScript and JavaScript.
- security-actions: GitHub Actions for AI agent and supply chain security checks.
- cc-hooks: Typed Python SDK and offline test runner for Claude Code hooks.
- claude-perm-sim: Claude Code permission rule simulator: shows which rule decides a tool call and where a rule set is permissive.
- llms-txt-gen: Generate llms.txt for any docs site or repository.
- scp-guardrails: Build AWS service control policies from a short spec and lint them for lockouts and statements that deny nothing.
- spotlighting: Spotlighting for prompt injection defence in Python: mark untrusted text before it reaches a model.
- llm-agent-control-plane: Deterministic policy enforcement for LLM agents.
Topics: agent-security, ai-agents, ai-security, claude-code, claude-code-plugins, cli, devsecops, hacktoberfest, hooks, integrity, lockfile, mcp, plugins, python, sarif, security-tools, skills, supply-chain-security