Automates security scanning for dependencies, containers, and code using Trivy, Snyk, npm audit, and Bandit. Useful for CI/CD security gates, pre-deployment audits, and compliance checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vulnerability-scanning:vulnerability-scanningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automate security vulnerability detection across code, dependencies, and containers.
Automate security vulnerability detection across code, dependencies, and containers.
# npm audit
npm audit --audit-level=high
# Snyk
snyk test --severity-threshold=high
# Safety (Python)
safety check --full-report
# Scan container image
trivy image myapp:latest --severity HIGH,CRITICAL
# Scan filesystem
trivy fs --scanners vuln,secret .
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
severity: 'CRITICAL,HIGH'
exit-code: '1'
- name: Run Snyk
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
- name: npm audit
run: npm audit --audit-level=high
bandit -r src/ -ll -ii
const { execSync } = require('child_process');
function runScan(command) {
try {
return JSON.parse(execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] }).toString());
} catch (err) {
// A tool may be missing, exit non-zero, or print non-JSON output (e.g.
// trivy progress text when not on a TTY). Treat that as "no parseable
// result" rather than crashing the scanner.
console.warn(`Scan command failed or returned non-JSON: ${command}`);
return null;
}
}
function runSecurityScan() {
const results = {
npm: runScan('npm audit --json'),
trivy: runScan('trivy fs --quiet --format json .')
};
if (!results.npm || !results.npm.metadata) {
console.warn('npm audit produced no metadata; skipping npm checks');
} else {
const critical = results.npm.metadata?.vulnerabilities?.critical || 0;
if (critical > 0) {
console.error(`Found ${critical} critical vulnerabilities`);
process.exit(1);
}
}
}
npx claudepluginhub secondsky/claude-skills --plugin vulnerability-scanningAutomates vulnerability detection using OWASP tools, CVE databases, and security scanners for security audits, compliance checks, and continuous monitoring.
Integrates Trivy into CI/CD pipelines to scan container images for OS and dependency CVEs, detect Dockerfile misconfigurations, and enforce severity-based quality gates.
Integrates Trivy into CI/CD pipelines to scan Docker images for OS and dependency CVEs, detect Dockerfile misconfigurations, and enforce severity-based quality gates.