VARIoT JSON Processor — Design

Overview

Fetches IoT vulnerability and exploit records from the VARIoT JSON API (variotdbs.pl). Vulnerabilities are stored in CVEMetadata + relations. Exploits are stored in Exploit + ExploitCVE + ExploitAffectedProduct.

Two binaries share the same pagination logic:

  • ECS processor (variot-json-processor): daily, fetches last 3 days
  • Local backfill (variot-json-backfill): iterates year-by-year to 1999

API

EndpointURLAuthDescription
Vulns/api/vulns/?jsonld=false&since=DATE&limit=100Authorization: Token ...Paginated CVE records
Exploits/api/exploits/?jsonld=false&since=DATE&limit=100SamePaginated exploit records

Pagination: next/previous URLs in response. Date filter: since/before.

Data Mapping

Vulnerabilities → CVEMetadata

API FieldDB Target
cveCVEMetadata.cveId
title.dataCVEMetadata.title
description.dataCVEDescription (lang=en)
cvss.data[].cvssV2/V3[]CVEMetric (vectorString, baseScore)
problemtype_data.data[].problemtypeCVEProblemType (CWE IDs)
affected_products.data[]CVEAffected (vendor, model, version)
references.data[].urlCVEMetadataReferences
patch.data[].urlCVEMetadataReferences (type=fix)
external_ids.data[]CVEAlias (JVNDB, CNVD, etc.)

Exploits → Exploit

API FieldDB Target
idExploit.exploitId
title.dataExploit.title
type.dataExploit.category
exploit.dataSHA256 → Exploit.bodyContentHash
external_ids (CVE IDs)ExploitCVE junctions
affected_products.data[]ExploitAffectedProduct

Rate Limiting & Retry

  • 100ms sleep between API page requests
  • 3 retries with exponential backoff (2s, 4s, 8s)
  • HTTP 429: sleep 30s then retry
  • HTTP 5xx: sleep 5s then retry

Daily ECS Task

Fetches since=3-days-ago, UPSERTs all records. Schedule: cron(0 6 * * ? *).

Backfill

Iterates year-by-year from --start-year (default: current) to --end-year (default: 1999). Stops after 2 consecutive years with zero results.

Secrets

VARIOT_API_TOKEN stored in AWS Secrets Manager (prod/vdb-manager/api-keys) and .env.production for local testing.

Key Files

FilePurpose
cmd/variot-json-processor/main.goECS daily processor
cmd/variot-json-backfill/main.goLocal historical backfill
internal/variot/types.goAPI response and advisory types
internal/variot/parser.goJSON parsing, CVSS/CWE/affected extraction
internal/variot/mapper.goAdvisory → CVESourceData, exploit helpers
internal/variot/client.goShared pagination with retry logic
schemas/variot_json_advisory.schema.jsonJSON Schema Draft 7

S3 Persistence

Not used. This processor does not currently archive payloads or quarantine failures to S3. Per the S3 Persistence Contract this is non-compliant — see the compliance matrix for the implementation roadmap.

Expected paths when implemented:

  • Archive: variot/files/{sha256}/{filename}
  • Quarantine: failed-feeds/variot-json-processor/{YYYY-MM-DD}/{reason}/{filename}
  • Likely reasons: parse-error