trivy-offline-vulnerability-scanning

Scan dependency lock files offline with Trivy and JSON output.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill trivy-offline-vulnerability-scanning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trivy-offline-vulnerability-scanning
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/software-dependency-audit/environment/skills/trivy-offline-vulnerability-scanning
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill trivy-offline-vulnerability-scanning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables vulnerability assessment of software dependencies in air-gapped environments by scanning dependency lock files using Trivy with a pre-downloaded database to produce offline results.

Core Features & Use Cases

  • Offline database usage: use a pre-downloaded Trivy database for scans without internet access.
  • Dependency file scanning: target files like package-lock.json, yarn.lock, or go.sum to detect known CVEs.
  • JSON reporting: generate structured JSON outputs for integration with audits and CI pipelines.
  • Use Case: perform a security review of a project in a restricted network without external connectivity.

Quick Start

Place the offline Trivy database in your cache directory, then run a filesystem scan on your dependency lock file to generate a JSON report.

Frequently Asked Questions about trivy-offline-vulnerability-scanning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan dependencies for vulnerabilities in an air-gapped environment?

To perform offline vulnerability scanning, you need a pre-downloaded vulnerability database placed in your cache directory. You can then run a filesystem scan on dependency lock files to identify known CVEs without internet connectivity.

Can I use Trivy to scan package-lock.json files without an internet connection?

Yes, you can scan package-lock.json files offline by using a pre-downloaded Trivy database. The tool applies offline-scan mode to dependency lock files to detect vulnerabilities and generate JSON reports in restricted networks.

What is the best way to integrate offline vulnerability scans into a CI/CD pipeline?

The best way to integrate offline vulnerability scans into CI/CD pipelines is by generating structured JSON outputs. Scanning dependency lock files against a pre-downloaded database in offline-scan mode provides the structured data needed for automated security audits.

Do I need a pre-downloaded database to run an offline vulnerability scan?

Yes, a pre-downloaded vulnerability database is required to run an offline vulnerability scan. You must place this offline Trivy database in your cache directory before scanning dependency lock files in air-gapped environments.

What file formats are supported for offline dependency vulnerability scanning?

Offline dependency vulnerability scanning targets dependency lock files such as package-lock.json, yarn.lock, or go.sum. These files are scanned against a pre-downloaded database to identify known CVEs in offline environments.