Guide/Evidence
Threat Model
1 min readFrom the README
The security doctrine in AGENTS.md covers four threat surfaces:
| Surface | Threat | Mitigation |
|---|---|---|
| Parser input | Malformed GraphML / GML / GEXF / JSON / edgelist / Pajek crashes the process or escalates to memory corruption. | #![forbid(unsafe_code)] workspace-wide. 8 cargo-fuzz parser targets with persisted corpora; every DSR quality run replays each corpus and fuzzes each target for 10 seconds (check 5). Strict mode rejects malformed input; hardened mode applies bounded recovery (e.g., default attribute, skip malformed node) and logs the recovery as a DecisionRecord. |
| Attribute confusion | Attacker-supplied attribute tricks downstream code into treating a string as a number, or smuggling a callable through a deserialized graph. | CgseValue is a closed-variant sum type. Parsers reject mixed-type lists where the format spec forbids them. Boolean parsing accepts only the spec's literal forms (0/1/"true"/"false" per format). |
| Algorithmic denial | Adversarial graphs trigger pathological behavior (Dijkstra-with--∞, A*-with-NaN-heuristic, planarity bombs, super-linear matching). |
Algorithms that can't handle non-finite or negative weights either reject the input fast-closed or delegate to a slower-but-correct nx path. The complexity-witness ledger turns observed-vs-bound mismatches into a test failure (cargo test -p fnx-conformance). Stack-safety for deep DFS / planarity / transitive-closure paths. |
| Reproducibility loss | A future release silently changes algorithm output and breaks downstream pipelines. | RaptorQ-encoded conformance + perf artifact bundles. Decode-drill proofs. Golden snapshots locked in tests/python/test_*_golden.py. CGSE policy registry pinned in source. docs/coverage.md drift fails the DSR quality run. |