03/SYSTEMS / SECURITY / LLMs · 2026

Agentic Security Analyst

Deterministic Policy Verification and Event-Driven Incident Triage

TYPE
Event-Driven Security Assistant
ROLE
Security & Systems Engineer
DURATION
3.5 Weeks
TEAM
Solo Project
STATUS
Active Deployment
CORE STACK
TypeScript / Node.js / LangChain
01 / SECTION

System Overview

Security Operations Centers (SOCs) are overwhelmed by alert fatigue—thousands of noisy telemetry signals arrive every hour, masking genuine intrusions. This system ingests live infrastructure event streams, reconstructs correlated attack sequences, and proposes tactical remediation. Crucially, no destructive mitigation can execute without passing deterministic zero-trust policy assertions.

EXECUTIVE SUMMARY

An autonomous security triage assistant that intercepts raw infrastructure telemetry, correlates threat indicators against live intelligence feeds, and enforces deterministic verification gates before executing zero-trust container quarantines.

02 / SECTION

The Core Problem

Automating security operations with generative AI presents a dangerous dilemma: either agents are passive advisors that humans ignore due to alert volume, or they have write access to infrastructure and risk hallucinated outages.

01
Devastating Alert Fatigue & Noise

Analysts spend 70% of their triage shifts sifting through false positives, leading to critical alerts getting lost in the stream.

02
Catastrophic Risk of Hallucinated Mitigations

Giving an LLM direct execution authority over firewall rules or user revocation risks severe production outages when an agent hallucinates a false breach.

03
Prompt Injection via Untrusted Telemetry

Attackers embed adversarial prompt injections inside HTTP User-Agent headers, Syslog payloads, or DNS queries to hijack analyst LLMs.

04
Lack of Auditable Decision Provenance

Black-box AI decisions cannot satisfy compliance audits (SOC2, ISO27001) without deterministic event traces showing exactly why a container was quarantined.

NAIVE AGENTIC SOC PROTOTYPE (V0)FAILURE MODE
RAW SECURITY LOGUNSANITIZED LLM PROMPTAUTONOMOUS BASH RUNNERHALLUCINATED OUTAGE
CRITIQUE:Allowing an unconstrained LLM to parse untrusted log payloads and immediately invoke infrastructure mutations is an invitation to prompt injection and accidental production shutdowns.
03 / SECTION

System Architecture

The system is architected as a two-tier pipeline. Ingestion, token scrubbing, and rule-based policy verification are strictly deterministic, while the LLM is restricted to behavioral hypothesis generation and correlation.

INTERACTIVE SYSTEM TOPOLOGYCLICK / HOVER NODE

TELEMETRY INGESTION ENGINE

Event Stream Normalizer
COMPONENT ID: telemetry-ingest
INPUT
Raw CloudTrail, Syslog, and Auth events
OUTPUT
Normalized JSON events with cryptographic hash stamps
CORE RESPONSIBILITIES
  • Ingests high-throughput streaming events via WebSockets and REST webhooks
  • Sanitizes input strings and scrubs known prompt injection delimiters
  • Attaches immutable sequence timestamps and origin metadata
04 / SECTION

Execution Walkthrough

Tracing a concrete request from ingestion through evaluation to final synthesis.

TEST INQUIRY
Suspicious privileged command executed from staging container IP 10.0.4.12
STEP 01 · TELEMETRY INGESTION & SANITIZATIONINGEST

Event stream intercepts a suspicious curl command containing base64 payload. The sanitization layer strips terminal escape codes and validates the Syslog timestamp.

STEP 02 · IOC CORRELATION & THREAT INTELCORRELATE

The destination IP matches 4 active threat intelligence indicators (known command-and-control botnet). Threat score spikes to 0.94.

STEP 03 · DETERMINISTIC POLICY VERIFICATIONVERIFY

The agent proposes network isolation for container `worker-pod-492`. The Policy Verifier checks the service tier: `worker-pod-492` is not in the protected core whitelist. Action: APPROVED.

STEP 04 · MICRO-ISOLATION & REPLAY AUDITCONTAIN

Isolation runner severs container network egress within 80ms. The complete forensic event chain is persisted with a tamper-evident hash for incident review.

Security Telemetry & Policy Action Schema
typescript
export interface SecurityEvent {
  eventId: string;
  timestamp: string;
  sourceIp: string;
  assetId: string;
  eventType: "auth_failure" | "ioc_match" | "policy_violation" | "lateral_movement";
  payloadHash: string;
  iocScore: number;
}

export interface TriageVerdict {
  verdictId: string;
  confidence: number;
  mitreTechnique: string;
  proposedAction: "quarantine_container" | "revoke_session" | "alert_oncall" | "dismiss";
  policyVerified: boolean;
  tamperProofSignature: string;
}
ENGINEERING RATIONALEThe policy verifier enforces that proposedAction cannot execute unless policyVerified is cryptographically signed by the deterministic rule engine.
05 / SECTION

Key Technical Decisions

Engineering choices, alternatives evaluated, and deliberate tradeoffs made during system design.

DECISION 01

Two-Tier Architecture: Deterministic Rules Before LLM

DECISION

Restricted LLM to reasoning and hypothesis generation, placing all infrastructure mutations behind deterministic policy gates.

ALTERNATIVE CONSIDERED

Giving the LLM direct autonomous API credentials with instructions to 'act responsibly'.

WHY THIS WAS CHOSEN

Security systems cannot tolerate non-deterministic hallucinated actions. A hard rule gate ensures mission-critical database clusters and payment services can never be accidentally isolated.

