Skip to content
Agentmart
Submit a tool

trivy-vulnerability-scanning

Use Trivy vulnerability scanner in offline mode to detect CVEs in npm dependencies and generate structured JSON reports.

Skill by cxcscmu

IndexedMIT★ 91
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cxcscmu-trivy-vulnerability-scanning

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use Trivy vulnerability scanner in offline mode to detect CVEs in npm dependencies and generate structured JSON reports.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/trivy-vulnerability-scanning

What's inside

Skill name
trivy-vulnerability-scanning
Description
Use Trivy vulnerability scanner in offline mode to detect CVEs in npm dependencies and generate structured JSON reports.
License
MIT
Instructions
112 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Trivy Vulnerability Scanning

## Overview
Trivy is a simple, comprehensive vulnerability scanner that can analyze npm package-lock.json files for known security vulnerabilities. It works offline with a local vulnerability database.

## Installation

```bash
# Install Trivy
apt-get update && apt-get install -y trivy

# Verify installation
trivy --version
```

## Database Setup

Trivy requires a vulnerability database. For offline mode:

```bash
# Download the vulnerability database
trivy image download-db --severity HIGH,CRITICAL

# Or let Trivy auto-download on first use
trivy config /root/package-lock.json
```

## Scanning Modes

### Scan package-lock.json
```bash
trivy config /root/package-lock.json \
  --format json \
  --output results.json \
  --severity HIGH,CRITICAL
```

### Scan Options
- `--format json`: Output JSON format (best for parsing)
- `--severity HIGH,CRITICAL`: Only HIGH and CRITICAL vulnerabilities
- `--output file.json`: Write to file
- `--offline-db`: Use offline database if downloaded
- `--skip-update`: Skip database update (offline mode)

## Output Structure

Trivy JSON output contains:

```json
{
  "Results": [
    {
      "Target": "package-lock.json",
      "Type": "npm",
      "Misconfigurations": null,
      "Vulnerabilities": [
        {
          "VulnerabilityID": "CVE-2021-12345",
          "PkgName": "lodash",
          "InstalledVersion": "4.17.20",
          "FixedVersion": "4.17.21",
          "Severity": "HIGH",
          "Title": "Prototype pollution",
          "Description": "...",
          "References": ["https://nvd.nist.gov/vuln/detail/CVE-2021-12345"]
        }
      ]
    }
  ]
}
```

## Parsing Results

```python
import json

def parse_trivy_results(json_file):
    with open(json_file, 'r') as f:
        data = json.load(f)

    vulnerabilities = []
    for result in data.get('Results', []):
        for vuln in result.get('Vulnerabilities', []):
            if vuln['Severity'] in ['HIGH', 'CRITICAL']:
                vulnerabilities.append({
                    'package': vuln['PkgName'],
                    'version': vuln['InstalledVersion'],
                    'cve_id': vuln['VulnerabilityID'],
                    'severity': vuln['Severity'],
                    'title': vuln['Title'],
                    'fixed_version': vuln.get('FixedVersion', 'N/A'),
                    'references': vuln.get('References', [])
                })

    return vulnerabilities
```

## Usage

Use this skill when:
- Scanning npm package-lock.json for vulnerabilities
- Need offline vulnerability detection
- Building security audit pipelines
- Filtering for specific severity levels

## Related Skills

- `cvss-score-extraction`: Extract CVSS scores for detected vulnerabilities
- `security-audit-csv-reporting`: Convert results to CSV format

From cxcscmu/SkillLearnBench, MIT.

More from cxcscmu/SkillLearnBench

Signals

Stars
91
Forks
7
Open issues
6
Last commit (this folder)
Apr 24, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cxcscmu

Cite this page

trivy-vulnerability-scanning skill. Agent Mart. https://agentmart.dev/skills/cxcscmu-trivy-vulnerability-scanning (last updated 2026-10-24)