prometheus/service
Local Dev c9008ef3ba prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY
After clamd returns a verdict, scanStream queries VirusTotal by the file's
SHA-256 and attaches the finding under scan.virustotal. The call never
blocks, never changes the overall verdict, and never ships without a key
— enrichment is informational and strictly additive.

Shape in the signed scan report:
  scan.virustotal: {status: 'known', positives, total, scan_date, signatures}
                 | {status: 'unknown'}
                 | {status: 'rate_limited'}
                 | {status: 'error', reason}
                 | (absent)              — enrichment disabled

Rate-limited to VIRUSTOTAL_RATE_PER_MIN (default 4, matching the free
tier) via a sliding window; the service never fails the request when the
quota is spent, it just skips the enrichment that time. Hashes are
cached in-process so a resubmitted file does not re-spend quota.

The upload POST response passes the virustotal field through on both the
success and error branches so the submit UI can display it alongside the
clamd verdict.

uploads.js passes the SHA-256 it already computed into scanStream rather
than making scanStream hash a second time — the current call site is the
only one that needs the hash downstream.
2026-10-08 21:44:34 +02:00
..
lib prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
admin-pages.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
admin-session.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
admin.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
audit.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
bns.js prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
clamd.js prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY 2026-10-08 21:44:34 +02:00
db.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
layout.js prometheus: scaffold the standalone service — pages, routing, static assets 2026-10-05 22:22:47 +02:00
listings.js prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
modes.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
pages-browse.js prometheus: browse pages — categories and per-listing detail 2026-10-08 01:56:52 +02:00
pages.js prometheus: browse pages — categories and per-listing detail 2026-10-08 01:56:52 +02:00
seo.js prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
server.js prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
signing.js prometheus: upload + ClamAV scan + signed scan reports 2026-10-05 22:41:55 +02:00
uploads.js prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY 2026-10-08 21:44:34 +02:00
virustotal.js prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY 2026-10-08 21:44:34 +02:00