skip to content
all projects
Axiom GRC (WorkNest) · Principal AI Engineer · 2026–present

GuardNest — AI Vulnerability Reporting Engine

A deterministic control plane orchestrating bounded LLM stage-workers to turn raw penetration-test findings into client-ready vulnerability reports — where the model writes prose but is structurally forbidden from inventing or altering a CVE, CVSS score, or severity decision.

status production · evolving
domain AI security · agentic systems
owner Lakshmi Anne
stack Python · FastAPI · AWS Bedrock · Claude · LangGraph · PostgreSQL
OVERVIEW

What GuardNest does

GuardNest is the AI reporting layer for an automated penetration-testing (PTaaS) platform. It consumes structured scanner findings and produces the narrative vulnerability report a client receives — finding write-ups, remediation guidance, and an executive summary with attack-chain analysis. The engineering thesis is a deliberate inversion of the typical LLM-first design: the language model never holds authority over a security fact. Rules own the facts; the model owns the wording.

CORE THESIS
Use LLMs for what they are reliably good at — fluent, structured prose — while making it structurally impossible for them to invent or mutate a security fact. Correctness is enforced by a deterministic gate, not requested by a prompt.
PROBLEM

Problem & threat model

A vulnerability report is a legal and trust artifact. A fabricated CVE, an inflated CVSS score, or an invented exploit isn't a cosmetic error — it's a client-liability event. Yet the raw material (scanner output) is high-volume and must become fluent prose fast. LLMs solve the prose problem and introduce a new one: hallucination directly on the fields that must never be wrong.

🔒THREAT MODEL — what must never happen
(1) A model emits a CVE identifier not present in the frozen evidence. (2) A model alters a CVSS score or severity to something the scanner did not assert. (3) Prompt-injection content inside an untrusted scan finding steers the model into fabricating or suppressing findings. (4) The knowledge layer becomes an unaudited source of "facts." Each is treated as a boundary the architecture must make unreachable, not merely unlikely.
ARCHITECTURE

System architecture

The system is a deterministic control plane with bounded LLM autonomy at individual stages. Evidence is frozen before any model runs. The orchestrator schedules stage-workers; the gate is the single authority on whether a report may render.

DETERMINISTIC CONTROL PLANE · rules own the facts BOUNDED LLM STAGE-WORKERS · prose only, schema-validated ▲ TRUST BOUNDARY — LLMs cannot cross downward into facts Freeze immutable evidence snapshot · provenance Orchestrator ReportGraph · schedules stages · retries · flags Deterministic Gate CVE·CVSS·severity verified vs snapshot+NVD NVD authoritative CVE source Render only gate-passed report Writer finding write-ups structured output QA self-check vs schema flags for gate Reviser bounded re-write on gate failure Exec-Summary cross-finding narrative attack-chain analysis Governed Knowledge Layer curated remediation guidance · testing methodology · reusable patterns — never a source of factual security claims gate fail → revise
Figure 1 · GuardNest reporting architecture. The deterministic control plane owns every security fact; LLM stage-workers generate prose only and cannot write below the trust boundary. The gate verifies all CVE/CVSS/severity claims against the frozen snapshot and NVD before render.
TRUST BOUNDARY

Who owns what

The trust boundary is the central control. Everything above it is deterministic and authoritative; everything below it is generative and advisory. The model can read facts to describe them, but its output re-enters the system only through the gate.

🔒 RULES OWN · LLMs cannot touch
  • CVE identifiers & NVD verification
  • CVSS vectors, scores & severity
  • Exploit evidence & finding provenance
  • Which findings appear in the report
✎ LLMs GENERATE · schema-validated, gated
  • Finding write-up prose
  • Remediation wording
  • Executive-summary narrative
  • Attack-chain explanation
PIPELINE

Pipeline deep-dive

The pipeline is freeze → writer → QA → gate → reviser → render. The gate is a pure function of the frozen snapshot and NVD — no model in the loop — so its verdict is reproducible and auditable.

