Shared Business Logic Library
The processor business logic lives in Go under
scripts/go-processors/internal/. Each cmd/<name>-processor binary is thin; it
wires together the shared packages below. The earlier TypeScript library
(src/shared/*.ts) has been fully removed — the whole pipeline is Go now.
Two kinds of package live under internal/:
- Per-source parsers — one package per data source (
alpineapk,atlassian,certfr,cisco,euvd,aur,cargo,hex, …). Each fetches and maps one feed into the sharedosv.CVESourceDatashape. There are ~110 of these; each is documented on its own processor page, not here. - Shared / cross-cutting packages — the infrastructure every processor depends on, catalogued below.
Persistence & data model
db— the largest shared package:pgxpool-based read/write pools (pool.go), theWithTx/WithBatchTx/WithTxRetrytransaction helpers, and everyUpsert*/Insert*/Load*query used to storeCVEMetadataand its child tables.WithTxRetryreplays a transaction that lost a row-lock race (SQLSTATE 55P03/40001/40P01), escalatinglock_timeoutacross attempts. Also owns the canonical alias write pathInsertAliasesand the UTF-8 write-boundary scrubberSanitizeUTF8.processor— the pipeline driver (Run,processBatch,storeAdvisory) that git/JSON processors reuse: walk advisories, resume bysourceFileHash, store in batched savepoints, then run post-commit S3 archive + AI enrichment.osv— the sharedCVESourceDataadvisory shape plusMapAdvisory, the OSV YAML/JSON parsers, and the malicious-package skip rules.cvelistv5— parses and emits CVE List v5 JSON records, including thex_vulnetixextension objects written into the exported archives.export— builds a completecvelistv5record from database rows; shared by thecveprefixandgcvearchive processors.recordcache— filesystem-backed keyed JSON cache used for per-record resume between archive runs.s3client— rotating S3 client factory and theUploader.Archive/Uploader.Quarantinehelpers that implement the S3 persistence contract.
AI enrichment & intelligence
aienrich— Cloudflare AI Gateway inference passes (affected routines, ATT&CK mapping, CWE inference, TreeSitter queries, GHSA PoC). Best-effort and time-boxed per run — see aienrich.aimalgate— an LLM “second opinion” gate that asks whether a flagged package is genuinely malicious, used to suppress false positives.malscan— adapts themalscan-engineIOC-scan capability for the ecosystem malware processors.actorintel/malwareactor— discover and persist malware-author threat actors and their attributions (MalwareThreatActor/MalwareAttribution).hijack— wires themalscan-enginecross-registry ownership/hijack rules into the ecosystem processors.legitmaintainer— cross-ecosystem allowlist of known-legitimate maintainers, a guard against branding real maintainers as attackers.iocfilter— drops indicators that are not real IOCs (source-maps, test fixtures, dist bundles) so they never reach the IOC tables.pkgregistry— resolves an(ecosystem, packageName)pair to its upstream source repository and fetches source snippets for LLM grounding.enrichment— shared logic for the standaloneenrich-*ECS tasks (EPSS, CESS, Google OSI, Nuclei, references, GitHub repository enrichment).
Run lifecycle & infrastructure
notify— publishes the processor lifecycle events (task.started,task.completed,task.errored,task.overtime,task.no_work,task.zombie_detected) to SNS, andFinalize, the systemic-vs-partial error policy that keeps a run green for a handful of transient per-record failures.emf— emits CloudWatch Embedded Metric Format lines so monitoring can alarm on per-outcome counts without extra infrastructure.rundeadline— derives a processor’s soft deadline fromEXPECTED_DURATION_MINUTES(budget minus a margin of 10 %, clamped to[2 min, 10 min]). Processors stop starting new work at the soft deadline so they finish before the overtime watcher fires.zombieguard— startup detection of stale / previous-date sibling ECS tasks of the same family; stops them and reportstask.zombie_detected.httpclient— shared browser-like HTTP client and header helpers (HTTP/2 by default, an HTTP/1.1 variant for servers that reset HTTP/2 streams).githubapi— thingoogle/go-githubwrapper for “fetch a file at a ref”; its rate-limit backoff refuses to sleep past the run’s budget (ErrRateLimitBudget) so a rate-limited call cannot cause an overtime.retry— shared exponential-backoff-with-jitter retry helper (Do,DoValue) used to absorb transient upstream failures.
Scoring, identifiers & CRIT
cvss— CVSS v2/v3.0/v3.1/v4.0 vector parsing, validation, and severity.cveid— helpers for recognising and normalising CVE-YYYY-Nidentifiers.- Cloud resource locators, CPE, and PURL generation are covered in the schemas pages.
critmatch/critpublisher/critutil— the CRIT ranking, in-process draining, and shared building blocks.