code wiki / _hdl_build / nx_nvd_ingest.nx
nx_nvd_ingest.nx
buildroot/runtime/_hdl_build/nx_nvd_ingest.nx
about
nx_nvd_ingest.nx -- NAS-side API-WRAP ingester for NIST's National Vulnerability Database (NVD REST 2.0).
A DIFFERENT asset TYPE from the DCAT catalog pager (nx_nist_ingest): a JSON REST API with nested fields,
not HTML/DCAT. Proves the pipeline is NOT overfit to one shape. Fetches
services.nvd.nist.gov/rest/json/cves/2.0, splits vulnerabilities[] on {"cve":{"id":", prepends a
CVE-id/severity/description title, and dp_ingest's each into the domain's PUBLIC corpus so the CVE id,
CVSS severity, description, CPE and references are all BM25-searchable. BOUNDED + HONEST: logs
totalResults available vs the slice ingested (no silent truncation). Reuses nx_fetch_any (S1/S2) +
dp_ingest. Runs in nishihost CWD (trust store + seg store resolve). Anti-overfit: same fetch+ingest
spine, type-appropriate parse -- exactly the ontology pipeline's per-type extractor.
usage: nx_nvd_ingest <domain> <count> [startIndex] e.g. nx_nvd_ingest nishifamily.com 500 0
license_tier: ORIGINAL | genealogy_id: nishi_nvd_ingest_2026_07_14
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_fetch_any.nxnx_docportal_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const K_MAGIC_2000: i64 = 2000 |
| 19 | const K_MAGIC_4194304: i64 = 4194304 |
| 20 | const K_MAGIC_16777216: i64 = 16777216 |
| 21 | const K_MAGIC_8192: i64 = 8192 |
| 22 | const K_MAGIC_786432: i64 = 786432 |
functions
| 24 | func nv_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 25 | func nv_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 26 | func nv_putn(v: i64) -> i64 |
| 39 | func nv_find(hay: *u8, hl: i64, start: i64, needle: *u8, nl: i64) -> i64 |
| 49 | func nv_atoi(s: *u8) -> i64 called by 1: main |
| 60 | func nv_readint(buf: *u8, hl: i64, pos: i64) -> i64 called by 1: main |
| 72 | func nv_scat(buf: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { buf[o + i] = s[i]; i = i + 1 } return o + i } |
| 73 | func nv_ncat(buf: *u8, o: i64, v: i64) -> i64 calls 1: sys_mmap |
| 82 | func nv_copy(doc: *u8, dl: i64, doccap: i64, src: *u8, from: i64, to: i64) -> i64 called by 1: nv_ingest_record |
| 89 | func nv_field(doc: *u8, dl: i64, doccap: i64, src: *u8, start: i64, limit: i64, key: *u8, keylen: i64) -> i64 |
| 103 | func nv_ingest_record(domain: *u8, out: *u8, recstart: i64, recend: i64, doc: *u8, doccap: i64, cidp: *i64) -> i64 |
| 118 | func main(argc: i64, argv: *i64) -> i64 |