agentsclimarketplace

Run2 trivy offline

Skill cxcscmu/SkillLearnBench/skills/b2-self-feedback-claude-opus-4-6/dependency-vulnerability-check/run2_trivy-offline

Use Trivy vulnerability scanner in offline mode to discover security vulnerabilities in dependency files, covering setup, execution, and JSON output parsing.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_trivy-offline

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.2 KB, 570 tokens by cl100k_base, as published. Nobody here has run it

Trivy Offline Vulnerability Scanning

Prerequisites

  • Trivy installed (trivy --version to check)
  • Local vulnerability DB already downloaded (check trivy --version for DB info)

Command for npm package-lock.json

trivy fs \
  --skip-db-update \
  --skip-java-db-update \
  --offline-scan \
  --scanners vuln \
  --severity HIGH,CRITICAL \
  --format json \
  /path/to/package-lock.json > results.json

Flag reference

FlagPurpose
--skip-db-updateDon't update vulnerability DB (required for offline)
--skip-java-db-updateDon't update Java DB (required for offline)
--offline-scanNo network access
--scanners vulnOnly vulnerability scanning (not misconfig/secret)
--severity HIGH,CRITICALFilter severity at scan time
--format jsonMachine-readable JSON output

JSON Output Structure

{
  "SchemaVersion": 2,
  "Results": [
    {
      "Target": "package-lock.json",
      "Type": "npm",
      "Vulnerabilities": [
        {
          "VulnerabilityID": "CVE-YYYY-NNNNN",
          "PkgName": "package-name",
          "InstalledVersion": "1.2.3",
          "FixedVersion": "1.2.4",       // may be null/missing if no fix
          "Severity": "HIGH",
          "Title": "Short description",
          "Description": "Longer description",
          "PrimaryURL": "https://avd.aquasec.com/nvd/cve-...",
          "CVSS": {
            "nvd": {"V3Score": 7.5},
            "ghsa": {"V3Score": 7.5},
            "redhat": {"V3Score": 7.2}
          }
        }
      ]
    }
  ]
}

Important notes

  • FixedVersion can be null/None (not just missing) when no fix is available
  • FixedVersion may contain comma-separated values for multiple fix branches (e.g., "7.5.2, 6.3.1, 5.7.2")
  • CVSS dict keys vary per vulnerability — not all sources are present for every CVE
  • Title may be null; fall back to Description if so
  • Vulnerabilities key may be null (not just empty list) if no vulns found for a target

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.