# Run2 Trivy Offline

> Optimized Trivy offline scanning for lock files, including all dependency types.

- Skill: `cxcscmu/run2-trivy-offline-2` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/run2-trivy-offline-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/run2-trivy-offline-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/run2-trivy-offline-2

---


# Optimized Trivy Offline Scanning

This skill covers enhanced offline scanning techniques using Trivy.

## Scanning All Dependencies

By default, Trivy might skip dev dependencies. For a complete audit of a `package-lock.json`, use the `--include-dev-deps` flag.

```bash
trivy fs /path/to/target \
  --format json \
  --output report.json \
  --scanners vuln \
  --include-dev-deps \
  --skip-db-update \
  --offline-scan \
  --cache-dir /path/to/trivy/cache
```

## Troubleshooting Database Issues

If the scan fails due to database initialization, verify the path:
1. Ensure `trivy.db` is in `<cache-dir>/db/`.
2. Ensure the user has read permissions to the database file.

