From security-engineer
Audit project dependencies for known vulnerabilities, outdated packages, and license issues.
npx claudepluginhub hpsgd/turtlestack --plugin security-engineerThis skill is limited to using the following tools:
Audit dependencies for $ARGUMENTS.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Designs, implements, and audits WCAG 2.2 AA accessible UIs for Web (ARIA/HTML5), iOS (SwiftUI traits), and Android (Compose semantics). Audits code for compliance gaps.
Audit dependencies for $ARGUMENTS.
Before running audit tools, understand the dependency landscape:
Identify all dependency manifests:
find . -name "package.json" -o -name "*.csproj" -o -name "requirements*.txt" -o -name "pyproject.toml" -o -name "Pipfile" -o -name "go.mod" -o -name "Cargo.toml" | grep -v node_modules | grep -v .git
Count direct vs transitive dependencies:
Identify dependency age:
Run the appropriate audit tool for each stack:
# Node.js
npm audit --json 2>/dev/null | head -100
# or
npx audit-ci --config audit-ci.jsonc
# .NET
dotnet list package --vulnerable --include-transitive
# Python
pip-audit --format=json 2>/dev/null
# or
safety check --json
# Go
govulncheck ./...
# Rust
cargo audit
Rules:
Not every CVE is a real risk. For EACH vulnerability found:
Question 1: Is the vulnerable code path reachable?
# Example: Check if a specific vulnerable function is used
grep -rn "import.*vulnerable-function\|require.*vulnerable-package" --include="*.ts" --include="*.py" --include="*.cs"
Question 2: Is the vulnerability exploitable in this context?
Question 3: What is the actual impact?
Classify every vulnerability into one of four categories:
| Category | Criteria | Action | Timeline |
|---|---|---|---|
| Fix now | Reachable, HIGH/CRITICAL severity, fix available | Upgrade or patch immediately | Today |
| Fix soon | Reachable, MEDIUM severity, or fix requires planning/testing | Schedule fix | This sprint |
| Monitor | Not reachable in current usage, LOW severity, or no fix available | Track for changes, reassess quarterly | Next review |
| Accept | Assessed as non-exploitable in this context, documented risk acceptance | Document with owner and expiry | Review in 90 days |
Rules:
For each HIGH or CRITICAL vulnerability, document:
### CVE-XXXX-XXXXX: [Package Name]
- **Package:** [name]@[version]
- **Fixed in:** [version] (or "no fix available")
- **CVSS:** [score] ([vector string])
- **Attack vector:** [network/adjacent/local/physical]
- **Description:** [1-2 sentences from the CVE]
- **Reachable:** [YES/NO — with evidence]
- Import chain: [your code] -> [package A] -> [vulnerable function]
- Used in: `file:line` — [description of usage]
- **Exploitability in this context:** [assessment]
- **Recommended action:** [upgrade to X.Y.Z / remove dependency / add workaround / accept with justification]
Beyond vulnerabilities, check for maintenance risks:
# Node.js — check for outdated packages
npm outdated
# .NET — check for newer versions
dotnet list package --outdated
# Python — check for outdated packages
pip list --outdated
For each outdated package:
| Risk level | Criteria |
|---|---|
| High | Major version behind, package is a critical dependency (auth, crypto, framework) |
| Medium | Minor version behind, or package has security-relevant function |
| Low | Patch version behind, or package is a dev-only dependency |
| Deprecated | Package marked deprecated — find and evaluate replacement |
# Node.js
npx license-checker --summary
# Python
pip-licenses --format=table
Flag any licenses incompatible with the project's license:
npm audit fix blindly — auto-fix can introduce breaking changes. Triage first, fix deliberately## Dependency Audit: [project]
### Summary
- **Total dependencies:** [direct] direct, [transitive] transitive
- **Vulnerabilities found:** [X critical, Y high, Z medium, W low]
- **Outdated packages:** [count]
- **Deprecated packages:** [count]
- **Recommendation:** [ship / fix first / block]
### Vulnerability Report
| # | Package | Version | CVE | CVSS | Severity | Reachable | Fix available | Category |
|---|---|---|---|---|---|---|---|---|
| 1 | lodash | 4.17.20 | CVE-2021-23337 | 7.2 | HIGH | YES | 4.17.21 | Fix now |
| 2 | tar | 6.1.0 | CVE-2021-37701 | 8.6 | CRITICAL | NO | 6.1.9 | Monitor |
### CVE Details
[Detailed assessment for each HIGH/CRITICAL — see Step 5 template]
### Outdated Packages
| Package | Current | Latest | Risk | Notes |
|---|---|---|---|---|
| [name] | [ver] | [ver] | [High/Medium/Low] | [reason] |
### Deprecated Packages
| Package | Replacement | Migration effort |
|---|---|---|
| [name] | [alternative] | [estimate] |
### License Issues
| Package | License | Compatibility | Action |
|---|---|---|---|
| [name] | [license] | [compatible/review/incompatible] | [action] |
### Actions
| # | Action | Category | Priority | Owner | Deadline |
|---|---|---|---|---|---|
| 1 | Upgrade lodash to 4.17.21 | Fix now | P0 | [name] | Today |
| 2 | Evaluate tar upgrade | Monitor | P2 | [name] | Next review |
### Audit Evidence
- **Tool:** [npm audit / pip-audit / dotnet list package --vulnerable]
- **Database version:** [date of vulnerability database]
- **Command output:** [summary or link to full output]
/security-engineer:threat-model — dependency vulnerabilities are attack surface. Feed high-severity findings into the threat model./security-engineer:security-review — when a vulnerable dependency is used in security-sensitive code, review the usage patterns.