Skip to content

Claude Code plugin ​

The dagsec plugin puts dagsec between Claude Code and your package manager:

  • Blocks risky installs. Before an install command runs, each package is checked. A package that doesn't exist (a hallucinated or typosquatted name), or a version with critical or high vulnerabilities, is stopped, and Claude is told which version to use instead.
  • Answers "is this package safe?" Claude can check any package with the check_package tool: known vulnerabilities in a version, the release that fixes them, and a 0 to 100 health score.
  • Teaches Claude when to check. A skill tells Claude to check packages before adding them and how to act on the answer.

Install ​

  1. Create an API key.
  2. In Claude Code:
/plugin marketplace add hasanerman/dagsec-claude
/plugin install dagsec@dagsec
  1. Paste your API key when asked (it starts with dgs_ and is stored as a sensitive setting).
  2. Choose the mode: block (default) stops a risky install and tells Claude why; warn asks you before it runs.

Commands the hook checks ​

On both the Bash and PowerShell tools:

Package managerCommands
npmnpm install, npm i, npm add
Yarnyarn add
pnpmpnpm add, pnpm install, pnpm i
Bunbun add, bun install
pippip install, pip3 install, python -m pip install, python3 -m pip install
uvuv add, uv pip install
Poetry, PDMpoetry add, pdm add
Cargocargo add

Other commands are never sent to dagsec.

What the block looks like ​

dagsec blocked this install:
- [email protected] has 4 critical/high vulnerabilities (CVE-2019-10744, CVE-2021-23337, …). Install [email protected] or later instead.

Claude then installs the recommended version, or asks you. Without a version in the command, the latest release is checked.

Rules ​

CheckPersonal (no team)Team member
Vulnerabilities that stop an installCritical and highThe team's setting: critical and high, critical only, or off
Packages that don't existStoppedThe team's setting
Blocked licensesNoneThe team's list
Block or askThe plugin's modeThe team's setting overrides the plugin

See Teams.

Failure behaviour ​

A security check must not stop your work: if dagsec can't be reached, or a lookup fails, the install proceeds. When your plan's monthly agent checks are used up, installs are no longer checked (they are not blocked).

What is sent ​

Install commands and the package names and versions Claude checks. Your code, file contents and other commands never leave your machine. For team members, the attempted packages and the decision go to the team's audit log.