[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B995P6RCKBKCX5390WRNJQ":3,"skill-same:01M7B995P6RCKBKCX5390WRNJQ":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M7B995P6RCKBKCX5390WRNJQ","scanning-iac-and-images-with-trivy",null,"Scans container images, Infrastructure-as-Code (Terraform, CloudFormation, Kubernetes manifests, Dockerfile, Helm), filesystems, git repos, and SBOMs with Trivy's vuln, misconfig, secret, and license scanners. Use when building a CI\u002FCD security gate that scans images before push, IaC before apply, or SBOMs for supply-chain weaknesses, and fails the build on policy violations.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: scanning-iac-and-images-with-trivy\ndescription: Scans container images, Infrastructure-as-Code (Terraform, CloudFormation,\n  Kubernetes manifests, Dockerfile, Helm), filesystems, git repos, and SBOMs with Trivy's\n  vuln, misconfig, secret, and license scanners. Use when building a CI\u002FCD security\n  gate that scans images before push, IaC before apply, or SBOMs for supply-chain\n  weaknesses, and fails the build on policy violations.\ndomain: cybersecurity\nsubdomain: devsecops\ntags:\n- devsecops\n- trivy\n- container-security\n- vulnerability-scanning\n- iac-security\n- sbom\n- ci-cd\n- misconfiguration\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- ID.RA-01\nmitre_attack:\n- T1525\n---\n# Scanning IaC and Images with Trivy\n\n## Overview\n\nTrivy (by Aqua Security) is a comprehensive, open-source security scanner that finds vulnerabilities (CVEs), misconfigurations (IaC), secrets, software licenses, and software supply-chain weaknesses across a wide range of targets: container images, filesystems, Git repositories, virtual machine images, Kubernetes clusters, and SBOM documents. It is widely adopted as a \"shift-left\" gate in CI\u002FCD pipelines because it is fast, runs as a single static binary, requires no agent, and supports machine-readable output formats (JSON, SARIF, CycloneDX, SPDX) for integration with code-scanning dashboards.\n\nTrivy bundles four primary scanners that can be toggled with `--scanners`:\n\n- **vuln** — OS package and language-dependency vulnerability detection (CVE matching against the Trivy vulnerability DB).\n- **misconfig** — Infrastructure-as-Code and configuration misconfiguration detection (Terraform, CloudFormation, Kubernetes manifests, Dockerfile, Helm) using built-in and custom Rego policies.\n- **secret** — Hard-coded secret\u002Fcredential detection (API keys, tokens, private keys).\n- **license** — Software license identification and policy enforcement.\n\nThis skill covers building a Trivy-based scanning workflow that gates a CI\u002FCD pipeline: scanning images before push, scanning IaC before apply, generating and re-scanning SBOMs, and failing builds on policy violations. Detecting these weaknesses defends against the MITRE ATT&CK technique **T1525 (Implant Internal Image)**, where adversaries plant malicious or vulnerable images in a registry to be deployed across the environment.\n\n## When to Use\n\n- When integrating vulnerability and misconfiguration scanning into a CI\u002FCD pipeline as a quality\u002Fsecurity gate before images are pushed or infrastructure is applied.\n- When auditing container images in a registry for known CVEs prior to deployment.\n- When validating Terraform, CloudFormation, Kubernetes, Dockerfile, or Helm IaC for security misconfigurations.\n- When generating an SBOM (CycloneDX\u002FSPDX) for supply-chain transparency and later re-scanning that SBOM for newly disclosed CVEs.\n- When scanning a running Kubernetes cluster for vulnerable workloads and misconfigured RBAC\u002Fresources.\n- When enforcing license compliance policy on dependencies.\n\n## Prerequisites\n\n- A Linux\u002FmacOS\u002FWindows host or CI runner with network access to download the Trivy vulnerability database.\n- Docker (optional) if scanning local images by name or using the containerized Trivy.\n- Install Trivy (Aqua Security official methods):\n\n```bash\n# Debian\u002FUbuntu (APT repository)\nsudo apt-get install -y wget gnupg\nwget -qO - https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb\u002Fpublic.key | gpg --dearmor | sudo tee \u002Fusr\u002Fshare\u002Fkeyrings\u002Ftrivy.gpg > \u002Fdev\u002Fnull\necho \"deb [signed-by=\u002Fusr\u002Fshare\u002Fkeyrings\u002Ftrivy.gpg] https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb generic main\" | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Ftrivy.list\nsudo apt-get update\nsudo apt-get install -y trivy\n\n# RHEL\u002FCentOS (YUM repository), macOS (Homebrew), and install script\nbrew install trivy\ncurl -sfL https:\u002F\u002Fraw.githubusercontent.com\u002Faquasecurity\u002Ftrivy\u002Fmain\u002Fcontrib\u002Finstall.sh | sudo sh -s -- -b \u002Fusr\u002Flocal\u002Fbin\n\n# Containerized usage (no install)\ndocker run --rm -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock aquasec\u002Ftrivy:latest image python:3.10-alpine\n\n# Verify\ntrivy --version\n```\n\n- For air-gapped or rate-limited environments, pre-download the DB with `trivy image --download-db-only` and the Java\u002Fpolicy bundles as needed.\n\n## Objectives\n\n- Scan a container image for OS and language vulnerabilities and fail the build above a severity threshold.\n- Scan IaC (Terraform\u002FKubernetes\u002FDockerfile) for misconfigurations.\n- Detect hard-coded secrets in a repository or filesystem.\n- Generate a CycloneDX or SPDX SBOM and re-scan it for vulnerabilities.\n- Emit SARIF for GitHub code scanning and JSON for programmatic gating.\n- Wire Trivy into a CI\u002FCD pipeline with `--exit-code` to enforce policy.\n\n## MITRE ATT&CK Mapping\n\n| Technique ID | Name | Tactic | Relevance |\n|--------------|------|--------|-----------|\n| T1525 | Implant Internal Image | Persistence | Trivy detects vulnerable or malicious images\u002Flayers and embedded secrets before they are implanted in a registry and propagated to running workloads. |\n\n## Workflow\n\n### 1. Scan a container image for vulnerabilities\n\nRun a vulnerability-only scan of a registry image, restricting to high\u002Fcritical findings and ignoring CVEs with no available fix:\n\n```bash\ntrivy image \\\n  --scanners vuln \\\n  --severity HIGH,CRITICAL \\\n  --ignore-unfixed \\\n  --format table \\\n  python:3.10-alpine\n```\n\nScan an image saved as a tarball (useful when the image is built but not yet pushed):\n\n```bash\ndocker save myorg\u002Fapp:1.4.0 -o app.tar\ntrivy image --input app.tar --severity CRITICAL --format json --output app-vulns.json\n```\n\n### 2. Enable multiple scanners on an image\n\nRun vulnerability, misconfiguration, secret, and license scanners together:\n\n```bash\ntrivy image \\\n  --scanners vuln,misconfig,secret,license \\\n  --severity MEDIUM,HIGH,CRITICAL \\\n  myorg\u002Fapp:1.4.0\n```\n\nScan the image's embedded config (Dockerfile-equivalent build history and history secrets):\n\n```bash\ntrivy image --image-config-scanners misconfig,secret myorg\u002Fapp:1.4.0\n```\n\n### 3. Scan Infrastructure-as-Code (misconfiguration)\n\nScan a directory of Terraform \u002F Kubernetes \u002F Dockerfile \u002F Helm \u002F CloudFormation for misconfigurations using the `config` target:\n\n```bash\n# Scan a Terraform \u002F IaC directory\ntrivy config \\\n  --severity HIGH,CRITICAL \\\n  --format table \\\n  .\u002Finfra\n\n# Scan with custom Rego policies and a specific policy namespace\ntrivy config \\\n  --config-policy .\u002Fpolicies \\\n  --policy-namespaces user \\\n  .\u002Finfra\n```\n\nAlternatively use the `fs` (filesystem) target with the misconfig scanner explicitly:\n\n```bash\ntrivy fs --scanners misconfig,secret --severity HIGH,CRITICAL .\u002Finfra\n```\n\n### 4. Scan a repository and detect secrets\n\nScan a local working tree (or remote repo) for vulnerabilities in lockfiles and hard-coded secrets:\n\n```bash\n# Local filesystem (dependencies + secrets)\ntrivy fs --scanners vuln,secret --severity HIGH,CRITICAL .\n\n# Remote Git repository\ntrivy repository --scanners vuln,secret https:\u002F\u002Fgithub.com\u002Fmyorg\u002Fmyrepo\n```\n\n### 5. Generate and re-scan an SBOM\n\nProduce a CycloneDX SBOM from an image, then scan the SBOM itself for vulnerabilities (so a stored SBOM can be re-evaluated as new CVEs are disclosed):\n\n```bash\n# Generate CycloneDX SBOM\ntrivy image --format cyclonedx --output sbom.cdx.json myorg\u002Fapp:1.4.0\n\n# Generate SPDX SBOM\ntrivy image --format spdx-json --output sbom.spdx.json myorg\u002Fapp:1.4.0\n\n# Re-scan the SBOM for vulnerabilities later\ntrivy sbom --severity HIGH,CRITICAL sbom.cdx.json\n```\n\n### 6. Emit SARIF for code-scanning dashboards\n\nProduce SARIF for GitHub Advanced Security \u002F code scanning ingestion:\n\n```bash\ntrivy image \\\n  --format sarif \\\n  --output trivy-results.sarif \\\n  --severity HIGH,CRITICAL \\\n  myorg\u002Fapp:1.4.0\n```\n\n### 7. Gate the CI\u002FCD pipeline with exit codes\n\nUse `--exit-code 1` so the pipeline step fails when findings at or above the chosen severity are present. Separate the \"report everything\" run (exit 0) from the \"enforce\" run (exit 1):\n\n```bash\n# 1) Informational report (never fails the build)\ntrivy image --severity LOW,MEDIUM,HIGH,CRITICAL --exit-code 0 --format table myorg\u002Fapp:1.4.0\n\n# 2) Enforcement gate (fails build on HIGH\u002FCRITICAL with a fix available)\ntrivy image \\\n  --severity HIGH,CRITICAL \\\n  --ignore-unfixed \\\n  --exit-code 1 \\\n  --format json --output gate.json \\\n  myorg\u002Fapp:1.4.0\n```\n\nExample GitHub Actions step using the official action:\n\n```yaml\n- name: Run Trivy image scan (gate)\n  uses: aquasecurity\u002Ftrivy-action@master\n  with:\n    image-ref: 'myorg\u002Fapp:1.4.0'\n    format: 'sarif'\n    output: 'trivy-results.sarif'\n    severity: 'HIGH,CRITICAL'\n    ignore-unfixed: true\n    exit-code: '1'\n```\n\n### 8. Manage false positives and the DB\n\nSuppress accepted-risk findings with a `.trivyignore` file and keep the DB current:\n\n```bash\n# .trivyignore — one CVE\u002FAVD\u002Fsecret rule ID per line\necho \"CVE-2023-12345\" >> .trivyignore\necho \"AVD-AWS-0089\"   >> .trivyignore\n\n# Refresh DBs explicitly (useful for caching layers in CI)\ntrivy image --download-db-only\ntrivy image --download-java-db-only\n\n# Scan a Kubernetes cluster (summary report)\ntrivy k8s --report summary --severity HIGH,CRITICAL cluster\n```\n\n## Tools and Resources\n\n| Tool \u002F Resource | Purpose | Link |\n|------------------|---------|------|\n| Trivy | Core scanner CLI | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy |\n| Trivy Documentation | Official docs (targets, scanners, flags) | https:\u002F\u002Ftrivy.dev\u002Flatest\u002Fdocs\u002F |\n| trivy-action | GitHub Actions integration | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-action |\n| Trivy Operator | In-cluster Kubernetes continuous scanning | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-operator |\n| Trivy vulnerability DB | OSS vulnerability data source | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-db |\n| CycloneDX | SBOM standard emitted by Trivy | https:\u002F\u002Fcyclonedx.org\u002F |\n\n## Validation Criteria\n\n- [ ] Trivy installed and `trivy --version` reports a valid version.\n- [ ] Container image scanned for vulnerabilities with severity filtering applied.\n- [ ] Image scanned with multiple scanners (vuln, misconfig, secret, license).\n- [ ] IaC directory scanned with `trivy config` and misconfigurations reviewed.\n- [ ] Secret scanning run against the repository.\n- [ ] CycloneDX\u002FSPDX SBOM generated and successfully re-scanned with `trivy sbom`.\n- [ ] SARIF output produced for the code-scanning dashboard.\n- [ ] CI\u002FCD gate fails the build on HIGH\u002FCRITICAL findings via `--exit-code 1`.\n- [ ] `.trivyignore` configured for accepted-risk findings with documented justification.\n","# Scanning IaC and Images with Trivy\n\n## Overview\n\nTrivy (by Aqua Security) is a comprehensive, open-source security scanner that finds vulnerabilities (CVEs), misconfigurations (IaC), secrets, software licenses, and software supply-chain weaknesses across a wide range of targets: container images, filesystems, Git repositories, virtual machine images, Kubernetes clusters, and SBOM documents. It is widely adopted as a \"shift-left\" gate in CI\u002FCD pipelines because it is fast, runs as a single static binary, requires no agent, and supports machine-readable output formats (JSON, SARIF, CycloneDX, SPDX) for integration with code-scanning dashboards.\n\nTrivy bundles four primary scanners that can be toggled with `--scanners`:\n\n- **vuln** — OS package and language-dependency vulnerability detection (CVE matching against the Trivy vulnerability DB).\n- **misconfig** — Infrastructure-as-Code and configuration misconfiguration detection (Terraform, CloudFormation, Kubernetes manifests, Dockerfile, Helm) using built-in and custom Rego policies.\n- **secret** — Hard-coded secret\u002Fcredential detection (API keys, tokens, private keys).\n- **license** — Software license identification and policy enforcement.\n\nThis skill covers building a Trivy-based scanning workflow that gates a CI\u002FCD pipeline: scanning images before push, scanning IaC before apply, generating and re-scanning SBOMs, and failing builds on policy violations. Detecting these weaknesses defends against the MITRE ATT&CK technique **T1525 (Implant Internal Image)**, where adversaries plant malicious or vulnerable images in a registry to be deployed across the environment.\n\n## When to Use\n\n- When integrating vulnerability and misconfiguration scanning into a CI\u002FCD pipeline as a quality\u002Fsecurity gate before images are pushed or infrastructure is applied.\n- When auditing container images in a registry for known CVEs prior to deployment.\n- When validating Terraform, CloudFormation, Kubernetes, Dockerfile, or Helm IaC for security misconfigurations.\n- When generating an SBOM (CycloneDX\u002FSPDX) for supply-chain transparency and later re-scanning that SBOM for newly disclosed CVEs.\n- When scanning a running Kubernetes cluster for vulnerable workloads and misconfigured RBAC\u002Fresources.\n- When enforcing license compliance policy on dependencies.\n\n## Prerequisites\n\n- A Linux\u002FmacOS\u002FWindows host or CI runner with network access to download the Trivy vulnerability database.\n- Docker (optional) if scanning local images by name or using the containerized Trivy.\n- Install Trivy (Aqua Security official methods):\n\n```bash\n# Debian\u002FUbuntu (APT repository)\nsudo apt-get install -y wget gnupg\nwget -qO - https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb\u002Fpublic.key | gpg --dearmor | sudo tee \u002Fusr\u002Fshare\u002Fkeyrings\u002Ftrivy.gpg > \u002Fdev\u002Fnull\necho \"deb [signed-by=\u002Fusr\u002Fshare\u002Fkeyrings\u002Ftrivy.gpg] https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb generic main\" | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Ftrivy.list\nsudo apt-get update\nsudo apt-get install -y trivy\n\n# RHEL\u002FCentOS (YUM repository), macOS (Homebrew), and install script\nbrew install trivy\ncurl -sfL https:\u002F\u002Fraw.githubusercontent.com\u002Faquasecurity\u002Ftrivy\u002Fmain\u002Fcontrib\u002Finstall.sh | sudo sh -s -- -b \u002Fusr\u002Flocal\u002Fbin\n\n# Containerized usage (no install)\ndocker run --rm -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock aquasec\u002Ftrivy:latest image python:3.10-alpine\n\n# Verify\ntrivy --version\n```\n\n- For air-gapped or rate-limited environments, pre-download the DB with `trivy image --download-db-only` and the Java\u002Fpolicy bundles as needed.\n\n## Objectives\n\n- Scan a container image for OS and language vulnerabilities and fail the build above a severity threshold.\n- Scan IaC (Terraform\u002FKubernetes\u002FDockerfile) for misconfigurations.\n- Detect hard-coded secrets in a repository or filesystem.\n- Generate a CycloneDX or SPDX SBOM and re-scan it for vulnerabilities.\n- Emit SARIF for GitHub code scanning and JSON for programmatic gating.\n- Wire Trivy into a CI\u002FCD pipeline with `--exit-code` to enforce policy.\n\n## MITRE ATT&CK Mapping\n\n| Technique ID | Name | Tactic | Relevance |\n|--------------|------|--------|-----------|\n| T1525 | Implant Internal Image | Persistence | Trivy detects vulnerable or malicious images\u002Flayers and embedded secrets before they are implanted in a registry and propagated to running workloads. |\n\n## Workflow\n\n### 1. Scan a container image for vulnerabilities\n\nRun a vulnerability-only scan of a registry image, restricting to high\u002Fcritical findings and ignoring CVEs with no available fix:\n\n```bash\ntrivy image \\\n  --scanners vuln \\\n  --severity HIGH,CRITICAL \\\n  --ignore-unfixed \\\n  --format table \\\n  python:3.10-alpine\n```\n\nScan an image saved as a tarball (useful when the image is built but not yet pushed):\n\n```bash\ndocker save myorg\u002Fapp:1.4.0 -o app.tar\ntrivy image --input app.tar --severity CRITICAL --format json --output app-vulns.json\n```\n\n### 2. Enable multiple scanners on an image\n\nRun vulnerability, misconfiguration, secret, and license scanners together:\n\n```bash\ntrivy image \\\n  --scanners vuln,misconfig,secret,license \\\n  --severity MEDIUM,HIGH,CRITICAL \\\n  myorg\u002Fapp:1.4.0\n```\n\nScan the image's embedded config (Dockerfile-equivalent build history and history secrets):\n\n```bash\ntrivy image --image-config-scanners misconfig,secret myorg\u002Fapp:1.4.0\n```\n\n### 3. Scan Infrastructure-as-Code (misconfiguration)\n\nScan a directory of Terraform \u002F Kubernetes \u002F Dockerfile \u002F Helm \u002F CloudFormation for misconfigurations using the `config` target:\n\n```bash\n# Scan a Terraform \u002F IaC directory\ntrivy config \\\n  --severity HIGH,CRITICAL \\\n  --format table \\\n  .\u002Finfra\n\n# Scan with custom Rego policies and a specific policy namespace\ntrivy config \\\n  --config-policy .\u002Fpolicies \\\n  --policy-namespaces user \\\n  .\u002Finfra\n```\n\nAlternatively use the `fs` (filesystem) target with the misconfig scanner explicitly:\n\n```bash\ntrivy fs --scanners misconfig,secret --severity HIGH,CRITICAL .\u002Finfra\n```\n\n### 4. Scan a repository and detect secrets\n\nScan a local working tree (or remote repo) for vulnerabilities in lockfiles and hard-coded secrets:\n\n```bash\n# Local filesystem (dependencies + secrets)\ntrivy fs --scanners vuln,secret --severity HIGH,CRITICAL .\n\n# Remote Git repository\ntrivy repository --scanners vuln,secret https:\u002F\u002Fgithub.com\u002Fmyorg\u002Fmyrepo\n```\n\n### 5. Generate and re-scan an SBOM\n\nProduce a CycloneDX SBOM from an image, then scan the SBOM itself for vulnerabilities (so a stored SBOM can be re-evaluated as new CVEs are disclosed):\n\n```bash\n# Generate CycloneDX SBOM\ntrivy image --format cyclonedx --output sbom.cdx.json myorg\u002Fapp:1.4.0\n\n# Generate SPDX SBOM\ntrivy image --format spdx-json --output sbom.spdx.json myorg\u002Fapp:1.4.0\n\n# Re-scan the SBOM for vulnerabilities later\ntrivy sbom --severity HIGH,CRITICAL sbom.cdx.json\n```\n\n### 6. Emit SARIF for code-scanning dashboards\n\nProduce SARIF for GitHub Advanced Security \u002F code scanning ingestion:\n\n```bash\ntrivy image \\\n  --format sarif \\\n  --output trivy-results.sarif \\\n  --severity HIGH,CRITICAL \\\n  myorg\u002Fapp:1.4.0\n```\n\n### 7. Gate the CI\u002FCD pipeline with exit codes\n\nUse `--exit-code 1` so the pipeline step fails when findings at or above the chosen severity are present. Separate the \"report everything\" run (exit 0) from the \"enforce\" run (exit 1):\n\n```bash\n# 1) Informational report (never fails the build)\ntrivy image --severity LOW,MEDIUM,HIGH,CRITICAL --exit-code 0 --format table myorg\u002Fapp:1.4.0\n\n# 2) Enforcement gate (fails build on HIGH\u002FCRITICAL with a fix available)\ntrivy image \\\n  --severity HIGH,CRITICAL \\\n  --ignore-unfixed \\\n  --exit-code 1 \\\n  --format json --output gate.json \\\n  myorg\u002Fapp:1.4.0\n```\n\nExample GitHub Actions step using the official action:\n\n```yaml\n- name: Run Trivy image scan (gate)\n  uses: aquasecurity\u002Ftrivy-action@master\n  with:\n    image-ref: 'myorg\u002Fapp:1.4.0'\n    format: 'sarif'\n    output: 'trivy-results.sarif'\n    severity: 'HIGH,CRITICAL'\n    ignore-unfixed: true\n    exit-code: '1'\n```\n\n### 8. Manage false positives and the DB\n\nSuppress accepted-risk findings with a `.trivyignore` file and keep the DB current:\n\n```bash\n# .trivyignore — one CVE\u002FAVD\u002Fsecret rule ID per line\necho \"CVE-2023-12345\" >> .trivyignore\necho \"AVD-AWS-0089\"   >> .trivyignore\n\n# Refresh DBs explicitly (useful for caching layers in CI)\ntrivy image --download-db-only\ntrivy image --download-java-db-only\n\n# Scan a Kubernetes cluster (summary report)\ntrivy k8s --report summary --severity HIGH,CRITICAL cluster\n```\n\n## Tools and Resources\n\n| Tool \u002F Resource | Purpose | Link |\n|------------------|---------|------|\n| Trivy | Core scanner CLI | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy |\n| Trivy Documentation | Official docs (targets, scanners, flags) | https:\u002F\u002Ftrivy.dev\u002Flatest\u002Fdocs\u002F |\n| trivy-action | GitHub Actions integration | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-action |\n| Trivy Operator | In-cluster Kubernetes continuous scanning | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-operator |\n| Trivy vulnerability DB | OSS vulnerability data source | https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy-db |\n| CycloneDX | SBOM standard emitted by Trivy | https:\u002F\u002Fcyclonedx.org\u002F |\n\n## Validation Criteria\n\n- [ ] Trivy installed and `trivy --version` reports a valid version.\n- [ ] Container image scanned for vulnerabilities with severity filtering applied.\n- [ ] Image scanned with multiple scanners (vuln, misconfig, secret, license).\n- [ ] IaC directory scanned with `trivy config` and misconfigurations reviewed.\n- [ ] Secret scanning run against the repository.\n- [ ] CycloneDX\u002FSPDX SBOM generated and successfully re-scanned with `trivy sbom`.\n- [ ] SARIF output produced for the code-scanning dashboard.\n- [ ] CI\u002FCD gate fails the build on HIGH\u002FCRITICAL findings via `--exit-code 1`.\n- [ ] `.trivyignore` configured for accepted-risk findings with documented justification.\n",{"name":5,"tags":24,"author":33,"domain":34,"license":14,"version":35,"nist_csf":36,"subdomain":25,"description":7,"mitre_attack":38},[25,26,27,28,29,30,31,32],"devsecops","trivy","container-security","vulnerability-scanning","iac-security","sbom","ci-cd","misconfiguration","mahipal","cybersecurity","1.0",[37],"ID.RA-01",[39],"T1525","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill scanning-iac-and-images-with-trivy",{"tool":52,"command":53},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill scanning-iac-and-images-with-trivy",{"tool":55,"command":56},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill scanning-iac-and-images-with-trivy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002FSKILL.md",true,[60,64,70,74],{"path":61,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fapi-reference.md","REFERENCE","参考文档",2940,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002Freferences\u002Fapi-reference.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fstandards.md",1424,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002Freferences\u002Fstandards.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fagent.py","SCRIPT","脚本",6174,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fscanning-iac-and-images-with-trivy\u002Fscripts\u002Fagent.py",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]