Skip to content

fix(sc4): surface OSV.dev fallback warnings and add configurable timeout#120

Open
tcconnally wants to merge 1 commit into
NVIDIA:mainfrom
tcconnally:fix/sc4-osv-silent-fallback
Open

fix(sc4): surface OSV.dev fallback warnings and add configurable timeout#120
tcconnally wants to merge 1 commit into
NVIDIA:mainfrom
tcconnally:fix/sc4-osv-silent-fallback

Conversation

@tcconnally

Copy link
Copy Markdown

Summary

Fixes #102: SC4 (Known Vulnerable Dependencies) silently falls back to a small static list when api.osv.dev is unreachable.

Changes

  1. Configurable timeout via SKILLSPECTOR_OSV_TIMEOUT env var (default raised from 10s to 30s)
  2. is_available() check timeout raised from 5s to 15s
  3. Visible fallback warning in scan output when OSV.dev is unreachable
  4. INFO logging when OSV returns no vulns for a package (was silently cached)
  5. was_osv_reachable() helper to distinguish API failures from clean results

Testing

All 621 unit tests pass.

Three changes to improve SC4 (Known Vulnerable Dependencies) reliability:

1. Configurable timeout: Read SKILLSPECTOR_OSV_TIMEOUT env var (default 30s, was
   hardcoded 10s) so users in high-latency environments can increase it.

2. Increased default timeouts: Raised query timeout from 10s to 30s and
   is_available() check from 5s to 15s to reduce silent fallback rate.

3. Visible fallback warning: When OSV.dev is unreachable and static fallback
   finds nothing, emit a LOW-severity SC4 finding alerting users that results
   may be incomplete. Previously the fallback was only visible in --verbose logs.

4. Distinguish clean packages from failed lookups: Added INFO log when OSV.dev
   returns no vulnerabilities for a package (was silently cached). Added
   was_osv_reachable() helper so callers can detect API failures vs clean results.

Fixes NVIDIA#102

Signed-off-by: Perseus Computing <51974392+tcconnally@users.noreply.github.com>
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.

SC4 silent fallback: hardcoded 10s timeout causes OSV.dev lookups to fail silently in high-latency environments

1 participant