| name | security-scan |
| description | Security scanning and vulnerability assessment workflows. Use when performing security audits, scanning for vulnerabilities, checking dependencies, or hardening systems. |
| paths | **/*.py,**/*.js,**/*.go,**/*.sh,**/*.ts,**/*.rs,**/Dockerfile*,**/requirements*.txt,**/package.json,**/*.tf |
Security Scanning Workflows
Pre-Push Security Check
Before any push to remote, run this sequence:
gitleaks detect --verbose — scan for leaked secrets
trivy fs --severity HIGH,CRITICAL . — filesystem vulnerability scan
osv-scanner --lockfile=<lockfile> — dependency vulnerability check
Container Security
trivy image <image> — scan container image
syft <image> — generate SBOM (Software Bill of Materials)
grype <image> — scan SBOM/image for known vulnerabilities
crane manifest <image> — inspect remote image without pulling
cosign verify <image> — verify image signature
dive <image> — check image layer efficiency
hadolint Dockerfile — lint Dockerfile for best practices
Infrastructure Security
trivy config . — scan Terraform/CloudFormation for misconfigs
tflint — lint Terraform files
opengrep scan -f auto . — static analysis
Network Reconnaissance
subfinder -d <domain> — passive subdomain enumeration
dnsx -l subdomains.txt -resp — bulk DNS resolution
httpx -l hosts.txt -sc -title -tech-detect — probe for live HTTP services
katana -u <url> — crawl with JS rendering for hidden endpoints
nmap -sV -sC <target> — service version detection
nuclei -u <target> — template-based vuln scanning
nikto -h <target> — web server scanning
ffuf -u <url>/FUZZ -w <wordlist> — directory fuzzing
Supply Chain Security
syft dir:. — generate SBOM for project directory
grype sbom:./sbom.json — scan SBOM for known CVEs
grype dir:. — scan project directly for vulnerable dependencies
TLS & Certificate Debugging
step certificate inspect <cert.pem> — view certificate details
step certificate inspect https://<domain> — inspect remote TLS cert
step certificate create — generate self-signed certs for testing
System Hardening
lynis audit system — full system security audit
- Review output and address findings by severity
Rules
- NEVER scan targets you don't own or have authorization for
- Always use
--help before running any security tool
- Report findings clearly with severity levels
- Suggest remediations alongside findings