Skip to content

[Feature] Add offline scanning with the local advisory DB#76

Merged
sonukapoor merged 1 commit intomainfrom
feature/issue-70-offline-local-db-scan
Apr 4, 2026
Merged

[Feature] Add offline scanning with the local advisory DB#76
sonukapoor merged 1 commit intomainfrom
feature/issue-70-offline-local-db-scan

Conversation

@sonukapoor
Copy link
Copy Markdown
Collaborator

Summary:
Adds the Phase 1 offline scan path so cve-lite can scan projects using the local advisory database with zero advisory API calls at runtime.

Closes #70.

What changed:

  • wired --offline to use the default local advisory database
  • added --offline-db support for explicit database selection
  • switched offline advisory matching and detail loading to the local SQLite advisory source
  • updated the CLI to clearly report offline mode and the active advisory source
  • updated coverage notes to state that offline scans do not make outbound advisory API calls
  • added tests for offline scanner behavior, CLI source messaging, and argument parsing

Notes:
This PR focuses on scan-time use of the local advisory database.

It builds on the prior schema and sync work, and does not change the standard online OSV scan path.

Verification:

  • npm test
  • npm run build
  • manual smoke test with:
    • node dist/index.js advisories sync --output /tmp/advisories.db
    • node dist/index.js . --offline-db /tmp/advisories.db

@sonukapoor sonukapoor merged commit 38d101f into main Apr 4, 2026
4 checks passed
@sonukapoor sonukapoor deleted the feature/issue-70-offline-local-db-scan branch April 4, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Wire offline scan mode to the local advisory database

1 participant