Summary
The GitHub Action defaults no-cache to "true" and always appends --no-cache when that input is true. Offline mode (offline, offline-db, or sync-advisories) also appends --offline-db. The CLI treats those flags as mutually exclusive, so the default Action offline config fails before scanning.
Expected
- uses: OWASP/cve-lite-cli@v1
with:
offline: "true"
# no-cache left at default "true"
Should run an offline scan successfully. --no-cache is meaningless offline (no OSV query cache to bypass).
Actual
CLI exits 1 immediately:
Error: --no-cache cannot be used with --offline or --offline-db
Root cause
action.yml:
no-cache input defaults to "true" (CI-oriented)
- scan step (and fix step) independently append
--offline-db when USE_OFFLINE=true and --no-cache when INPUT_NO_CACHE=true
src/cli/validate.ts:
if (options.noCache && (options.offline || options.offlineDb)) {
throw new Error("--no-cache cannot be used with --offline or --offline-db");
}
Docs (website/docs/caching.md, CHANGELOG) document the same mutual exclusion.
Impact
Any Action workflow that enables offline scanning without explicitly setting no-cache: "false" is broken out of the box — including offline: true, offline-db: ..., and sync-advisories: true.
Suggested fix
When USE_OFFLINE=true, omit --no-cache from the constructed CLI args (scan + fix steps). Optionally document that no-cache is ignored in offline mode.
Workaround today: set no-cache: "false" whenever offline inputs are used.
Reproduce
# Equivalent to what the Action builds by default for offline scans:
cve-lite . --offline-db ./.cache/cve-lite/advisories.db --no-cache
# Error: --no-cache cannot be used with --offline or --offline-db
Summary
The GitHub Action defaults
no-cacheto"true"and always appends--no-cachewhen that input is true. Offline mode (offline,offline-db, orsync-advisories) also appends--offline-db. The CLI treats those flags as mutually exclusive, so the default Action offline config fails before scanning.Expected
Should run an offline scan successfully.
--no-cacheis meaningless offline (no OSV query cache to bypass).Actual
CLI exits 1 immediately:
Root cause
action.yml:no-cacheinput defaults to"true"(CI-oriented)--offline-dbwhenUSE_OFFLINE=trueand--no-cachewhenINPUT_NO_CACHE=truesrc/cli/validate.ts:Docs (
website/docs/caching.md, CHANGELOG) document the same mutual exclusion.Impact
Any Action workflow that enables offline scanning without explicitly setting
no-cache: "false"is broken out of the box — includingoffline: true,offline-db: ..., andsync-advisories: true.Suggested fix
When
USE_OFFLINE=true, omit--no-cachefrom the constructed CLI args (scan + fix steps). Optionally document thatno-cacheis ignored in offline mode.Workaround today: set
no-cache: "false"whenever offline inputs are used.Reproduce