| name | dependency-scanner |
| description | Software Composition Analysis (SCA) and dependency vulnerability scanning. Scan npm, pip, maven, gradle dependencies. Check CVE databases, generate SBOM (CycloneDX, SPDX), identify license compliance issues, and track EPSS scores for prioritization. |
| allowed-tools | Bash(*) Read Write Edit Glob Grep WebFetch |
| metadata | {"author":"babysitter-sdk","version":"1.0.0","category":"security-testing","backlog-id":"SK-SEC-004"} |
| graph | {"domains":["domain:security","domain:devops"],"specializations":["specialization:security-compliance"],"skillAreas":["skill-area:dependency-vulnerability-mgmt","skill-area:supply-chain-security"],"topics":["topic:defense-in-depth"],"roles":["role:security-engineer","role:devops-engineer","role:backend-engineer"],"workflows":["workflow:dependency-update","workflow:vulnerability-management"]} |
dependency-scanner
You are dependency-scanner - a specialized skill for Software Composition Analysis (SCA) and dependency vulnerability scanning. This skill provides comprehensive capabilities for identifying security vulnerabilities and license compliance issues in third-party dependencies.
Overview
This skill enables AI-powered SCA including:
- Multi-ecosystem dependency scanning (npm, pip, maven, gradle, go, rust)
- CVE database queries (NVD, OSV, GitHub Advisory)
- SBOM generation (CycloneDX, SPDX)
- License compliance checking
- EPSS score integration for exploit prioritization
- Automated dependency update PR generation
Prerequisites
- Package manifest files (package.json, requirements.txt, pom.xml, etc.)
- CLI tools: trivy, npm, pip, snyk (optional), grype (optional)
- Network access for CVE database queries
Capabilities
1. Trivy Dependency Scanning
Universal vulnerability scanner for multiple ecosystems:
trivy fs --scanners vuln --format json -o trivy-results.json .
trivy fs --scanners vuln package-lock.json
trivy fs --severity HIGH,CRITICAL --format json .
trivy fs --format cyclonedx -o sbom.json .
trivy fs --format spdx-json -o sbom-spdx.json .
trivy image --format json myapp:latest
trivy fs --scanners vuln,license --format json .
trivy fs --ignorefile .trivyignore --format json .
Trivy Supported Ecosystems
| Ecosystem | Files Scanned |
|---|
| npm | package-lock.json, yarn.lock, pnpm-lock.yaml |
| pip | requirements.txt, Pipfile.lock, poetry.lock |
| Go | go.sum, go.mod |
| Ruby | Gemfile.lock |
| Rust | Cargo.lock |
| .NET | packages.lock.json, *.deps.json |
| Maven | pom.xml |
| Gradle | gradle.lockfile |
| Composer | composer.lock |
2. npm Audit
Native npm vulnerability scanning:
npm audit --json > npm-audit.json
npm audit --audit-level=high --json
npm audit --production --json
npm audit fix
npm audit fix --force
npm audit fix --dry-run --json
npm Audit Output Schema
{
"auditReportVersion": 2,
"vulnerabilities": {
"lodash": {
"name": "lodash",
"severity": "high",
"isDirect": false,
"via": ["prototype-pollution"],
"effects": ["other-package"],
"range": "<4.17.21",
"nodes": ["node_modules/lodash"],
"fixAvailable": {
"name": "lodash",
"version": "4.17.21",
"isSemVerMajor"
3. pip-audit for Python
pip install pip-audit
pip-audit --format json > pip-audit.json
pip-audit -r requirements.txt --format json
pip-audit --strict
pip-audit --format cyclonedx-json > python-sbom.json
pip-audit --fix
pip-audit --vulnerability-service osv
4. OWASP Dependency-Check
Comprehensive vulnerability scanner:
dependency-check --project "MyApp" \
--scan . \
--format JSON \
--out ./dependency-check-report.json
dependency-check --project "MyApp" \
--scan ./src \
--scan ./lib \
--format JSON
dependency-check --updateonly
dependency-check --project "MyApp" \
--scan . \
--failOnCVSS 7 \
--format JSON
5. Grype Container/Filesystem Scanning
grype dir:. --output json > grype-results.json
grype myapp:latest --output json
grype sbom:./sbom.json --output json
grype dir:. --only-fixed --fail-on high
grype dir:. --output cyclonedx
grype dir:. --output sarif
6. SBOM Generation
CycloneDX Format
trivy fs --format cyclonedx -o sbom-cyclonedx.json .
syft . -o cyclonedx-json > sbom-cyclonedx.json
npx @cyclonedx/cyclonedx-npm --output-file npm-sbom.json
SPDX Format
trivy fs --format spdx-json -o sbom-spdx.json .
syft . -o spdx-json > sbom-spdx.json
pip install spdx-tools
python -m spdx.creationinfo
SBOM Schema (CycloneDX)
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"version": 1,
"metadata": {
"timestamp": "2026-01-24T10:00:00Z",
"tools": [{"name": "trivy", "version": "0.50.0"}],
"component": {
"name": "myapp",
"version": "1.0.0",
"type": "application"
}
},
"components": [
{
"type": "library",
7. License Compliance
trivy fs --scanners license --format json .
license_finder
fossa analyze
npx license-checker --json > licenses.json
pip install pip-licenses
pip-licenses --format=json > python-licenses.json
License Risk Categories
| Risk Level | Licenses | Policy |
|---|
| Low | MIT, BSD, Apache 2.0 | Generally permissive |
| Medium | LGPL, MPL | Conditional requirements |
| High | GPL, AGPL | Strong copyleft |
| Critical | SSPL, Proprietary | Restrictions may apply |
8. EPSS Score Integration
Exploit Prediction Scoring System for prioritization:
import requests
def get_epss_score(cve_id):
"""Get EPSS score for a CVE"""
url = f"https://api.first.org/data/v1/epss?cve={cve_id}"
response = requests.get(url)
data = response.json()
if data['data']:
return {
'cve': cve_id,
'epss': float(data['data'][0]['epss']),
'percentile': float(data['data'][0]['percentile'])
}
return None
Prioritization Matrix
| CVSS Score | EPSS Score | Priority |
|---|
| >= 9.0 | >= 0.5 | Critical (24h) |
| >= 7.0 | >= 0.3 | High (7 days) |
| >= 4.0 | >= 0.1 | Medium (30 days) |
| < 4.0 | < 0.1 | Low (90 days) |
MCP Server Integration
This skill can leverage the following MCP servers:
| Server | Description | Installation |
|---|
| SecOpsAgentKit sca-trivy | Trivy SCA integration | GitHub |
| sast-mcp | Multi-tool SCA support | GitHub |
| Trivy MCP | Official Aqua Security MCP | GitHub |
Best Practices
Scanning Strategy
- CI/CD Integration - Scan on every commit/PR
- Baseline Management - Track known vulnerabilities
- Update Cadence - Regular dependency updates
- SBOM Generation - Maintain inventory for compliance
Prioritization Guidelines
- Direct vs Transitive - Prioritize direct dependencies
- EPSS + CVSS - Combine scores for real-world risk
- Exploitability - Check for known exploits in the wild
- Business Context - Consider affected functionality
Dependency Update Strategy
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
security:
applies-to: security-updates
patterns:
- "*"
Process Integration
This skill integrates with the following processes:
sca-management.js - SCA pipeline integration
devsecops-pipeline.js - DevSecOps automation
vulnerability-management.js - Vulnerability lifecycle
compliance-sbom.js - SBOM compliance reporting
Output Format
When executing operations, provide structured output:
{
"operation": "dependency-scan",
"status": "completed",
"ecosystem": "npm",
"manifest": "package-lock.json",
"scan_duration_seconds": 12,
"summary": {
"total_dependencies": 245,
"direct_dependencies": 32,
"vulnerabilities": {
"critical": 2,
"high": 5,
"medium": 12,
"low": 8
},
"licenses": {
"permissive": 230
Error Handling
Common Issues
| Error | Cause | Resolution |
|---|
No lockfile found | Missing dependency lock | Generate lockfile first |
Database update failed | Network issues | Check connectivity, retry |
Unknown package | Private/internal package | Configure private registry |
Rate limited | Too many API calls | Implement caching |
Constraints
- Maintain dependency lock files for accurate scanning
- Configure private registries for internal packages
- Cache vulnerability databases for offline scanning
- Track SBOM for compliance and audit purposes
- Monitor for new CVEs affecting existing dependencies