[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73FK789SC4CNDY5XT2XZCFM":3,"skill-same:01M73FK789SC4CNDY5XT2XZCFM":108},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M73FK789SC4CNDY5XT2XZCFM","scanning-containers-with-trivy-in-cicd",null,"This skill covers integrating Aqua Security's Trivy scanner into CI\u002FCD pipelines for comprehensive container image vulnerability detection. It addresses scanning Docker images for OS package and application dependency CVEs, detecting misconfigurations in Dockerfiles, scanning filesystem and git repositories, and establishing severity-based quality gates that block deployment of vulnerable images.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: scanning-containers-with-trivy-in-cicd\ndescription: 'This skill covers integrating Aqua Security''s Trivy scanner into CI\u002FCD\n  pipelines for comprehensive container image vulnerability detection. It addresses\n  scanning Docker images for OS package and application dependency CVEs, detecting\n  misconfigurations in Dockerfiles, scanning filesystem and git repositories, and\n  establishing severity-based quality gates that block deployment of vulnerable images.\n\n  '\ndomain: cybersecurity\nsubdomain: devsecops\ntags:\n- devsecops\n- cicd\n- trivy\n- container-security\n- vulnerability-scanning\n- secure-sdlc\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- GV.SC-07\n- ID.IM-04\n- PR.PS-04\nmitre_attack:\n- T1195\n- T1554\n- T1059.004\n- T1610\n- T1611\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n\n# Scanning Containers with Trivy in CI\u002FCD\n\n## When to Use\n\n- When building Docker container images in CI\u002FCD and needing automated vulnerability scanning before registry push\n- When establishing quality gates that prevent images with critical or high CVEs from reaching production\n- When compliance requirements mandate vulnerability scanning of all container images before deployment\n- When scanning IaC files (Dockerfiles, Kubernetes manifests) alongside container image scanning\n- When needing a single tool to scan OS packages, language-specific dependencies, and misconfigurations\n\n**Do not use** for runtime container security monitoring (use Falco), for scanning running containers in production (use runtime agents), or when only scanning application source code without containerization (use SAST tools).\n\n## Prerequisites\n\n- Trivy CLI installed (v0.50+) or access to aquasecurity\u002Ftrivy-action GitHub Action\n- Docker daemon available in CI\u002FCD for building and scanning images\n- Container registry credentials for pulling base images and pushing scanned images\n- Trivy vulnerability database accessible (downloaded automatically or cached)\n\n## Workflow\n\n### Step 1: Configure Trivy Scanning in GitHub Actions\n\nSet up a GitHub Actions workflow that builds a Docker image and scans it with Trivy before pushing to a container registry.\n\n```yaml\n# .github\u002Fworkflows\u002Fcontainer-security.yml\nname: Container Security Scan\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n    paths:\n      - 'Dockerfile'\n      - 'docker-compose*.yml'\n      - 'src\u002F**'\n      - 'requirements*.txt'\n      - 'package*.json'\n\njobs:\n  build-and-scan:\n    runs-on: ubuntu-latest\n    permissions:\n      security-events: write\n      contents: read\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build Docker image\n        run: docker build -t app:${{ github.sha }} .\n\n      - name: Run Trivy vulnerability scanner\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          format: 'sarif'\n          output: 'trivy-results.sarif'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          ignore-unfixed: true\n\n      - name: Upload Trivy scan results\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v3\n        if: always()\n        with:\n          sarif_file: 'trivy-results.sarif'\n          category: 'trivy-container'\n\n      - name: Run Trivy misconfiguration scanner\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'config'\n          scan-ref: '.'\n          format: 'table'\n          exit-code: '1'\n          severity: 'CRITICAL,HIGH'\n```\n\n### Step 2: Scan Dockerfiles for Misconfigurations\n\nTrivy detects common Dockerfile security issues such as running as root, using latest tags, and exposing unnecessary ports.\n\n```bash\n# Scan Dockerfile for misconfigurations\ntrivy config --severity HIGH,CRITICAL .\u002FDockerfile\n\n# Scan with custom policy directory\ntrivy config --policy .\u002Fsecurity-policies --severity MEDIUM,HIGH,CRITICAL .\n\n# Example secure Dockerfile practices Trivy checks for:\n# - USER instruction present (not running as root)\n# - HEALTHCHECK instruction defined\n# - Base image uses specific tag, not :latest\n# - No secrets in ENV or ARG instructions\n# - COPY preferred over ADD\n```\n\n### Step 3: Integrate with GitLab CI\u002FCD\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - build\n  - scan\n  - push\n\nvariables:\n  TRIVY_CACHE_DIR: .trivycache\u002F\n\nbuild:\n  stage: build\n  script:\n    - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .\n    - docker save $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -o image.tar\n  artifacts:\n    paths:\n      - image.tar\n\ntrivy-scan:\n  stage: scan\n  image:\n    name: aquasec\u002Ftrivy:latest\n    entrypoint: [\"\"]\n  cache:\n    paths:\n      - .trivycache\u002F\n  script:\n    - trivy image\n        --input image.tar\n        --exit-code 1\n        --severity CRITICAL,HIGH\n        --ignore-unfixed\n        --format json\n        --output trivy-report.json\n    - trivy image\n        --input image.tar\n        --severity CRITICAL,HIGH,MEDIUM\n        --format table\n  artifacts:\n    reports:\n      container_scanning: trivy-report.json\n    paths:\n      - trivy-report.json\n  allow_failure: false\n\npush:\n  stage: push\n  needs: [trivy-scan]\n  script:\n    - docker load -i image.tar\n    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n```\n\n### Step 4: Configure Trivy Ignore and Exception Handling\n\nManage false positives and accepted risks through Trivy's ignore file and VEX statements.\n\n```yaml\n# .trivyignore.yaml\nvulnerabilities:\n  - id: CVE-2023-44487    # HTTP\u002F2 rapid reset - mitigated at load balancer\n    statement: \"Mitigated by WAF rate limiting at ingress layer\"\n    expires: 2026-06-01\n\n  - id: CVE-2024-21626    # runc container escape - patched in base image update\n    statement: \"Tracked in JIRA-SEC-1234, base image update scheduled\"\n    expires: 2026-03-15\n\nmisconfigurations:\n  - id: DS002             # User not set - required for init containers\n    paths:\n      - \"docker\u002Finit-container\u002FDockerfile\"\n    statement: \"Init container requires root for volume permission setup\"\n```\n\n### Step 5: Implement Database Caching and Offline Scanning\n\nCache the Trivy vulnerability database in CI\u002FCD to reduce scan times and enable air-gapped environments.\n\n```yaml\n# GitHub Actions with database caching\n- name: Cache Trivy DB\n  uses: actions\u002Fcache@v4\n  with:\n    path: \u002Ftmp\u002Ftrivy-db\n    key: trivy-db-${{ hashFiles('.github\u002Fworkflows\u002Fcontainer-security.yml') }}\n    restore-keys: trivy-db-\n\n- name: Run Trivy with cached DB\n  uses: aquasecurity\u002Ftrivy-action@0.28.0\n  with:\n    image-ref: 'app:${{ github.sha }}'\n    cache-dir: \u002Ftmp\u002Ftrivy-db\n    format: 'json'\n    output: 'trivy-results.json'\n    severity: 'CRITICAL,HIGH'\n    exit-code: '1'\n```\n\n```bash\n# Air-gapped: Download DB manually and mount\ntrivy image --download-db-only --cache-dir \u002Fpath\u002Fto\u002Fcache\n# Transfer cache to air-gapped system\ntrivy image --skip-db-update --cache-dir \u002Fpath\u002Fto\u002Fcache myimage:tag\n```\n\n### Step 6: Generate SBOM and Scan for License Compliance\n\nUse Trivy to generate Software Bill of Materials alongside vulnerability scanning.\n\n```bash\n# Generate SBOM in CycloneDX format\ntrivy image --format cyclonedx --output sbom.cdx.json app:latest\n\n# Generate SBOM in SPDX format\ntrivy image --format spdx-json --output sbom.spdx.json app:latest\n\n# Scan SBOM for vulnerabilities (decouple generation from scanning)\ntrivy sbom sbom.cdx.json --severity CRITICAL,HIGH\n\n# Scan with license detection\ntrivy image --scanners vuln,license --severity HIGH,CRITICAL app:latest\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| CVE | Common Vulnerabilities and Exposures — standardized identifiers for publicly known security vulnerabilities |\n| Vulnerability DB | Trivy's regularly updated database aggregating CVE data from NVD, vendor advisories, and language-specific sources |\n| Misconfiguration | Security-relevant configuration issue in Dockerfiles, Kubernetes manifests, or IaC templates |\n| SBOM | Software Bill of Materials — complete inventory of all components and dependencies in a container image |\n| Ignore Unfixed | Flag to skip CVEs without available patches, reducing noise from vulnerabilities with no actionable fix |\n| VEX | Vulnerability Exploitability eXchange — machine-readable statements about whether a vulnerability is exploitable in context |\n| Exit Code | Non-zero return code from Trivy when findings exceed the severity threshold, used to fail CI\u002FCD pipelines |\n\n## Tools & Systems\n\n- **Trivy**: Open-source vulnerability scanner by Aqua Security supporting images, filesystems, repos, and IaC\n- **trivy-action**: Official GitHub Action for running Trivy scans in GitHub Actions workflows\n- **Trivy Operator**: Kubernetes operator that continuously scans cluster workloads with Trivy\n- **Grype**: Alternative image scanner by Anchore for comparison and validation of scan results\n- **Harbor**: Container registry with built-in Trivy integration for automatic image scanning on push\n\n## Common Scenarios\n\n### Scenario: Multi-Stage Build with Separate Scan and Push\n\n**Context**: A team builds multi-stage Docker images and needs to scan the final production image before pushing to ECR, while also scanning the build stage for supply chain risks.\n\n**Approach**:\n1. Build the Docker image with `--target production` for the final stage\n2. Run Trivy with `--severity CRITICAL,HIGH --exit-code 1 --ignore-unfixed` to block on exploitable issues\n3. Generate an SBOM in CycloneDX format and store as a build artifact\n4. Upload SARIF results to GitHub Security tab for visibility\n5. Only push to ECR if the Trivy scan exits with code 0\n6. Tag the pushed image with the scan timestamp and Trivy DB version for audit traceability\n\n**Pitfalls**: Scanning only the final stage misses vulnerable packages that were present in build stages and may have influenced the build. Run `trivy fs` on the build context separately. Caching the Trivy DB too aggressively (weekly) means newly published CVEs take days to appear in scans.\n\n## Output Format\n\n```\nTrivy Container Scan Report\n=============================\nImage: app:a1b2c3d4\nBase Image: python:3.12-slim-bookworm\nScan Date: 2026-02-23\nDB Version: 2026-02-23T00:15:00Z\n\nVULNERABILITY SUMMARY:\n  Total: 47\n  Critical: 2\n  High: 5\n  Medium: 18\n  Low: 22\n  Unfixed: 8 (excluded from gate)\n\nCRITICAL FINDINGS:\n  CVE-2025-12345  libssl3    3.0.11-1  3.0.13-1  OpenSSL buffer overflow\n  CVE-2025-67890  curl       7.88.1-10 7.88.1-12 curl HSTS bypass\n\nHIGH FINDINGS:\n  CVE-2025-11111  zlib1g     1.2.13    1.2.13.1  zlib heap buffer overflow\n  CVE-2025-22222  python3.12 3.12.1    3.12.3    CPython path traversal\n  CVE-2025-33333  requests   2.31.0    2.32.0    requests SSRF in redirects\n\nMISCONFIGURATION:\n  DS002  [HIGH]   Dockerfile: USER instruction not set (running as root)\n  DS026  [MEDIUM] Dockerfile: No HEALTHCHECK defined\n\nQUALITY GATE: FAILED (2 Critical, 5 High findings)\n```\n","# Scanning Containers with Trivy in CI\u002FCD\n\n## When to Use\n\n- When building Docker container images in CI\u002FCD and needing automated vulnerability scanning before registry push\n- When establishing quality gates that prevent images with critical or high CVEs from reaching production\n- When compliance requirements mandate vulnerability scanning of all container images before deployment\n- When scanning IaC files (Dockerfiles, Kubernetes manifests) alongside container image scanning\n- When needing a single tool to scan OS packages, language-specific dependencies, and misconfigurations\n\n**Do not use** for runtime container security monitoring (use Falco), for scanning running containers in production (use runtime agents), or when only scanning application source code without containerization (use SAST tools).\n\n## Prerequisites\n\n- Trivy CLI installed (v0.50+) or access to aquasecurity\u002Ftrivy-action GitHub Action\n- Docker daemon available in CI\u002FCD for building and scanning images\n- Container registry credentials for pulling base images and pushing scanned images\n- Trivy vulnerability database accessible (downloaded automatically or cached)\n\n## Workflow\n\n### Step 1: Configure Trivy Scanning in GitHub Actions\n\nSet up a GitHub Actions workflow that builds a Docker image and scans it with Trivy before pushing to a container registry.\n\n```yaml\n# .github\u002Fworkflows\u002Fcontainer-security.yml\nname: Container Security Scan\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n    paths:\n      - 'Dockerfile'\n      - 'docker-compose*.yml'\n      - 'src\u002F**'\n      - 'requirements*.txt'\n      - 'package*.json'\n\njobs:\n  build-and-scan:\n    runs-on: ubuntu-latest\n    permissions:\n      security-events: write\n      contents: read\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build Docker image\n        run: docker build -t app:${{ github.sha }} .\n\n      - name: Run Trivy vulnerability scanner\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          format: 'sarif'\n          output: 'trivy-results.sarif'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          ignore-unfixed: true\n\n      - name: Upload Trivy scan results\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v3\n        if: always()\n        with:\n          sarif_file: 'trivy-results.sarif'\n          category: 'trivy-container'\n\n      - name: Run Trivy misconfiguration scanner\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'config'\n          scan-ref: '.'\n          format: 'table'\n          exit-code: '1'\n          severity: 'CRITICAL,HIGH'\n```\n\n### Step 2: Scan Dockerfiles for Misconfigurations\n\nTrivy detects common Dockerfile security issues such as running as root, using latest tags, and exposing unnecessary ports.\n\n```bash\n# Scan Dockerfile for misconfigurations\ntrivy config --severity HIGH,CRITICAL .\u002FDockerfile\n\n# Scan with custom policy directory\ntrivy config --policy .\u002Fsecurity-policies --severity MEDIUM,HIGH,CRITICAL .\n\n# Example secure Dockerfile practices Trivy checks for:\n# - USER instruction present (not running as root)\n# - HEALTHCHECK instruction defined\n# - Base image uses specific tag, not :latest\n# - No secrets in ENV or ARG instructions\n# - COPY preferred over ADD\n```\n\n### Step 3: Integrate with GitLab CI\u002FCD\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - build\n  - scan\n  - push\n\nvariables:\n  TRIVY_CACHE_DIR: .trivycache\u002F\n\nbuild:\n  stage: build\n  script:\n    - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .\n    - docker save $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -o image.tar\n  artifacts:\n    paths:\n      - image.tar\n\ntrivy-scan:\n  stage: scan\n  image:\n    name: aquasec\u002Ftrivy:latest\n    entrypoint: [\"\"]\n  cache:\n    paths:\n      - .trivycache\u002F\n  script:\n    - trivy image\n        --input image.tar\n        --exit-code 1\n        --severity CRITICAL,HIGH\n        --ignore-unfixed\n        --format json\n        --output trivy-report.json\n    - trivy image\n        --input image.tar\n        --severity CRITICAL,HIGH,MEDIUM\n        --format table\n  artifacts:\n    reports:\n      container_scanning: trivy-report.json\n    paths:\n      - trivy-report.json\n  allow_failure: false\n\npush:\n  stage: push\n  needs: [trivy-scan]\n  script:\n    - docker load -i image.tar\n    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n```\n\n### Step 4: Configure Trivy Ignore and Exception Handling\n\nManage false positives and accepted risks through Trivy's ignore file and VEX statements.\n\n```yaml\n# .trivyignore.yaml\nvulnerabilities:\n  - id: CVE-2023-44487    # HTTP\u002F2 rapid reset - mitigated at load balancer\n    statement: \"Mitigated by WAF rate limiting at ingress layer\"\n    expires: 2026-06-01\n\n  - id: CVE-2024-21626    # runc container escape - patched in base image update\n    statement: \"Tracked in JIRA-SEC-1234, base image update scheduled\"\n    expires: 2026-03-15\n\nmisconfigurations:\n  - id: DS002             # User not set - required for init containers\n    paths:\n      - \"docker\u002Finit-container\u002FDockerfile\"\n    statement: \"Init container requires root for volume permission setup\"\n```\n\n### Step 5: Implement Database Caching and Offline Scanning\n\nCache the Trivy vulnerability database in CI\u002FCD to reduce scan times and enable air-gapped environments.\n\n```yaml\n# GitHub Actions with database caching\n- name: Cache Trivy DB\n  uses: actions\u002Fcache@v4\n  with:\n    path: \u002Ftmp\u002Ftrivy-db\n    key: trivy-db-${{ hashFiles('.github\u002Fworkflows\u002Fcontainer-security.yml') }}\n    restore-keys: trivy-db-\n\n- name: Run Trivy with cached DB\n  uses: aquasecurity\u002Ftrivy-action@0.28.0\n  with:\n    image-ref: 'app:${{ github.sha }}'\n    cache-dir: \u002Ftmp\u002Ftrivy-db\n    format: 'json'\n    output: 'trivy-results.json'\n    severity: 'CRITICAL,HIGH'\n    exit-code: '1'\n```\n\n```bash\n# Air-gapped: Download DB manually and mount\ntrivy image --download-db-only --cache-dir \u002Fpath\u002Fto\u002Fcache\n# Transfer cache to air-gapped system\ntrivy image --skip-db-update --cache-dir \u002Fpath\u002Fto\u002Fcache myimage:tag\n```\n\n### Step 6: Generate SBOM and Scan for License Compliance\n\nUse Trivy to generate Software Bill of Materials alongside vulnerability scanning.\n\n```bash\n# Generate SBOM in CycloneDX format\ntrivy image --format cyclonedx --output sbom.cdx.json app:latest\n\n# Generate SBOM in SPDX format\ntrivy image --format spdx-json --output sbom.spdx.json app:latest\n\n# Scan SBOM for vulnerabilities (decouple generation from scanning)\ntrivy sbom sbom.cdx.json --severity CRITICAL,HIGH\n\n# Scan with license detection\ntrivy image --scanners vuln,license --severity HIGH,CRITICAL app:latest\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| CVE | Common Vulnerabilities and Exposures — standardized identifiers for publicly known security vulnerabilities |\n| Vulnerability DB | Trivy's regularly updated database aggregating CVE data from NVD, vendor advisories, and language-specific sources |\n| Misconfiguration | Security-relevant configuration issue in Dockerfiles, Kubernetes manifests, or IaC templates |\n| SBOM | Software Bill of Materials — complete inventory of all components and dependencies in a container image |\n| Ignore Unfixed | Flag to skip CVEs without available patches, reducing noise from vulnerabilities with no actionable fix |\n| VEX | Vulnerability Exploitability eXchange — machine-readable statements about whether a vulnerability is exploitable in context |\n| Exit Code | Non-zero return code from Trivy when findings exceed the severity threshold, used to fail CI\u002FCD pipelines |\n\n## Tools & Systems\n\n- **Trivy**: Open-source vulnerability scanner by Aqua Security supporting images, filesystems, repos, and IaC\n- **trivy-action**: Official GitHub Action for running Trivy scans in GitHub Actions workflows\n- **Trivy Operator**: Kubernetes operator that continuously scans cluster workloads with Trivy\n- **Grype**: Alternative image scanner by Anchore for comparison and validation of scan results\n- **Harbor**: Container registry with built-in Trivy integration for automatic image scanning on push\n\n## Common Scenarios\n\n### Scenario: Multi-Stage Build with Separate Scan and Push\n\n**Context**: A team builds multi-stage Docker images and needs to scan the final production image before pushing to ECR, while also scanning the build stage for supply chain risks.\n\n**Approach**:\n1. Build the Docker image with `--target production` for the final stage\n2. Run Trivy with `--severity CRITICAL,HIGH --exit-code 1 --ignore-unfixed` to block on exploitable issues\n3. Generate an SBOM in CycloneDX format and store as a build artifact\n4. Upload SARIF results to GitHub Security tab for visibility\n5. Only push to ECR if the Trivy scan exits with code 0\n6. Tag the pushed image with the scan timestamp and Trivy DB version for audit traceability\n\n**Pitfalls**: Scanning only the final stage misses vulnerable packages that were present in build stages and may have influenced the build. Run `trivy fs` on the build context separately. Caching the Trivy DB too aggressively (weekly) means newly published CVEs take days to appear in scans.\n\n## Output Format\n\n```\nTrivy Container Scan Report\n=============================\nImage: app:a1b2c3d4\nBase Image: python:3.12-slim-bookworm\nScan Date: 2026-02-23\nDB Version: 2026-02-23T00:15:00Z\n\nVULNERABILITY SUMMARY:\n  Total: 47\n  Critical: 2\n  High: 5\n  Medium: 18\n  Low: 22\n  Unfixed: 8 (excluded from gate)\n\nCRITICAL FINDINGS:\n  CVE-2025-12345  libssl3    3.0.11-1  3.0.13-1  OpenSSL buffer overflow\n  CVE-2025-67890  curl       7.88.1-10 7.88.1-12 curl HSTS bypass\n\nHIGH FINDINGS:\n  CVE-2025-11111  zlib1g     1.2.13    1.2.13.1  zlib heap buffer overflow\n  CVE-2025-22222  python3.12 3.12.1    3.12.3    CPython path traversal\n  CVE-2025-33333  requests   2.31.0    2.32.0    requests SSRF in redirects\n\nMISCONFIGURATION:\n  DS002  [HIGH]   Dockerfile: USER instruction not set (running as root)\n  DS026  [MEDIUM] Dockerfile: No HEALTHCHECK defined\n\nQUALITY GATE: FAILED (2 Critical, 5 High findings)\n```\n",{"name":5,"note":25,"tags":26,"author":33,"domain":34,"source":35,"license":15,"version":36,"nist_csf":37,"subdomain":27,"description":42,"mitre_attack":43,"source_commit":49},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32],"devsecops","cicd","trivy","container-security","vulnerability-scanning","secure-sdlc","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0.0",[38,39,40,41],"PR.PS-01","GV.SC-07","ID.IM-04","PR.PS-04","This skill covers integrating Aqua Security's Trivy scanner into CI\u002FCD pipelines for comprehensive container image vulnerability detection. It addresses scanning Docker images for OS package and application dependency CVEs, detecting misconfigurations in Dockerfiles, scanning filesystem and git repositories, and establishing severity-based quality gates that block deployment of vulnerable images.\n",[44,45,46,47,48],"T1195","T1554","T1059.004","T1610","T1611","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-12 23:12:27",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill scanning-containers-with-trivy-in-cicd",{"tool":66,"command":67},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill scanning-containers-with-trivy-in-cicd",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill scanning-containers-with-trivy-in-cicd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002FSKILL.md",true,[74,80,84,90,94,98,104],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"assets\u002Ftemplate.md","ASSET","资产文件",4949,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Fassets\u002Ftemplate.md",{"path":81,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fapi-reference.md","REFERENCE","参考文档",1951,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Freferences\u002Fapi-reference.md",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fstandards.md",2729,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Freferences\u002Fstandards.md",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fworkflows.md",4264,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Freferences\u002Fworkflows.md",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fagent.py","SCRIPT","脚本",6226,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Fscripts\u002Fagent.py",{"path":105,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fprocess.py",12006,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fscanning-containers-with-trivy-in-cicd\u002Fscripts\u002Fprocess.py",[109,117,124,132,140,148],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":113,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":128,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":136,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":144,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":149,"name":150,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]