[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C12YPAYVRTQKAV9ZFSYHDK":3,"skill-same:01M7C12YPAYVRTQKAV9ZFSYHDK":45},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7C12YPAYVRTQKAV9ZFSYHDK","trivy-offline-vulnerability-scanning",null,"Use Trivy vulnerability scanner in offline mode to discover security vulnerabilities in dependency files. This skill covers setting up offline scanning, executing Trivy against package lock files, and generating JSON vulnerability reports without requiring internet access.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Ftrivy-offline-vulnerability-scanning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: trivy-offline-vulnerability-scanning\ndescription: Use Trivy vulnerability scanner in offline mode to discover security vulnerabilities in dependency files. This skill covers setting up offline scanning, executing Trivy against package lock files, and generating JSON vulnerability reports without requiring internet access.\n---\n\n# Trivy Offline Vulnerability Scanning\n\nThis skill provides guidance on using Trivy, an open-source security scanner, to discover vulnerabilities in software dependencies using offline mode.\n\n## Overview\n\nTrivy is a comprehensive vulnerability scanner that can analyze various targets including container images, filesystems, and dependency lock files. **Offline scanning** is crucial for:\n- Air-gapped environments without internet access\n- Reproducible security audits with fixed vulnerability databases\n- Faster CI\u002FCD pipelines avoiding network latency\n- Compliance requirements for controlled environments\n\n## Why Offline Mode?\n\n### Challenges with Online Scanning\n- Network dependency introduces failure points\n- Database updates can cause inconsistent results across runs\n- Slower execution due to download times\n- Security policies may restrict external connections\n\n### Benefits of Offline Scanning\n- **Reproducibility**: Same database = same results\n- **Speed**: No network overhead\n- **Reliability**: No external dependencies\n- **Compliance**: Works in restricted environments\n\n## Trivy Database Structure\n\nTrivy's vulnerability database consists of:\n- **trivy.db**: SQLite database containing CVE information\n- **metadata.json**: Database version and update timestamp\n\nDatabase location: `\u003Ccache-dir>\u002Fdb\u002Ftrivy.db`\n\n## Offline Scanning Workflow\n\n\n\n## Compatibility and Scan Validation (Authoritative)\n\nDo not assume that the installed Trivy version, cache layout, or supported flags matches the examples below. Before constructing the scan command:\n\n1. Verify the exact executable and version, and inspect the installed command help:\n   ```bash\n   command -v trivy\n   trivy --version\n   trivy --help\n   trivy fs --help\n   ```\n   Add only flags shown as supported by that installation. In particular, use `--format json`, `--output`, `--scanners vuln`, `--cache-dir`, `--skip-db-update`, and `--offline-scan` only when the installed version advertises them. If the version has a different documented offline\u002Fno-update option, use that option instead; if offline operation cannot be established without an unsupported flag, fail explicitly rather than silently running an online or differently scoped scan.\n\n2. Locate and validate the actual cache selected for this run. Check an explicitly configured cache directory (such as `TRIVY_CACHE_DIR`), the command-line cache setting, and the installed Trivy default\u002Fcandidate locations; do not assume `.\u002Ftrivy-cache`. The selected cache must contain a readable, non-empty database in the layout expected by that Trivy version (commonly `\u003Ccache>\u002Fdb\u002Ftrivy.db` plus database metadata). Confirm the database and metadata are from the same cache and are readable before scanning. A missing, empty, corrupt, or mismatched database is a hard failure; never interpret it as a clean scan and never download a database during an offline scan.\n\n3. Confirm the input itself before invoking Trivy:\n   ```bash\n   test -s \u002Froot\u002Fpackage-lock.json\n   python3 -c 'import json; json.load(open(\"\u002Froot\u002Fpackage-lock.json\"))'\n   ```\n   Prefer `\u002Froot\u002Fpackage-lock.json` as the filesystem target. If the installed version does not accept a lockfile as a direct target, use the smallest supported containing target (such as `\u002Froot`) only after verifying from its help\u002Fdocumentation that npm lockfiles are detected, and reject any report that does not identify this specific lockfile as the analyzed target.\n\n4. Run the verified command with updates and network access disabled, capture its exit status and stderr, and write JSON to a known absolute path such as `\u002Froot\u002Ftrivy_report.json`. A non-zero exit status, missing output, or empty\u002Fnon-JSON output is a hard failure. Do not proceed to CSV generation after any such failure.\n\n5. Validate the report before treating its findings as authoritative. It must be a JSON object with a `Results` array containing an entry whose normalized `Target` identifies `\u002Froot\u002Fpackage-lock.json` (not an unrelated directory or image). The selected entry must have a dependency-scan result structure: `Vulnerabilities` may be an empty list or null for a successful clean scan, but every vulnerability object that is present must contain the package, installed-version, vulnerability-ID, and severity fields used by the reporting step. Reject reports with no matching target, only unrelated targets, malformed result structures, or findings that cannot be tied to the lockfile. Preserve all matching result entries so nested dependencies and distinct installed versions are not lost.\n\n6. Only after all checks pass may an empty HIGH\u002FCRITICAL CSV be emitted. An empty CSV is valid only when the command succeeded, the database was validated, the target matched `\u002Froot\u002Fpackage-lock.json`, and the validated matching result contains no qualifying HIGH or CRITICAL vulnerabilities. It is not valid as a fallback for a missing database, unsupported command, wrong target, scan error, or incomplete report.\n\n### Step 1: Verify Database Existence\n\nBefore scanning, ensure the offline database is available:\n\n```python\nimport os\nimport sys\n\nTRIVY_CACHE_PATH = '.\u002Ftrivy-cache'\n\n# Check for database file\ndb_path = os.path.join(TRIVY_CACHE_PATH, \"db\", \"trivy.db\")\nif not os.path.exists(db_path):\n    print(f\"[!] Error: Trivy database not found at {db_path}\")\n    print(\"    Download database first with:\")\n    print(f\"    trivy image --download-db-only --cache-dir {TRIVY_CACHE_PATH}\")\n    sys.exit(1)\n```\n\n### Step 2: Construct Trivy Command\n\nKey flags for offline scanning:\n\n| Flag | Purpose |\n|------|---------|\n| `fs \u003Ctarget>` | Scan filesystem\u002Ffile (e.g., package-lock.json) |\n| `--format json` | Output in JSON format for parsing |\n| `--output \u003Cfile>` | Save results to file |\n| `--scanners vuln` | Scan only for vulnerabilities (not misconfigs) |\n| `--skip-db-update` | **Critical**: Do not update database |\n| `--offline-scan` | Enable offline mode |\n| `--cache-dir \u003Cpath>` | Path to pre-downloaded database |\n\n```python\nimport subprocess\n\nTARGET_FILE = 'package-lock.json'\nOUTPUT_FILE = 'trivy_report.json'\nTRIVY_CACHE_PATH = '.\u002Ftrivy-cache'\n\ncommand = [\n    \"trivy\", \"fs\", TARGET_FILE,\n    \"--format\", \"json\",\n    \"--output\", OUTPUT_FILE,\n    \"--scanners\", \"vuln\",\n    \"--skip-db-update\",      # Prevent online updates\n    \"--offline-scan\",         # Enable offline mode\n    \"--cache-dir\", TRIVY_CACHE_PATH\n]\n```\n\n### Step 3: Execute Scan\n\n```python\ntry:\n    result = subprocess.run(\n        command,\n        capture_output=True,\n        text=True,\n        check=False  # Don't raise exception on non-zero exit\n    )\n    \n    if result.returncode != 0:\n        print(\"[!] Trivy scan failed:\")\n        print(result.stderr)\n        sys.exit(1)\n    \n    print(\"[*] Scan completed successfully\")\n    print(f\"[*] Results saved to: {OUTPUT_FILE}\")\n    \nexcept FileNotFoundError:\n    print(\"[!] Error: 'trivy' command not found\")\n    print(\"    Install Trivy: https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002Flatest\u002Fgetting-started\u002Finstallation\u002F\")\n    sys.exit(1)\n```\n\n## Complete Example\n\n```python\nimport os\nimport sys\nimport subprocess\n\ndef run_trivy_offline_scan(target_file, output_file, cache_dir='.\u002Ftrivy-cache'):\n    \"\"\"\n    Execute Trivy vulnerability scan in offline mode.\n    \n    Args:\n        target_file: Path to file to scan (e.g., package-lock.json)\n        output_file: Path to save JSON results\n        cache_dir: Path to Trivy offline database\n    \"\"\"\n    print(f\"[*] Starting Trivy offline scan...\")\n    print(f\"    Target: {target_file}\")\n    print(f\"    Database: {cache_dir}\")\n    \n    # Verify database exists\n    db_path = os.path.join(cache_dir, \"db\", \"trivy.db\")\n    if not os.path.exists(db_path):\n        print(f\"[!] Error: Database not found at {db_path}\")\n        sys.exit(1)\n    \n    # Build command\n    command = [\n        \"trivy\", \"fs\", target_file,\n        \"--format\", \"json\",\n        \"--output\", output_file,\n        \"--scanners\", \"vuln\",\n        \"--skip-db-update\",\n        \"--offline-scan\",\n        \"--cache-dir\", cache_dir\n    ]\n    \n    # Execute\n    try:\n        result = subprocess.run(command, capture_output=True, text=True)\n        \n        if result.returncode != 0:\n            print(\"[!] Scan failed:\")\n            print(result.stderr)\n            sys.exit(1)\n        \n        print(\"[*] Scan completed successfully\")\n        return output_file\n        \n    except FileNotFoundError:\n        print(\"[!] Trivy not found. Install from:\")\n        print(\"    https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002F\")\n        sys.exit(1)\n\n# Usage\nif __name__ == \"__main__\":\n    run_trivy_offline_scan(\n        target_file='package-lock.json',\n        output_file='trivy_report.json'\n    )\n```\n\n## JSON Output Structure\n\nTrivy outputs vulnerability data in this format:\n\n```json\n{\n  \"Results\": [\n    {\n      \"Target\": \"package-lock.json\",\n      \"Vulnerabilities\": [\n        {\n          \"VulnerabilityID\": \"CVE-2021-44906\",\n          \"PkgName\": \"minimist\",\n          \"InstalledVersion\": \"1.2.5\",\n          \"FixedVersion\": \"1.2.6\",\n          \"Severity\": \"CRITICAL\",\n          \"Title\": \"Prototype Pollution in minimist\",\n          \"PrimaryURL\": \"https:\u002F\u002Favd.aquasec.com\u002Fnvd\u002Fcve-2021-44906\",\n          \"CVSS\": {\n            \"nvd\": { \"V3Score\": 9.8 }\n          }\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Common Issues\n\n### Issue: \"failed to initialize DB\"\n**Cause**: Database not found or corrupted  \n**Solution**: Re-download database or check `--cache-dir` path\n\n### Issue: Scan finds no vulnerabilities when they exist\n**Cause**: Database is outdated  \n**Solution**: Download newer database (before going offline)\n\n### Issue: \"command not found: trivy\"\n**Cause**: Trivy not installed or not in PATH  \n**Solution**: Install Trivy following official documentation\n\n## Dependencies\n\n### Required Tools\n- **Trivy**: Version 0.40.0 or later recommended\n  ```bash\n  # Installation (example for Debian\u002FUbuntu)\n  wget -qO - https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb\u002Fpublic.key | apt-key add -\n  echo \"deb https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb $(lsb_release -sc) main\" | tee -a \u002Fetc\u002Fapt\u002Fsources.list.d\u002Ftrivy.list\n  apt-get update\n  apt-get install trivy\n  ```\n\n### Python Modules\n- `subprocess` (standard library)\n- `os` (standard library)\n- `sys` (standard library)\n\n## References\n\n- [Trivy Documentation](https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002F)\n- [Trivy Offline Mode Guide](https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002Flatest\u002Fdocs\u002Fadvanced\u002Fair-gap\u002F)\n- [CVE Database](https:\u002F\u002Fcve.mitre.org\u002F)\n","# Trivy Offline Vulnerability Scanning\n\nThis skill provides guidance on using Trivy, an open-source security scanner, to discover vulnerabilities in software dependencies using offline mode.\n\n## Overview\n\nTrivy is a comprehensive vulnerability scanner that can analyze various targets including container images, filesystems, and dependency lock files. **Offline scanning** is crucial for:\n- Air-gapped environments without internet access\n- Reproducible security audits with fixed vulnerability databases\n- Faster CI\u002FCD pipelines avoiding network latency\n- Compliance requirements for controlled environments\n\n## Why Offline Mode?\n\n### Challenges with Online Scanning\n- Network dependency introduces failure points\n- Database updates can cause inconsistent results across runs\n- Slower execution due to download times\n- Security policies may restrict external connections\n\n### Benefits of Offline Scanning\n- **Reproducibility**: Same database = same results\n- **Speed**: No network overhead\n- **Reliability**: No external dependencies\n- **Compliance**: Works in restricted environments\n\n## Trivy Database Structure\n\nTrivy's vulnerability database consists of:\n- **trivy.db**: SQLite database containing CVE information\n- **metadata.json**: Database version and update timestamp\n\nDatabase location: `\u003Ccache-dir>\u002Fdb\u002Ftrivy.db`\n\n## Offline Scanning Workflow\n\n\n\n## Compatibility and Scan Validation (Authoritative)\n\nDo not assume that the installed Trivy version, cache layout, or supported flags matches the examples below. Before constructing the scan command:\n\n1. Verify the exact executable and version, and inspect the installed command help:\n   ```bash\n   command -v trivy\n   trivy --version\n   trivy --help\n   trivy fs --help\n   ```\n   Add only flags shown as supported by that installation. In particular, use `--format json`, `--output`, `--scanners vuln`, `--cache-dir`, `--skip-db-update`, and `--offline-scan` only when the installed version advertises them. If the version has a different documented offline\u002Fno-update option, use that option instead; if offline operation cannot be established without an unsupported flag, fail explicitly rather than silently running an online or differently scoped scan.\n\n2. Locate and validate the actual cache selected for this run. Check an explicitly configured cache directory (such as `TRIVY_CACHE_DIR`), the command-line cache setting, and the installed Trivy default\u002Fcandidate locations; do not assume `.\u002Ftrivy-cache`. The selected cache must contain a readable, non-empty database in the layout expected by that Trivy version (commonly `\u003Ccache>\u002Fdb\u002Ftrivy.db` plus database metadata). Confirm the database and metadata are from the same cache and are readable before scanning. A missing, empty, corrupt, or mismatched database is a hard failure; never interpret it as a clean scan and never download a database during an offline scan.\n\n3. Confirm the input itself before invoking Trivy:\n   ```bash\n   test -s \u002Froot\u002Fpackage-lock.json\n   python3 -c 'import json; json.load(open(\"\u002Froot\u002Fpackage-lock.json\"))'\n   ```\n   Prefer `\u002Froot\u002Fpackage-lock.json` as the filesystem target. If the installed version does not accept a lockfile as a direct target, use the smallest supported containing target (such as `\u002Froot`) only after verifying from its help\u002Fdocumentation that npm lockfiles are detected, and reject any report that does not identify this specific lockfile as the analyzed target.\n\n4. Run the verified command with updates and network access disabled, capture its exit status and stderr, and write JSON to a known absolute path such as `\u002Froot\u002Ftrivy_report.json`. A non-zero exit status, missing output, or empty\u002Fnon-JSON output is a hard failure. Do not proceed to CSV generation after any such failure.\n\n5. Validate the report before treating its findings as authoritative. It must be a JSON object with a `Results` array containing an entry whose normalized `Target` identifies `\u002Froot\u002Fpackage-lock.json` (not an unrelated directory or image). The selected entry must have a dependency-scan result structure: `Vulnerabilities` may be an empty list or null for a successful clean scan, but every vulnerability object that is present must contain the package, installed-version, vulnerability-ID, and severity fields used by the reporting step. Reject reports with no matching target, only unrelated targets, malformed result structures, or findings that cannot be tied to the lockfile. Preserve all matching result entries so nested dependencies and distinct installed versions are not lost.\n\n6. Only after all checks pass may an empty HIGH\u002FCRITICAL CSV be emitted. An empty CSV is valid only when the command succeeded, the database was validated, the target matched `\u002Froot\u002Fpackage-lock.json`, and the validated matching result contains no qualifying HIGH or CRITICAL vulnerabilities. It is not valid as a fallback for a missing database, unsupported command, wrong target, scan error, or incomplete report.\n\n### Step 1: Verify Database Existence\n\nBefore scanning, ensure the offline database is available:\n\n```python\nimport os\nimport sys\n\nTRIVY_CACHE_PATH = '.\u002Ftrivy-cache'\n\n# Check for database file\ndb_path = os.path.join(TRIVY_CACHE_PATH, \"db\", \"trivy.db\")\nif not os.path.exists(db_path):\n    print(f\"[!] Error: Trivy database not found at {db_path}\")\n    print(\"    Download database first with:\")\n    print(f\"    trivy image --download-db-only --cache-dir {TRIVY_CACHE_PATH}\")\n    sys.exit(1)\n```\n\n### Step 2: Construct Trivy Command\n\nKey flags for offline scanning:\n\n| Flag | Purpose |\n|------|---------|\n| `fs \u003Ctarget>` | Scan filesystem\u002Ffile (e.g., package-lock.json) |\n| `--format json` | Output in JSON format for parsing |\n| `--output \u003Cfile>` | Save results to file |\n| `--scanners vuln` | Scan only for vulnerabilities (not misconfigs) |\n| `--skip-db-update` | **Critical**: Do not update database |\n| `--offline-scan` | Enable offline mode |\n| `--cache-dir \u003Cpath>` | Path to pre-downloaded database |\n\n```python\nimport subprocess\n\nTARGET_FILE = 'package-lock.json'\nOUTPUT_FILE = 'trivy_report.json'\nTRIVY_CACHE_PATH = '.\u002Ftrivy-cache'\n\ncommand = [\n    \"trivy\", \"fs\", TARGET_FILE,\n    \"--format\", \"json\",\n    \"--output\", OUTPUT_FILE,\n    \"--scanners\", \"vuln\",\n    \"--skip-db-update\",      # Prevent online updates\n    \"--offline-scan\",         # Enable offline mode\n    \"--cache-dir\", TRIVY_CACHE_PATH\n]\n```\n\n### Step 3: Execute Scan\n\n```python\ntry:\n    result = subprocess.run(\n        command,\n        capture_output=True,\n        text=True,\n        check=False  # Don't raise exception on non-zero exit\n    )\n    \n    if result.returncode != 0:\n        print(\"[!] Trivy scan failed:\")\n        print(result.stderr)\n        sys.exit(1)\n    \n    print(\"[*] Scan completed successfully\")\n    print(f\"[*] Results saved to: {OUTPUT_FILE}\")\n    \nexcept FileNotFoundError:\n    print(\"[!] Error: 'trivy' command not found\")\n    print(\"    Install Trivy: https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002Flatest\u002Fgetting-started\u002Finstallation\u002F\")\n    sys.exit(1)\n```\n\n## Complete Example\n\n```python\nimport os\nimport sys\nimport subprocess\n\ndef run_trivy_offline_scan(target_file, output_file, cache_dir='.\u002Ftrivy-cache'):\n    \"\"\"\n    Execute Trivy vulnerability scan in offline mode.\n    \n    Args:\n        target_file: Path to file to scan (e.g., package-lock.json)\n        output_file: Path to save JSON results\n        cache_dir: Path to Trivy offline database\n    \"\"\"\n    print(f\"[*] Starting Trivy offline scan...\")\n    print(f\"    Target: {target_file}\")\n    print(f\"    Database: {cache_dir}\")\n    \n    # Verify database exists\n    db_path = os.path.join(cache_dir, \"db\", \"trivy.db\")\n    if not os.path.exists(db_path):\n        print(f\"[!] Error: Database not found at {db_path}\")\n        sys.exit(1)\n    \n    # Build command\n    command = [\n        \"trivy\", \"fs\", target_file,\n        \"--format\", \"json\",\n        \"--output\", output_file,\n        \"--scanners\", \"vuln\",\n        \"--skip-db-update\",\n        \"--offline-scan\",\n        \"--cache-dir\", cache_dir\n    ]\n    \n    # Execute\n    try:\n        result = subprocess.run(command, capture_output=True, text=True)\n        \n        if result.returncode != 0:\n            print(\"[!] Scan failed:\")\n            print(result.stderr)\n            sys.exit(1)\n        \n        print(\"[*] Scan completed successfully\")\n        return output_file\n        \n    except FileNotFoundError:\n        print(\"[!] Trivy not found. Install from:\")\n        print(\"    https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002F\")\n        sys.exit(1)\n\n# Usage\nif __name__ == \"__main__\":\n    run_trivy_offline_scan(\n        target_file='package-lock.json',\n        output_file='trivy_report.json'\n    )\n```\n\n## JSON Output Structure\n\nTrivy outputs vulnerability data in this format:\n\n```json\n{\n  \"Results\": [\n    {\n      \"Target\": \"package-lock.json\",\n      \"Vulnerabilities\": [\n        {\n          \"VulnerabilityID\": \"CVE-2021-44906\",\n          \"PkgName\": \"minimist\",\n          \"InstalledVersion\": \"1.2.5\",\n          \"FixedVersion\": \"1.2.6\",\n          \"Severity\": \"CRITICAL\",\n          \"Title\": \"Prototype Pollution in minimist\",\n          \"PrimaryURL\": \"https:\u002F\u002Favd.aquasec.com\u002Fnvd\u002Fcve-2021-44906\",\n          \"CVSS\": {\n            \"nvd\": { \"V3Score\": 9.8 }\n          }\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Common Issues\n\n### Issue: \"failed to initialize DB\"\n**Cause**: Database not found or corrupted  \n**Solution**: Re-download database or check `--cache-dir` path\n\n### Issue: Scan finds no vulnerabilities when they exist\n**Cause**: Database is outdated  \n**Solution**: Download newer database (before going offline)\n\n### Issue: \"command not found: trivy\"\n**Cause**: Trivy not installed or not in PATH  \n**Solution**: Install Trivy following official documentation\n\n## Dependencies\n\n### Required Tools\n- **Trivy**: Version 0.40.0 or later recommended\n  ```bash\n  # Installation (example for Debian\u002FUbuntu)\n  wget -qO - https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb\u002Fpublic.key | apt-key add -\n  echo \"deb https:\u002F\u002Faquasecurity.github.io\u002Ftrivy-repo\u002Fdeb $(lsb_release -sc) main\" | tee -a \u002Fetc\u002Fapt\u002Fsources.list.d\u002Ftrivy.list\n  apt-get update\n  apt-get install trivy\n  ```\n\n### Python Modules\n- `subprocess` (standard library)\n- `os` (standard library)\n- `sys` (standard library)\n\n## References\n\n- [Trivy Documentation](https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002F)\n- [Trivy Offline Mode Guide](https:\u002F\u002Faquasecurity.github.io\u002Ftrivy\u002Flatest\u002Fdocs\u002Fadvanced\u002Fair-gap\u002F)\n- [CVE Database](https:\u002F\u002Fcve.mitre.org\u002F)\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Ftrivy-offline-vulnerability-scanning",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill trivy-offline-vulnerability-scanning",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill trivy-offline-vulnerability-scanning",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill trivy-offline-vulnerability-scanning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Ftrivy-offline-vulnerability-scanning\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]