How It Works
When Claude Code runs a command likenpm install lodash:
Package analyzed
turen-pkg fetches security signals for the package — scorecard rating, known vulnerabilities, license, provenance, and age.
Supported Package Managers
| Package Manager | Ecosystem | Status |
|---|---|---|
| npm | JavaScript / Node.js | Supported |
| pip / pip3 | Python (PyPI) | Supported |
| uv | Python (fast installer) | Supported |
| poetry | Python | Supported |
| go mod | Go modules | Supported |
| cargo | Rust | Scanning only |
Security Signals
Each package is evaluated against multiple security dimensions:| Signal | Source | What It Measures |
|---|---|---|
| Scorecard | OpenSSF Scorecard | Overall project security rating (0-10) |
| Vulnerabilities | OSV database | Known CVEs for the package version |
| License | deps.dev | Whether the license is acceptable |
| Provenance | SLSA | Verified build provenance |
| Package Age | Registry metadata | How long the package has existed |
| Maintainer 2FA | Registry metadata | Whether the maintainer has 2FA enabled |
Decisions
Every package evaluation results in one of three decisions:| Decision | What Happens |
|---|---|
| Allow | Package passes all checks. Installation proceeds normally. |
| Review | Package triggers a policy threshold. Claude Code is told the package requires human approval. |
| Block | Package violates a critical policy. Installation is denied. |
What Developers See
When a package is allowed:Typosquat Detection
turen-pkg detects packages with names suspiciously similar to popular packages — a common supply chain attack vector. For example,lod-ash or loadash would be flagged as potential typosquats of lodash.
Typosquat detection uses embedded datasets of popular packages per ecosystem and configurable similarity thresholds.
Audit Command
Developers can scan their entire project for supply chain risk:Claude Code Integration
turen-pkg integrates with Claude Code via hooks configured inmanaged-settings.json. This happens automatically when you install the Turen agent — no developer action needed.
When Claude Code attempts to run a package manager command, the hook:
- Intercepts the command before execution
- Evaluates the package through turen-pkg
- Returns the decision to Claude Code
- Claude Code either proceeds with installation or informs the developer why the package was blocked