Home / Security tooling

cc-plugin-lock

Lock file for Claude Code plugins: pins plugins and skills to content hashes and verifies them before load.

Python · MIT · latest v0.3.0

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.

Releases

Posts about it

More in Security tooling

All tools

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