The frozen snapshot is immutable and append-only; enrichment never overwrites source evidence:

freeze — evidence snapshot (representative) representative pattern
@dataclass(frozen=True)
class FrozenFinding:
    finding_id: str
    cve_ids: tuple[str, ...]          # from scanner, verified vs NVD
    cvss_vector: str                  # authoritative, never model-written
    severity: Severity                # derived by rule, not prompt
    evidence_hash: str                # provenance seal

    def with_enrichment(self, e: Enrichment) -> "FrozenFinding":
        # append-only: returns a new object; source fields are immutable
        return replace(self, enrichment=(*self.enrichment, e))

The gate re-derives every factual claim and fails closed — any mismatch blocks the render and routes back to a bounded reviser:

gate — deterministic verification (representative) representative pattern
def gate(report: DraftReport, snap: FrozenSnapshot) -> GateResult:
    for claim in extract_factual_claims(report):
        fact = snap.lookup(claim.finding_id)
        if claim.cve_ids - set(fact.cve_ids):        # model invented a CVE
            return GateResult.fail(claim, "unverifiable CVE")
        if claim.cvss != fact.cvss_vector:           # model altered a score
            return GateResult.fail(claim, "CVSS mismatch")
        if not nvd.verifies(claim.cve_ids):          # not in authoritative source
            return GateResult.fail(claim, "NVD unverified")
    return GateResult.ok()  # only now may the report render
WHY A GATE, NOT A PROMPT
A prompt instruction ("do not invent CVEs") is a best-effort request the model can ignore under distribution shift or injection. A deterministic gate is a control: it cannot be talked out of failing. This is the difference between a guardrail and a guideline.
DESIGN DECISIONS

Architecture decision records

ADR-01

Deterministic spine over agentic autonomy

accepted

Context: a fully agentic reporter is flexible but non-deterministic on the exact fields that carry liability.

Decision: a deterministic chained pipeline owns control and facts; agency is bounded to prose generation at individual stages.

Consequence: reproducible, auditable reports; agency added only where its failure mode is acceptable.

ADR-02

Gate as a pure function of frozen evidence + NVD

accepted

Decision: the gate takes no model input; it re-derives claims from the immutable snapshot and NVD and fails closed.

Consequence: the correctness guarantee is structural, not probabilistic — the same input always yields the same verdict.

ADR-03

Knowledge layer is advisory, never authoritative

accepted

Decision: the governed knowledge layer supplies remediation patterns and methodology, but is scoped so it can never emit a factual security claim that reaches a report unchecked.

Consequence: RAG improves quality without becoming an unaudited fact source — closing OWASP LLM08-style risks.

SECURITY

Security posture · OWASP LLM

Scan findings are untrusted input — they may contain attacker-controlled strings. The architecture treats them as hostile by default.

🔒LLM01 · PROMPT INJECTION
Untrusted finding text is never concatenated into instructions. The gate is downstream of and independent from the model, so injection cannot fabricate a fact that survives verification.
🔒LLM08 · EXCESSIVE AGENCY
Stage-workers have no authority over facts, finding selection, or render. Their output is advisory until the gate accepts it.
🔒LLM09 · OVERRELIANCE
Fact-grounding against NVD plus a human-review fallback on repeated gate failure prevents silent acceptance of model output.
🔒DATA RESIDENCY
Strict controls on tracing and data residency; frozen snapshots are provenance-sealed and append-only.
OUTCOMES

Outcomes

HALLUCINATED CVEs
structurally 0
FACT SOURCE
NVD-verified
PIPELINE
auditable
SCALING
parallel graph
ON THE FIGURES
Structural guarantees (zero unverifiable CVEs reaching a report; NVD-grounded facts; auditable gate) are properties of the architecture. Illustrative code above is representative of the pattern, not a reproduction of proprietary client implementation.