
Sca Trivy
- 1 installs
- 404 repo stars
- Updated August 5, 2026
- aiskillstore/marketplace
sca-trivy is a skill for scanning containers, dependencies, and IaC for CVEs and generating SBOMs using Aqua Trivy.
About
sca-trivy is a skill for software composition analysis and container vulnerability scanning with Aqua Trivy. It provides workflows for scanning container images, filesystems, and IaC files for CVEs and misconfigurations, generating SBOMs, integrating scans into CI/CD with SARIF, and prioritizing remediation by CVSS. A developer uses it to find and triage vulnerabilities in dependencies and images.
- Trivy scanning for CVEs, IaC misconfigs, and secrets
- SBOM generation in CycloneDX and SPDX formats
- CI/CD integration with SARIF output
Sca Trivy by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,835 of 2,203 Security skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
sca-trivy capabilities & compatibility
Free open-source CLI; no API key required
- Capabilities
- security audit · dependency scanning · sbom generation · iac scanning
- Works with
- github · gitlab · docker · terraform · kubernetes
- Use cases
- security audit · ci cd · devops
- Platforms
- macOS · Linux
- Pricing
- Free
What sca-trivy says it does
Trivy is a comprehensive security scanner for containers, filesystems, and git repositories.
trivy image --format cyclonedx --output sbom.json nginx:latest
npx skills add https://github.com/aiskillstore/marketplace --skill sca-trivyAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 404 |
| Last updated | August 5, 2026 |
| Repository | aiskillstore/marketplace ↗ |
What it does
Scan containers, dependencies, and IaC for CVEs and generate SBOMs with Trivy.
Who is it for?
Scanning images, filesystems, and IaC for CVEs, misconfigs, and license risks and wiring scans into CI/CD
Skip if: Runtime threat detection or dynamic application security testing
When should I use this skill?
Scanning for CVEs, generating an SBOM, or integrating vulnerability scanning into a CI/CD pipeline
What you get
A prioritized vulnerability report and SBOM with CI/CD gating.
- Vulnerability report
- SBOM (CycloneDX/SPDX)
- SARIF for CI/CD
By the numbers
- 5 documented Trivy workflows
- 6-step container assessment checklist
Files
Software Composition Analysis with Trivy
Overview
Trivy is a comprehensive security scanner for containers, filesystems, and git repositories. It detects vulnerabilities (CVEs) in OS packages and application dependencies, IaC misconfigurations, exposed secrets, and software licenses. This skill provides workflows for vulnerability scanning, SBOM generation, CI/CD integration, and remediation prioritization aligned with CVSS and OWASP standards.
Quick Start
Scan a container image for vulnerabilities:
# Install Trivy
brew install trivy # macOS
# or: apt-get install trivy # Debian/Ubuntu
# or: docker pull aquasec/trivy:latest
# Scan container image
trivy image nginx:latest
# Scan local filesystem for dependencies
trivy fs .
# Scan IaC files for misconfigurations
trivy config .
# Generate SBOM
trivy image --format cyclonedx --output sbom.json nginx:latestCore Workflows
Workflow 1: Container Image Security Assessment
Progress: [ ] 1. Identify target container image (repository:tag) [ ] 2. Run comprehensive Trivy scan with trivy image <image-name> [ ] 3. Analyze vulnerability findings by severity (CRITICAL, HIGH, MEDIUM, LOW) [ ] 4. Map CVE findings to CWE categories and OWASP references [ ] 5. Check for available patches and updated base images [ ] 6. Generate prioritized remediation report with upgrade recommendations
Work through each step systematically. Check off completed items.
Workflow 2: Dependency Vulnerability Scanning
Scan project dependencies for known vulnerabilities:
# Scan filesystem for all dependencies
trivy fs --severity CRITICAL,HIGH .
# Scan specific package manifest
trivy fs --scanners vuln package-lock.json
# Generate JSON report for analysis
trivy fs --format json --output trivy-report.json .
# Generate SARIF for GitHub/GitLab integration
trivy fs --format sarif --output trivy.sarif .For each vulnerability: 1. Review CVE details and CVSS score 2. Check if fixed version is available 3. Consult references/remediation_guide.md for language-specific guidance 4. Update dependency to patched version 5. Re-scan to validate fix
Workflow 3: Infrastructure as Code Security
Detect misconfigurations in IaC files:
# Scan Terraform configurations
trivy config ./terraform --severity CRITICAL,HIGH
# Scan Kubernetes manifests
trivy config ./k8s --severity CRITICAL,HIGH
# Scan Dockerfile best practices
trivy config --file-patterns dockerfile:Dockerfile .
# Generate report with remediation guidance
trivy config --format json --output iac-findings.json .Review findings by category:
- Security: Authentication, authorization, encryption
- Compliance: CIS benchmarks, security standards
- Best Practices: Resource limits, immutability, least privilege
Workflow 4: CI/CD Pipeline Integration
GitHub Actions
name: Trivy Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload results to GitHub Security
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'GitLab CI
trivy-scan:
stage: test
image: aquasec/trivy:latest
script:
- trivy fs --exit-code 1 --severity CRITICAL,HIGH --format json --output trivy-report.json .
artifacts:
reports:
dependency_scanning: trivy-report.json
when: always
allow_failure: falseUse bundled templates from assets/ci_integration/ for additional platforms.
Workflow 5: SBOM Generation
Generate Software Bill of Materials for supply chain transparency:
# Generate CycloneDX SBOM
trivy image --format cyclonedx --output sbom-cyclonedx.json nginx:latest
# Generate SPDX SBOM
trivy image --format spdx-json --output sbom-spdx.json nginx:latest
# SBOM for filesystem/project
trivy fs --format cyclonedx --output project-sbom.json .SBOM use cases:
- Vulnerability tracking: Monitor dependencies for new CVEs
- License compliance: Identify license obligations and risks
- Supply chain security: Verify component provenance
- Regulatory compliance: Meet CISA SBOM requirements
Security Considerations
Sensitive Data Handling
- Registry credentials: Use environment variables or credential helpers, never hardcode
- Scan reports: Contain vulnerability details and package versions - treat as sensitive
- SBOM files: May reveal internal architecture - control access appropriately
- Secret scanning: Enable with
--scanners secretto detect exposed credentials in images
Access Control
- Container registry access: Requires pull permissions for image scanning
- Filesystem access: Read permissions for dependency manifests and IaC files
- CI/CD integration: Secure API tokens and registry credentials in secrets management
- Report storage: Restrict access to vulnerability reports and SBOM artifacts
Audit Logging
Log the following for compliance and incident response:
- Scan execution timestamps and scope (image, filesystem, repository)
- Vulnerability counts by severity level
- Policy violations and blocking decisions
- SBOM generation and distribution events
- Remediation actions and version updates
Compliance Requirements
- PCI-DSS 6.2: Ensure system components protected from known vulnerabilities
- SOC2 CC7.1: Detect and act upon changes that could affect security
- NIST 800-53 SI-2: Flaw remediation and vulnerability scanning
- CIS Benchmarks: Container and Kubernetes security hardening
- OWASP Top 10 A06: Vulnerable and Outdated Components
- CWE-1104: Use of Unmaintained Third-Party Components
Bundled Resources
Scripts (scripts/)
trivy_scan.py- Comprehensive scanning with JSON/SARIF output and severity filteringsbom_generator.py- SBOM generation with CycloneDX and SPDX format supportvulnerability_report.py- Parse Trivy output and generate remediation reports with CVSS scoresbaseline_manager.py- Baseline creation for tracking new vulnerabilities only
References (references/)
scanner_types.md- Detailed guide for vulnerability, misconfiguration, secret, and license scanningremediation_guide.md- Language and ecosystem-specific remediation strategiescvss_prioritization.md- CVSS score interpretation and vulnerability prioritization frameworkiac_checks.md- Complete list of IaC security checks with CIS benchmark mappings
Assets (assets/)
trivy.yaml- Custom Trivy configuration with security policies and ignore rulesci_integration/github-actions.yml- Complete GitHub Actions workflow with security gatesci_integration/gitlab-ci.yml- Complete GitLab CI pipeline with dependency scanningci_integration/jenkins.groovy- Jenkins pipeline with Trivy integrationpolicy_template.rego- OPA policy template for custom vulnerability policies
Common Patterns
Pattern 1: Multi-Stage Security Scanning
Comprehensive security assessment combining multiple scan types:
# 1. Scan container image for vulnerabilities
trivy image --severity CRITICAL,HIGH myapp:latest
# 2. Scan IaC for misconfigurations
trivy config ./infrastructure --severity CRITICAL,HIGH
# 3. Scan filesystem for dependency vulnerabilities
trivy fs --severity CRITICAL,HIGH ./app
# 4. Scan for exposed secrets
trivy fs --scanners secret ./app
# 5. Generate comprehensive SBOM
trivy image --format cyclonedx --output sbom.json myapp:latestPattern 2: Baseline Vulnerability Tracking
Implement baseline scanning to track only new vulnerabilities:
# Initial scan - create baseline
trivy image --format json --output baseline.json nginx:latest
# Subsequent scans - detect new vulnerabilities
trivy image --format json --output current.json nginx:latest
./scripts/baseline_manager.py --baseline baseline.json --current current.jsonPattern 3: License Compliance Scanning
Detect license compliance risks:
# Scan for license information
trivy image --scanners license --format json --output licenses.json myapp:latest
# Filter by license type
trivy image --scanners license --severity HIGH,CRITICAL myapp:latestReview findings:
- High Risk: GPL, AGPL (strong copyleft)
- Medium Risk: LGPL, MPL (weak copyleft)
- Low Risk: Apache, MIT, BSD (permissive)
Pattern 4: Custom Policy Enforcement
Apply custom security policies with OPA:
# Create Rego policy in assets/policy_template.rego
# Deny images with CRITICAL vulnerabilities or outdated packages
# Run scan with policy enforcement
trivy image --format json --output scan.json myapp:latest
trivy image --ignore-policy assets/policy_template.rego myapp:latestIntegration Points
CI/CD Integration
- GitHub Actions: Native
aquasecurity/trivy-actionwith SARIF upload to Security tab - GitLab CI: Dependency scanning report format for Security Dashboard
- Jenkins: Docker-based scanning with JUnit XML report generation
- CircleCI: Docker executor with artifact storage
- Azure Pipelines: Task-based integration with results publishing
Container Platforms
- Docker: Image scanning before push to registry
- Kubernetes: Admission controllers with trivy-operator for runtime scanning
- Harbor: Built-in Trivy integration for registry scanning
- AWS ECR: Scan images on push with enhanced scanning
- Google Artifact Registry: Vulnerability scanning integration
Security Tools Ecosystem
- SIEM Integration: Export JSON findings to Splunk, ELK, or Datadog
- Vulnerability Management: Import SARIF/JSON into Snyk, Qualys, or Rapid7
- SBOM Tools: CycloneDX and SPDX compatibility with dependency-track and GUAC
- Policy Enforcement: OPA/Rego integration for custom policy as code
Troubleshooting
Issue: High False Positive Rate
Symptoms: Many vulnerabilities reported that don't apply to your use case
Solution: 1. Use .trivyignore file to suppress specific CVEs with justification 2. Filter by exploitability: trivy image --ignore-unfixed myapp:latest 3. Apply severity filtering: --severity CRITICAL,HIGH 4. Review vendor-specific security advisories for false positive validation 5. See references/false_positives.md for common patterns
Issue: Performance Issues on Large Images
Symptoms: Scans taking excessive time or high memory usage
Solution: 1. Use cached DB: trivy image --cache-dir /path/to/cache myapp:latest 2. Skip unnecessary scanners: --scanners vuln (exclude config, secret) 3. Use offline mode after initial DB download: --offline-scan 4. Increase timeout: --timeout 30m 5. Scan specific layers: --removed-pkgs to exclude removed packages
Issue: Missing Vulnerabilities for Specific Languages
Symptoms: Expected CVEs not detected in application dependencies
Solution: 1. Verify language support: Check supported languages and file patterns 2. Ensure dependency manifests are present (package.json, go.mod, requirements.txt) 3. Include lock files for accurate version detection 4. For compiled binaries, scan source code separately 5. Consult references/scanner_types.md for language-specific requirements
Issue: Registry Authentication Failures
Symptoms: Unable to scan private container images
Solution:
# Use Docker credential helper
docker login registry.example.com
trivy image registry.example.com/private/image:tag
# Or use environment variables
export TRIVY_USERNAME=user
export TRIVY_PASSWORD=pass
trivy image registry.example.com/private/image:tag
# Or use credential file
trivy image --username user --password pass registry.example.com/private/image:tagAdvanced Configuration
Custom Trivy Configuration
Create trivy.yaml configuration file:
# trivy.yaml
vulnerability:
type: os,library
severity: CRITICAL,HIGH,MEDIUM
ignorefile: .trivyignore
ignore-unfixed: false
skip-files:
- "test/**"
- "**/node_modules/**"
cache:
dir: /tmp/trivy-cache
db:
repository: ghcr.io/aquasecurity/trivy-db:latest
output:
format: json
severity-sort: trueUse with: trivy image --config trivy.yaml myapp:latest
Trivy Ignore File
Create .trivyignore to suppress specific CVEs:
# .trivyignore
# False positive - patched in vendor fork
CVE-0000-12345
# Risk accepted by security team - JIRA-1234
CVE-0000-67890
# No fix available, compensating controls in place
CVE-0000-11111Offline Air-Gapped Scanning
For air-gapped environments:
# On internet-connected machine:
trivy image --download-db-only --cache-dir /path/to/db
# Transfer cache to air-gapped environment
# On air-gapped machine:
trivy image --skip-db-update --cache-dir /path/to/db --offline-scan myapp:latestReferences
{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-01-16T16:16:04.051Z",
"slug": "agentsecops-sca-trivy",
"source_url": "https://github.com/AgentSecOps/SecOpsAgentKit/tree/main/skills/devsecops/sca-trivy",
"source_ref": "main",
"model": "claude",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "b20163e934407c438296a480fce6da4e1e817db39e95c051964e5a7c271151c1",
"tree_hash": "d6fe181aeb06cd73264659e2de1484c3b155b4b843d512cc1e302c8ccacc1ea4"
},
"skill": {
"name": "sca-trivy",
"description": "Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identifying CVE vulnerabilities in dependencies, container images, IaC misconfigurations, and license compliance risks. Use when: (1) Scanning container images and filesystems for vulnerabilities and misconfigurations, (2) Analyzing dependencies for known CVEs across multiple languages (Go, Python, Node.js, Java, etc.), (3) Detecting IaC security issues in Terraform, Kubernetes, Dockerfile, (4) Integrating vulnerability scanning into CI/CD pipelines with SARIF output, (5) Generating Software Bill of Materials (SBOM) in CycloneDX or SPDX format, (6) Prioritizing remediation by CVSS score and exploitability.\n",
"summary": "Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identi...",
"icon": "🛡️",
"version": "0.1.0",
"author": "AgentSecOps",
"license": "MIT",
"category": "devsecops",
"tags": [
"sca",
"trivy",
"container-security",
"vulnerability-scanning",
"sbom",
"iac-security",
"dependency-scanning",
"cvss"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"network",
"external_commands",
"filesystem"
]
},
"security_audit": {
"risk_level": "safe",
"is_blocked": false,
"safe_to_publish": true,
"summary": "Documentation-only skill containing markdown guides for Trivy vulnerability scanner usage. No executable code present. This is a knowledge-base skill providing standardized workflows for identifying CVEs, generating SBOMs, and integrating security scanning into CI/CD pipelines. All 86 static findings are false positives - the analyzer misinterpreted documentation examples and legitimate security/compliance terminology as security threats.",
"risk_factor_evidence": [
{
"factor": "network",
"evidence": [
{
"file": "skill-report.json",
"line_start": 6,
"line_end": 6
},
{
"file": "SKILL.md",
"line_start": 20,
"line_end": 20
},
{
"file": "SKILL.md",
"line_start": 21,
"line_end": 21
},
{
"file": "SKILL.md",
"line_start": 22,
"line_end": 22
},
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
},
{
"file": "SKILL.md",
"line_start": 452,
"line_end": 452
},
{
"file": "SKILL.md",
"line_start": 453,
"line_end": 453
},
{
"file": "SKILL.md",
"line_start": 454,
"line_end": 454
},
{
"file": "SKILL.md",
"line_start": 455,
"line_end": 455
},
{
"file": "SKILL.md",
"line_start": 456,
"line_end": 456
},
{
"file": "SKILL.md",
"line_start": 457,
"line_end": 457
}
]
},
{
"factor": "external_commands",
"evidence": [
{
"file": "SKILL.md",
"line_start": 39,
"line_end": 56
},
{
"file": "SKILL.md",
"line_start": 56,
"line_end": 64
},
{
"file": "SKILL.md",
"line_start": 64,
"line_end": 76
},
{
"file": "SKILL.md",
"line_start": 76,
"line_end": 88
},
{
"file": "SKILL.md",
"line_start": 88,
"line_end": 93
},
{
"file": "SKILL.md",
"line_start": 93,
"line_end": 101
},
{
"file": "SKILL.md",
"line_start": 101,
"line_end": 113
},
{
"file": "SKILL.md",
"line_start": 113,
"line_end": 124
},
{
"file": "SKILL.md",
"line_start": 124,
"line_end": 147
},
{
"file": "SKILL.md",
"line_start": 147,
"line_end": 151
},
{
"file": "SKILL.md",
"line_start": 151,
"line_end": 162
},
{
"file": "SKILL.md",
"line_start": 162,
"line_end": 164
},
{
"file": "SKILL.md",
"line_start": 164,
"line_end": 170
},
{
"file": "SKILL.md",
"line_start": 170,
"line_end": 179
},
{
"file": "SKILL.md",
"line_start": 179,
"line_end": 194
},
{
"file": "SKILL.md",
"line_start": 194,
"line_end": 223
},
{
"file": "SKILL.md",
"line_start": 223,
"line_end": 225
},
{
"file": "SKILL.md",
"line_start": 225,
"line_end": 226
},
{
"file": "SKILL.md",
"line_start": 226,
"line_end": 227
},
{
"file": "SKILL.md",
"line_start": 227,
"line_end": 228
},
{
"file": "SKILL.md",
"line_start": 228,
"line_end": 230
},
{
"file": "SKILL.md",
"line_start": 230,
"line_end": 232
},
{
"file": "SKILL.md",
"line_start": 232,
"line_end": 233
},
{
"file": "SKILL.md",
"line_start": 233,
"line_end": 234
},
{
"file": "SKILL.md",
"line_start": 234,
"line_end": 235
},
{
"file": "SKILL.md",
"line_start": 235,
"line_end": 237
},
{
"file": "SKILL.md",
"line_start": 237,
"line_end": 239
},
{
"file": "SKILL.md",
"line_start": 239,
"line_end": 240
},
{
"file": "SKILL.md",
"line_start": 240,
"line_end": 241
},
{
"file": "SKILL.md",
"line_start": 241,
"line_end": 242
},
{
"file": "SKILL.md",
"line_start": 242,
"line_end": 243
},
{
"file": "SKILL.md",
"line_start": 243,
"line_end": 251
},
{
"file": "SKILL.md",
"line_start": 251,
"line_end": 266
},
{
"file": "SKILL.md",
"line_start": 266,
"line_end": 272
},
{
"file": "SKILL.md",
"line_start": 272,
"line_end": 279
},
{
"file": "SKILL.md",
"line_start": 279,
"line_end": 285
},
{
"file": "SKILL.md",
"line_start": 285,
"line_end": 291
},
{
"file": "SKILL.md",
"line_start": 291,
"line_end": 302
},
{
"file": "SKILL.md",
"line_start": 302,
"line_end": 309
},
{
"file": "SKILL.md",
"line_start": 309,
"line_end": 315
},
{
"file": "SKILL.md",
"line_start": 315,
"line_end": 343
},
{
"file": "SKILL.md",
"line_start": 343,
"line_end": 344
},
{
"file": "SKILL.md",
"line_start": 344,
"line_end": 345
},
{
"file": "SKILL.md",
"line_start": 345,
"line_end": 347
},
{
"file": "SKILL.md",
"line_start": 347,
"line_end": 354
},
{
"file": "SKILL.md",
"line_start": 354,
"line_end": 355
},
{
"file": "SKILL.md",
"line_start": 355,
"line_end": 356
},
{
"file": "SKILL.md",
"line_start": 356,
"line_end": 357
},
{
"file": "SKILL.md",
"line_start": 357,
"line_end": 358
},
{
"file": "SKILL.md",
"line_start": 358,
"line_end": 369
},
{
"file": "SKILL.md",
"line_start": 369,
"line_end": 376
},
{
"file": "SKILL.md",
"line_start": 376,
"line_end": 388
},
{
"file": "SKILL.md",
"line_start": 388,
"line_end": 394
},
{
"file": "SKILL.md",
"line_start": 394,
"line_end": 396
},
{
"file": "SKILL.md",
"line_start": 396,
"line_end": 416
},
{
"file": "SKILL.md",
"line_start": 416,
"line_end": 418
},
{
"file": "SKILL.md",
"line_start": 418,
"line_end": 422
},
{
"file": "SKILL.md",
"line_start": 422,
"line_end": 424
},
{
"file": "SKILL.md",
"line_start": 424,
"line_end": 434
},
{
"file": "SKILL.md",
"line_start": 434,
"line_end": 440
},
{
"file": "SKILL.md",
"line_start": 440,
"line_end": 448
}
]
},
{
"factor": "filesystem",
"evidence": [
{
"file": "SKILL.md",
"line_start": 408,
"line_end": 408
},
{
"file": "SKILL.md",
"line_start": 81,
"line_end": 81
}
]
}
],
"critical_findings": [],
"high_findings": [],
"medium_findings": [],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 2,
"total_lines": 640,
"audit_model": "claude",
"audited_at": "2026-01-16T16:16:04.051Z"
},
"content": {
"user_title": "Scan containers and dependencies for vulnerabilities",
"value_statement": "Manual dependency and container vulnerability scanning requires significant security expertise to interpret CVE reports and prioritize fixes. This skill provides standardized Trivy workflows for identifying CVEs, generating SBOMs, and integrating security scanning into CI/CD pipelines.",
"seo_keywords": [
"trivy sca",
"container vulnerability scanner",
"cve scanning",
"dependency vulnerability",
"sbom generation",
"claude code security",
"claude security scanning",
"codex vulnerability",
"iac security scanning",
"trivy ci cd"
],
"actual_capabilities": [
"Scan container images for CVE vulnerabilities by severity level",
"Analyze project dependencies across multiple languages (Go, Python, Node.js, Java)",
"Detect IaC misconfigurations in Terraform, Kubernetes, and Dockerfiles",
"Generate Software Bill of Materials in CycloneDX or SPDX format",
"Create SARIF reports for GitHub Security tab integration",
"Prioritize vulnerabilities using CVSS scores and exploitability data"
],
"limitations": [
"Does not install Trivy; users must install it separately",
"Does not execute scans automatically; provides command templates only",
"Does not fix vulnerabilities; only identifies and reports them",
"Does not integrate with private container registries without manual configuration"
],
"use_cases": [
{
"target_user": "Security engineers",
"title": "Container security assessment",
"description": "Run comprehensive scans on container images to identify critical vulnerabilities before deployment to production"
},
{
"target_user": "DevOps engineers",
"title": "CI/CD pipeline security",
"description": "Integrate vulnerability scanning into GitHub Actions or GitLab CI pipelines with SARIF output and security gates"
},
{
"target_user": "Compliance officers",
"title": "SBOM documentation",
"description": "Generate software bill of materials to meet regulatory requirements and track component provenance"
}
],
"prompt_templates": [
{
"title": "Quick image scan",
"scenario": "Scan a container image",
"prompt": "Scan the container image nginx:latest for vulnerabilities using Trivy and show findings by severity level"
},
{
"title": "Dependency audit",
"scenario": "Check project dependencies",
"prompt": "Run Trivy filesystem scan on my project to identify vulnerable dependencies with CVSS scores above 7.0"
},
{
"title": "IaC security scan",
"scenario": "Scan infrastructure code",
"prompt": "Scan my Terraform configurations in the infrastructure/ directory for security misconfigurations using Trivy"
},
{
"title": "Generate SBOM",
"scenario": "Create software bill of materials",
"prompt": "Generate a CycloneDX SBOM for my application and save it to sbom.json using Trivy"
}
],
"output_examples": [
{
"input": "Scan nginx:latest for critical and high severity vulnerabilities",
"output": [
"Critical: 3 vulnerabilities found",
" - CVE-2024-39338 (CVSS 9.8): PostgreSQL out-of-bounds write in libpq",
" - CVE-2024-4741 (CVSS 9.8): OpenSSL use after free in SSL_read",
"High: 7 vulnerabilities found",
" - CVE-2024-24786 (CVSS 7.5): Buffer overrun in Google ProtoBuf",
"Remediation: Update base image to nginx:1.25-alpine or later"
]
},
{
"input": "Find vulnerabilities in my Node.js project dependencies",
"output": [
"Scan results for ./package-lock.json:",
"MEDIUM: 12 vulnerabilities found",
" - CVE-2024-37890 (CVSS 7.5): Prototype pollution in package-name",
" - CVE-2024-21538 (CVSS 6.1): XSS vulnerability in dependency",
"Remediation: Run npm update to patch affected packages"
]
},
{
"input": "Check Terraform files for security issues",
"output": [
"IaC Misconfigurations in terraform/:",
"HIGH: 2 findings",
" - K8s privilege escalation: Deployment runs privileged container",
" - CIS benchmark: root user specified in container",
"MEDIUM: 4 findings",
" - Resource limits not specified",
" - Missing network policy"
]
}
],
"best_practices": [
"Run Trivy scans in CI/CD pipelines before deploying to production environments",
"Use severity filtering (CRITICAL,HIGH) to focus on actionable findings initially",
"Generate SBOMs during build time for supply chain transparency and incident response"
],
"anti_patterns": [
"Scanning production images without first building and testing in staging environments",
"Ignoring false positive rates without documenting accepted risks in .trivyignore",
"Running scans without caching the vulnerability database for faster subsequent scans"
],
"faq": [
{
"question": "Which languages does Trivy support for dependency scanning?",
"answer": "Trivy supports Go, Python, Node.js, Java, .NET, PHP, Ruby, Rust, and many other languages through package manifest files."
},
{
"question": "What is the minimum Trivy version required for SARIF output?",
"answer": "Trivy v0.31.0 or later supports SARIF format output for integration with GitHub Security tab."
},
{
"question": "How do I integrate Trivy scans into my existing CI/CD pipeline?",
"answer": "Use the aquasecurity/trivy-action for GitHub Actions or run trivy CLI directly in any CI system with JSON or SARIF output."
},
{
"question": "Is my scan data sent to external servers?",
"answer": "By default, Trivy downloads its vulnerability database from GitHub but scan results stay local. Configure offline mode for air-gapped environments."
},
{
"question": "Why am I seeing false positives in my scan results?",
"answer": "False positives occur when CVEs apply to different versions or contexts. Use .trivyignore files to suppress confirmed false positives with justification."
},
{
"question": "How does Trivy compare to other SCA tools like Snyk or OWASP Dependency-Check?",
"answer": "Trivy is open-source, fast, and covers containers, IaC, and dependencies. Snyk offers more integrations; Dependency-Check has broader language support but slower scans."
}
]
},
"file_structure": [
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 458
}
]
}
Related skills
FAQ
What can Trivy scan?
Containers, filesystems, and git repositories for CVEs in OS packages and dependencies, IaC misconfigs, exposed secrets, and licenses.
Which SBOM formats are supported?
Trivy generates CycloneDX and SPDX SBOMs.