Monday, November 16, 2026

AISecurity for learning and stress-testing AI guard claims

AISecurity for learning and stress-testing AI guard claims

DmitrL-dev/AISecurity is a bilingual open-source lab covering prompt injection, RAG and agent security education, plus tooling to measure guard effectiveness on your own labelled data in authorized environments.

ToolDmitrL-dev/AISecurity — open-source AI security lab with an EN/RU academy, statistical claim evaluation (eval-bounds) and a local guard-testing workbench (Guard Lab)
CategoryAI/LLM security education and evaluation toolkit (Python)
Primary UseLearning prompt injection, RAG, agent and memory attack boundaries, and rigorously evaluating security-guard claims on your own labelled JSONL prompts
Safe UseFor security professionals, students and defenders working in labs or on systems they own or are explicitly authorized to test; the README states red-team tools must be used only with authorization, and no real secrets or customer prompts should be posted publicly
Telemetry NoteEverything runs locally after installation — Guard Lab requires no account, API key or GPU, evaluations never leave the machine, and reports deliberately omit input text, hashes and matched excerpts, producing a content-free audit trail

DmitrL-dev/AISecurity positions itself not as another attack toolkit but as a laboratory for reasoning about AI application security — the boundary between untrusted content, model behavior, tools, memory, and the actions an application can ultimately take. The repository, sitting at roughly 110 stars and written primarily in Python, bundles three maintained components: a bilingual (English/Russian) academy, a statistical evaluator called eval-bounds, and a guard-measurement workbench called Guard Lab. The team behind it also sells a commercial product, Spectorn, and the README is unusually candid about the split: the repo is where they teach the problem and publish tools to check anyone's claims about defenses, including their own.

The educational spine is the academy, which walks from beginner material like prompt injection and the OWASP-oriented lists into intermediate territory: agent loops, tool permissions, RAG security, agent memory, detection engineering and research. Each boundary gets a dedicated lesson in both languages — for instance docs/academy/en/beginner/01-prompt-injection.md and docs/academy/ru/beginner/09-rag-security.md — with hands-on labs sitting beside the source rather than in a separate portal. The framing is documentary and conceptual: understand the failure mode before you try to measure or mitigate it.

What sets this project apart from most ai-red-team repositories is eval-bounds, a small Python-only utility that attacks a genuinely neglected problem: what does a security evaluation actually prove? The README's headline example is worth internalizing. If you run 50 attacks against a guard and none succeed, that result is statistically compatible with a bypass rate of up to 5.8% at a one-sided 95% confidence level. The tool computes exact bounds and the sample size a claim like «blocks 99%» would require. For professionals who read vendor marketing or academic papers about LLM guardrails, this is the kind of arithmetic that should precede any procurement or benchmark comparison.

Running it is deliberately trivial: python3 tools/eval-bounds/rate_bounds.py claim 0 50 --tau 0.01 returns the observed rate, the confidence bound, and a verdict — in the sample output, INCONCLUSIVE, with a note that 299 independent trials would be needed to reach the stated tolerance tau of 1%. The --tau flag lets you set the detection threshold you actually care about, and the tool also ships a paired test for «did the fix help» — a before/after comparison that avoids the common trap of eyeballing two noisy pass rates and declaring improvement. It is maintained and tested in CI under tools/eval-bounds with its own eval-bounds.yml workflow.

The second operational tool, Guard Lab, targets practitioners who need to measure a guard — theirs or a vendor's — against their own data. It ingests labelled JSONL prompts and reports misses, false positives and execution failures as separate categories, which matters because a silently swallowed error that becomes a «benign» prediction is exactly the failure mode that inflates apparent accuracy. The README is explicit that an error never quietly becomes a benign prediction, and that reports omit input text, text hashes and matched excerpts — a privacy-conscious design that makes results shareable without leaking corpus content.

Installation targets Linux x86-64 with Python 3.11, and the entry point is guard-lab --demo, which exercises the plumbing on four synthetic inputs. The README repeatedly and correctly stresses that the demo is not a benchmark; you replace it with your own labelled prompts and read coverage and errors alongside the confusion counts. Notably, Guard Lab uses eight public pattern engines rather than the team's current commercial detectors, evaluated through the pinned EngineRegistry.analyze_patterns endpoint — so it is an input-side pattern evaluation, not a hosted gateway or an output guard.

The scope notes deserve attention from anyone assessing what this repo is and is not. The native worker in Guard Lab has process and resource limits but is explicitly not a sandbox for untrusted native code. The Public core 2.0.1 under sentinel-core/ is a frozen legacy snapshot containing 48 authored regression cases — clearly labeled as not a detection benchmark. Older engine catalogues, research notes and detection percentages in the archive are historical documents whose figures have not been revalidated, and the README tells you to treat them as such. This kind of honest archaeology is rare in a field where stale benchmark numbers circulate for years.

There is also a lighter educational artifact: the «60-second decision room» at the published GitHub Pages site, a one-minute interactive exercise for deciding whether an agent may act on content it retrieved. It complements the agent-action-evaluation.md checklist in docs/, which is the kind of artifact a team building tool-using agents should read before wiring an LLM to anything with side effects. The overall taxonomy of boundaries — instructions hidden in data, documents retrieved into context, model output becoming an action, context stored for future use — is a clean mental model that maps well onto the owasp-asi-top10 and mcp-security topics the repo tags itself with.

From a defensive perspective, the value proposition is mostly about rigor. The topics list (prompt-injection, jailbreak-detection, llm-attacks, ai-firewall) suggests offensive material, but the actual deliverables are educational analysis and measurement tooling. eval-bounds in particular gives blue teams and AI engineers a defensible, reproducible way to challenge a vendor's blocking claim before signing off on a deployment, and Guard Lab gives them a local, privacy-preserving harness to validate behavior on domain-specific prompts that public benchmarks never cover.

The trust model around the commercial arm is handled transparently. Spectorn is described as the maintained protection layer that sits around prompts, model responses and agent actions, decides on every request, and records verdicts in a content-free audit — but the repository is explicitly not a download of that platform, its private corpora or its current detectors. The README instead frames the repo as the accountability mechanism: the tools to check anyone's claims about AI security, theirs included. Earlier Syntrex-era material and the GoMCP organization remain linked for historical context only.

Contributions are scoped tightly and sensibly: a clearer lesson, a reproducible installation bug, an incorrect number, or a minimal synthetic test case — with an explicit instruction not to post real secrets, customer prompts or private corpora in issues. Combined with SECURITY.md, CODE_OF_CONDUCT.md and CITATION.cff, the housekeeping suggests a team treating this as a long-lived educational asset rather than a launchpad for a product. The license field reads NOASSERTION, so anyone intending to reuse code commercially should read LICENSE before building on it.

For authorized professionals, the fit is straightforward: use the academy to onboard engineers on RAG and agent failure modes, use eval-bounds to size and interpret your own guard evaluations honestly, and use Guard Lab on labelled data from systems you own or are explicitly authorized to test. Nothing here is a weaponized attack chain — it is measurement and pedagogy, which is arguably what the LLM security space needs more of right now, and the statistical honesty of eval-bounds alone makes the repository worth a bookmark.

Official project repository for DmitrL-dev/AISecurity.
Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.

Sponsored
Share articleFacebookXLinkedIn

Continue exploring

Browse all articles →

0 comentários:

Post a Comment

Note: Only a member of this blog may post a comment.