| name | security-scanning |
| description | Static analysis, dependency vulnerability scanning, secret detection, and container image scanning using open-source tools. |
| metadata | {"thinkfleetbot":{"emoji":"🛡️","requires":{"anyBins":["semgrep","trivy","trufflehog","snyk","grype"]}}} |
Security Scanning
Run static analysis, dependency audits, secret detection, and container scanning.
Static Analysis (SAST)
Semgrep — find code-level vulnerabilities
semgrep scan --config auto .
semgrep scan --config "p/owasp-top-ten" .
semgrep scan --config "p/python" src/
semgrep scan --config auto --json . | jq '.results[] | {path: .path, line: .start.line, rule: .check_id, message: .extra.message}'
semgrep scan --config auto --severity ERROR .
Dependency Vulnerability Scanning (SCA)
Trivy — scan project dependencies
trivy fs --severity HIGH,CRITICAL .
trivy fs --format json --output trivy-report.json .
trivy fs --scanners vuln package-lock.json
trivy fs --exit-code 1 --severity CRITICAL .
Snyk — dependency and code scanning
snyk test
snyk monitor
snyk test --file=requirements.txt
snyk code test
snyk test --print-deps
npm/pnpm audit (no extra tools needed)
npm audit --json | jq '.vulnerabilities | to_entries[] | {name: .key, severity: .value.severity, via: .value.via[0]}'
pnpm audit --json
pip audit --format json
Secret Detection
TruffleHog — find leaked credentials
trufflehog git file://. --json | jq '{detector: .DetectorName, file: .SourceMetadata.Data.Git.file, line: .SourceMetadata.Data.Git.line}'
trufflehog filesystem . --json
trufflehog git file://. --branch main
trufflehog git file://. --since-commit abc123
Container Image Scanning
Trivy — scan Docker images
trivy image --severity HIGH,CRITICAL myapp:latest
trivy image --format json --output image-report.json myapp:latest
trivy image --severity CRITICAL nginx:latest
Grype — image vulnerability scanner
grype myapp:latest
grype myapp:latest --only-fixed --fail-on critical
grype dir:.
grype myapp:latest -o json | jq '.matches[] | {name: .vulnerability.id, severity: .vulnerability.severity, package: .artifact.name}'
Quick Triage Workflow
- Secrets first —
trufflehog git file://. --json (most urgent, leaked creds = immediate risk)
- Dependencies —
trivy fs --severity HIGH,CRITICAL . (known CVEs in your supply chain)
- Code —
semgrep scan --config auto . (your own code vulnerabilities)
- Images —
trivy image myapp:latest (if containerized)
Notes
- Always review findings before acting — false positives are common in SAST.
- Severity levels: CRITICAL > HIGH > MEDIUM > LOW > INFO. Focus on CRITICAL and HIGH first.
- For CI pipelines, use
--exit-code 1 (Trivy) or --error (Semgrep) to fail builds on findings.
- Secret detection in git history can be slow on large repos. Use
--since-commit to limit scope.
- Run
snyk auth before first use of Snyk CLI.