Moosa Memon
← Index of work

Adversarial testing for LLM apps, reported the way security teams read

AegisRedTeam: fires a corpus of adversarial payloads at an LLM endpoint or RAG pipeline, classifies each response with a two-stage evaluator, grades per OWASP LLM Top 10 category, and emits an executive PDF alongside JSON, HTML and Markdown.

Type
LLM Infra
Stack
Python / CLI / PDF reporting / OWASP LLM Top 10
Status
Complete; runs end-to-end with no API key against a mock target
Measured
12 probes, 83 adversarial attempts, five OWASP categories, one command, a real PDF in reports/

Problem

Security and legal teams increasingly won’t sign off on an LLM deployment without evidence of adversarial testing. The evidence they want is not a list of jailbreaks that worked. It’s: which OWASP categories are failing, how reliably, with what proof, and what to do about it. Every design decision serves that output.

System

aegis scan --target <endpoint> --authorize runs the full pipeline. Probes carry payloads per OWASP LLM category; each response goes through a two-stage evaluator (cheap heuristics first, then a classifier for the ambiguous cases); results roll up per category with pass rates and evidence; the report generator writes the executive PDF and the machine-readable formats for CI.

Worth knowing

Canary-based detection instead of harm elicitation. The naive way to test a jailbreak is to ask for something harmful and see if the model complies, which produces a corpus of harmful output and an evaluator that has to judge harm. Aegis plants canary strings and tests whether the guardrails leak them, so success is detected by string presence, not by a judgment call. It’s more reliable and doesn’t fill your reports with the thing you were trying to prevent.

The --authorize flag is deliberate: the tool refuses to run against a target without an explicit assertion that you’re allowed to test it.

Have a workflow that looks like this?

Most of these start as a messy, manual process someone got tired of. Twenty minutes is usually enough to sketch how I'd approach yours.