Module: vvaharness/injectors

docs / modules / injectors

← all docs

Module: vvaharness/injectors

Role. Loads optional operator context: known CVEs and design controls that steer the threat model and verification.

Size. 3 files · ~142 LOC.


flowchart LR IN["Input\nknown_cves.json · design_controls.yaml"] --> ACT["Action\nParse the supplied files into typed CVE[]/Control[] objects"] ACT --> VAL["Validation\nSchema validation on load"] VAL --> OUT["Output\nCVE[] · Control[] (optional context)"]

These small loaders let operators inject real-world context. Feeding in known CVEs raises the priority of related threats; feeding in design controls (auth boundaries, sandboxes) tells the tool what's already mitigated, so it demands proof of a bypass before flagging.

Explain-it-simply. Two intake slots: 'here are known problems' and 'here are protections we already have'.

Data-flow (this module)

flowchart LR CVE[(known_cves.json)] --> LC[cve_feed.load_cves] CTRL[(design_controls.yaml)] --> LD[design_controls.load_controls] LC -.->|raise likelihood| S2[s2_threatmodel] LD -.->|downrank / demand bypass| S6[s6_verify]

Technical details

flowchart LR IN["Input\nknown_cves.json · design_controls.yaml"] --> ACT["Action\nParse the supplied files into typed CVE[]/Control[] objects"] ACT --> VAL["Validation\nSchema validation on load"] VAL --> OUT["Output\nCVE[] · Control[] (optional context)"]

cve_feed.py loads a simple JSON list of known CVEs (load_cves). design_controls.py loads auth boundaries / sandboxes / mitigations from YAML (load_controls). Both feed the S2 threat model and S6 verification as optional context.

File map (quick scan)

File LOC Purpose
injectors/__init__.py 15 —
injectors/cve_feed.py 77 Load known CVEs from a JSON file. Format is intentionally simple — adapt
injectors/design_controls.py 50 Load design controls (auth boundaries, sandboxes, mitigations) from YAML.

Files & functions, explained

Every class and function below has a one-line plain-English note — readable whether you write code or not. _name marks an internal helper.

injectors/__init__.py

15 LOC. Utility / support module.

No top-level classes or functions (package init / constants).

injectors/cve_feed.py

77 LOC. Load known CVEs from a JSON file. Format is intentionally simple — adapt

Functions - load_cves() — Looks up / reads the cves value.

injectors/design_controls.py

50 LOC. Load design controls (auth boundaries, sandboxes, mitigations) from YAML.

Functions - load_controls() — Looks up / reads the controls value.


See also: HLD · LLD · Data Flow · module index.