How RedLab works.
RedLab's AI agents get free rein over a copy of your stack, and no way to touch the real thing. Around them, a harness checks every piece of evidence they offer and decides every outcome by rule. This page explains that harness: the stages, the rules, and how we measure it.
The run, stage by stage
- CollectA read-only, offline script records your servers' OS release, package versions and key security settings. It changes nothing, and nothing leaves until you send it.
- Build the labRedLab builds an isolated lab from your code and that inventory: the same OS release, the same versions, the same settings, filled with synthetic data. The operating system, not the agents, makes sure the lab can't reach production.
- MapAgents chart the attack surface: routes, sign-in and roles, uploads, queued jobs, webhooks, outbound API calls, where secrets are read, and every AI feature (prompts, model output, agent tools and the data each one can see), each pinned to a file and line.
- HuntSpecialist agents work through checklists, each in its own area, with leads from static and taint analysis run by the harness. They trace how untrusted input reaches something that matters, and record each issue with the exact lines that show it.
- AttackAn isolated attack box, armed with offensive security and AI red-teaming tools, goes after the lab, and only the lab, to show what each finding really allows.
- Adversarial reviewEvery finding is argued against, most severe first, by a reviewer whose only job is to knock it down. Anything ruled out gets a second look, because a real bug wrongly dismissed is the costliest mistake.
- FixFor each finding worth fixing, a suggested fix: an explanation, and a small patch where a code change fits.
- ReportA management summary in plain English, detailed cards for your developers, and a list of anything the run couldn't settle. A named person reviews every report before it reaches you.
- RetestOnce you've fixed something, RedLab re-runs each finding against your new code: fixed, still there, or inconclusive.
The fence
Agents are fenced in code, not by instruction. A rule in a prompt can be argued with; a check in the harness can't.
- Signed scope. Every engagement starts from a signed record of what may be tested. The scope is entered by a person, never read by a model from free text.
- Read-only snapshot. Agents work on a copy of the code taken for the run, fingerprinted at the start. While hunting they can read, search and list files inside it, and nothing else: no shell, no network, no writing to your code.
- No way out. Every path is resolved before it's checked, so a symbolic link planted in the code can't lead an agent outside the snapshot.
- Lab network only. Attack traffic can reach the lab the run built and nothing else, enforced by the operating system.
- Only our own tools. Agents can call RedLab's tools and nothing else, and every check runs twice, at two separate layers.
- Everything logged. Every tool call, allowed or refused, is written to the run's audit log with its stage and the reason, and the evidence bundle checks its own integrity.
The evidence rule
A finding is only recorded if every line of code it quotes is found, word for word, at the lines it cites. Anything else is refused and sent back. That single rule stops invented evidence, a well-known failure of AI security tools. Quotes from the framework's own code don't count either: a finding has to point at your code.
Every finding also states how far it was proven: a pattern match, a traced path from an entry point an attacker controls, a test that runs in a sandbox, or impact shown in the lab.
The adversarial review
Each surviving finding faces five questions:
- Reachability. Can an attacker reach this code from an entry point they control?
- Preconditions. Are the roles, settings and data the attack needs realistic?
- Controls. Does it survive every control downstream: validation, policies, encoding, middleware?
- Scope. Does it cross a real boundary, such as another user, tenant, privilege, data or cost?
- Innocent explanation. Is there no simpler, harmless explanation, such as dead code, test-only code or intended behaviour?
An answer only counts if its own quoted evidence passes the evidence rule. Then code decides the verdict, not the AI: one proven "no" and the finding is dropped; five proven "yes" and it survives; anything in between is marked needs validation and shown as unsettled. Dismissing a finding needs the same evidence as keeping one, so real issues can't be waved away either.
Suggested fixes
Where a code change fits, RedLab writes the smallest safe patch, in the framework's own idiom. The harness keeps it only if it applies cleanly to the exact code reviewed (checked in a throwaway copy), changes only your own code, and stays small. RedLab never applies a patch: your developers review it. Configuration and process fixes are explained in words.
The report never hides gaps
Findings without a verdict, areas of the map nobody closed, and any stage that failed are always listed. A clean report means the run looked and found nothing, not that it stopped early. A check that couldn't start at all is labelled "didn't run", never "no problems found".
What it covers
- Web and API code. PHP and Laravel, Python and FastAPI: sign-in, roles and policies, tenancy, uploads, injection, SSRF, deserialisation and the rest of the usual suspects.
- AI features. Model calls, prompts built from user text, retrieval and its tenancy (RAG), agents and MCP tools, and conversational AI working alongside rules engines: can the model skip or override the rules?
- Feeds and integrations. XML imports (XXE), SFTP drops, webhook signatures, token scope, and what data leaves for third-party services.
- Supply chain. Dependencies checked against the GitHub Advisory Database, OSV, CISA's Known Exploited Vulnerabilities and EPSS, so the ones being exploited right now come first.
- Pipelines and infrastructure. CI secrets, Dockerfiles, Terraform, and the server settings from your inventory.
- History. Earlier security fixes in your repository are checked for incomplete fixes and repeated variants elsewhere in the code.
How we measure it
RedLab is scored against a corpus of deliberately vulnerable applications (Laravel, Python, AI agents and MCP servers), using answer keys of planted bugs plus decoys that look like bugs but aren't. Every score is the average of repeated runs. Findings are matched to the key one to one: the right file, within a few lines, with the right CWE. Duplicates, extras, decoys reported and real bugs wrongly dismissed by the review all count against it. The score, not a good-looking demo, is how we judge every change to RedLab.
How it compares
| Compared on | Scanners SAST and DAST | General AI assistants | Traditional pen test | RedLab |
|---|---|---|---|---|
| Evidence behind a finding | A rule matched | The model's word | The tester's proof | Quoted code, checked word for word |
| False positives | Often many; you triage | Unchecked, can be invented | Filtered by a person | Argued against on five questions; unclear ones flagged |
| Matches your versions | Dependency lists only | No | Tests what's live | Version-pinned lab |
| Touches production | Dynamic scans usually do | Depends on the tool | Usually, so destructive tests are off limits | Never. It attacks a copy, so nothing is held back |
| Fixes | Generic advice | Suggested code, unchecked | Written recommendations | Patch checked to apply to your code; never applied for you |
| Readable by management | Rarely | Varies | Yes | Plain-English summary, plus developer detail |
| Retest after fixing | Rescan | Start again | Usually extra cost | Each finding re-run on your new code |
| Shows what it couldn't settle | No | No | Usually, as scope notes | Always, in the report |
A pen test by accredited testers remains the right answer for compliance. RedLab helps you arrive at it with less left to find.