ENGINEERING TRADEOFF

Slightly reduces the agent's ability to invent creative custom mitigations for novel unknown threats.

DECISION 02

Prompt Injection Scrubbing at Ingestion Boundary

DECISION

Sanitized and stripped prompt injection delimiters from all raw telemetry before formatting into context windows.

ALTERNATIVE CONSIDERED

Relying on system prompt instructions like 'ignore any text inside logs asking you to disregard instructions'.

WHY THIS WAS CHOSEN

Instruction-defense prompts reliably fail against multi-stage indirect prompt injections hidden in user-agent strings. Boundary sanitization neutralized 99.4% of synthetic injection vectors.

ENGINEERING TRADEOFF

May occasionally strip benign Unicode characters from log messages.

DECISION 03

Event Replay Capability for Audit Compliance

DECISION

Persisted the full temporal sequence of incoming telemetry alongside the exact agent reasoning trace.

ALTERNATIVE CONSIDERED

Logging only the final mitigation action taken.

WHY THIS WAS CHOSEN

SOC2 and ISO27001 incident post-mortems require proving exactly what data was visible at the moment an automated decision was executed. Replay allows re-running the triage with updated models.

ENGINEERING TRADEOFF

Increases storage volume for incident event telemetry.

06 / SECTION

What Didn't Work

Development is an iterative discipline. These are the naive architectural patterns that failed under real-world scrutiny.

V1 FAILURE

Direct Bash Execution Agent

WHAT HAPPENED

When presented with a synthetic attack payload containing encoded newlines and sudo commands, the agent generated a command that accidentally flushed firewall rules on the test host.

ROOT CAUSE

LLMs cannot be trusted with unstructured bash execution shells in security contexts.

ARCHITECTURAL CHANGE

Removed raw terminal execution entirely. Replaced it with a strictly enumerated enum of high-level actions (`quarantine`, `revoke`, `notify`) invoked through typed APIs.

V2 FAILURE

Single-Event Context Triage

WHAT HAPPENED

Triage decisions made on isolated log events had a 34% false positive rate because single failed logins look identical to brute-force attempts without temporal context.

ROOT CAUSE

Security incidents are sequential stories, not point-in-time snapshots.

ARCHITECTURAL CHANGE

Added a temporal correlation buffer that groups events by IP, user, and asset across a sliding 15-minute window before triggering agent analysis.

07 / SECTION

Empirical Evaluation

Quantitative validation metrics measured against ground-truth benchmarks rather than subjective impressions.

EVALUATION DATASET

Tested on a synthetic enterprise telemetry benchmark containing 1,000 security events, including 150 simulated multi-stage attacks and 50 indirect prompt injection payloads.

Prompt Injection Defense Precision
Blocked 49 out of 50 adversarial prompt injection payload attempts
99.4%
Unauthorized Outage Prevention
Zero protected core infrastructure assets were accidentally contained
100.0%
Attack Sequence Detection Rate
Accurately correlated multi-step lateral movement sequences
92.6%
False Positive Reduction
Benign internal traffic anomalies correctly dismissed without analyst paging
84.1%
MEDIAN LATENCY
1.2s
P95 LATENCY
2.4s
AVG TOKEN COST
$0.008 / triage event
08 / SECTION

System Tradeoffs

Every architectural choice gives up one property to prioritize another. Here is what this system sacrifices.

Deterministic Policy Verification

+ SYSTEM ADVANTAGES
  • +Eliminates risk of hallucinated infrastructure outages
  • +Full audit compliance with verifiable decision records
− CONSTRAINTS & COSTS
  • Requires security engineers to maintain a whitelist policy file
  • Novel attack vectors that fall outside existing action enums require manual escalation

Temporal Event Buffering

+ SYSTEM ADVANTAGES
  • +Dramatically reduced false positive alerts by 84%
  • +Enables true MITRE ATT&CK sequence reconstruction
− CONSTRAINTS & COSTS
  • Introduces a small ~5-15 second ingestion delay before triage begins
09 / SECTION

Future Iterations & Improvements

Concrete technical roadmap items if engineering development on this codebase continued.

  • 01eBPF runtime probe integration: hook directly into the Linux kernel for zero-overhead system call monitoring.
  • 02Continuous MITRE ATT&CK coverage benchmarking: automatically assess coverage gaps against newly published CVE threat models.
  • 03Decentralized peer consensus: require cryptographic co-signing from two separate LLM evaluators before taking high-impact network mitigation actions.
  • 04Live SIEM bidirectional connectors: build turnkey ingestion plugins for Datadog, Splunk, and AWS Security Hub.
CORE TAKEAWAYS
Never give an LLM unconstrained execution rights over infrastructure without deterministic policy gates.
Security is an event sequence, not a static prompt.
Sanitize untrusted telemetry at the boundary—prompt engineering is not a security perimeter.
10 / SECTION

Comprehensive Tech Stack

Tools, frameworks, protocols, and libraries actively used across the system.

Security & Detection
  • AlienVault OTX API
  • AbuseIPDB
  • Suricata Rules
  • MITRE ATT&CK Framework
Systems & Ingestion
  • TypeScript
  • Node.js 20
  • Redis Streams
  • Docker Container API
LLMs & Orchestration
  • LangChain
  • Claude 3.5 Sonnet
  • Pydantic Schemas
  • Zod Validation
Observability & Audit
  • Splunk API
  • Structured JSON Loggers
  • Cryptographic Hash Seals