Continuous AI Security Regression in CI
Run versioned prompt-injection, jailbreak and data-leakage suites in CI on every prompt, model, tool or index change, and block releases that regress past agreed severity thresholds.
- Capability:
- AI Security & Compliance
- Industry:
- SaaS & AI Product Companies
Who it is for
- VP Engineering
- ML Platform or LLMOps Lead
- Application Security Lead
- QA Engineering Manager
The problem
LLM features change constantly: prompts are edited, providers upgrade models, tools are added and documents are re-indexed. Each change can quietly undo a fix from the last pentest. Without automated security tests in the pipeline, the first sign of a regression is often a customer report.
Fixes that silently regress
A prompt tweak for tone or a new tool can reopen a prompt injection or leakage issue that was fixed months ago.
Provider model updates
Model versions change behaviour, and teams rarely rerun security tests when a provider alias moves to a new snapshot.
Non-deterministic results
A single passing run proves little when the same input can produce different outputs.
No release criteria for AI behaviour
Unit tests gate code, but nothing gates a prompt or model change on security behaviour.
What we build
We build a security regression suite that runs in your CI pipeline whenever prompts, model versions, tool definitions or retrieval indexes change. The suite starts from your pentest and red-team findings and from probe sets for each relevant OWASP LLM category, written as versioned test cases with expected safe behaviour. Each case runs several times to account for non-determinism. Scoring combines deterministic checks, such as canary detection and forbidden tool calls, with an evaluator model calibrated against human-labelled examples. Results are compared with the last release, and new failures above an agreed severity block the merge. Borderline results go to a reviewer. Dashboards show trends by category and model version.
- Versioned test cases built from your past findings and OWASP LLM probe sets
- Triggers on prompt, model, tool, index or configuration changes
- Repeated sampling per case to handle non-determinism
- Deterministic checks plus an evaluator model calibrated on human labels
- Release gates on new failures above agreed severity
- Trend dashboards by category, model version and release
How it works
- 01Build the baseline suitePast findings and probe sets are turned into versioned test cases with expected safe behaviour.
- 02Trigger on changeCI runs the suite when prompts, models, tools, indexes or AI configuration files change.
- 03Run with repeatsEach case runs several times against a staging deployment of the feature.
- 04Score and compareDeterministic checks and the evaluator score each run, and results are compared with the last release.
- 05Gate or reviewNew high-severity failures block the merge; borderline results go to a reviewer.
- 06Track and extendResults feed dashboards, and new findings are added to the suite.
Architecture
- Test suite
- Versioned test case repository
- OWASP LLM probe sets
- Cases from past pentest and red-team findings
- CI integration
- GitHub Actions or GitLab CI job
- Change detection for prompts, models, tools and indexes
- Staging deployment target
- Execution and scoring
- Parallel runner with repeated sampling
- Deterministic checks for canaries and forbidden tool calls
- Evaluator model with calibrated rubric
- Gating and review
- Severity thresholds and baseline comparison
- Reviewer queue for borderline results
- Reporting
- Trend dashboard
- Ticket creation in your issue tracker
Inputs and outputs
Inputs
- Past pentest and red-team findings
- Staging endpoint for the LLM feature
- Prompt, model and tool configuration in version control
- Severity thresholds agreed with security
- Human-labelled examples to calibrate the evaluator
Outputs
- Versioned security regression suite
- CI job with pass, block and review outcomes
- Tickets for new failures
- Trend dashboard by category and model version
- Evaluator calibration report
Where people stay in control
Reviewers decide borderline results and confirm new failures before tickets are raised, and the security lead owns the severity thresholds. The evaluator model is recalibrated against human labels on a regular schedule.
Integrations
- GitHub Actions, GitLab CI or Jenkins
- LLM gateway or provider APIs
- Issue tracker such as Jira or Linear
- Observability tools
- Slack or Microsoft Teams for alerts
Guardrails
- Suite runs against staging, never production users
- Evaluator agreement with human labels checked before gating is switched on
- Test secrets held in the CI secrets manager
- Cost and rate limits on each run
- Gate thresholds versioned and changed only by the security owner
Compliance notes
- Continuous testing records help evidence ongoing monitoring under NIST AI RMF and ISO/IEC 42001.
- Test categories map to the OWASP Top 10 for LLM Applications.
A typical pilot
Duration: 3 weeks
A suite for one LLM feature running in your CI against a staging deployment, built from your last pentest findings and the core OWASP LLM categories.
Deliverables
- 01Baseline regression suite
- 02CI job with gating rules
- 03Evaluator calibration report
- 04Dashboard
- 05Runbook for adding new cases
What we measure
- Evaluator agreement with humans
- Evaluator scores compared with human labels on a held-out set.
- Regressions caught before release
- Count of new failures blocked or sent for review in CI during the pilot.
- Run time and cost per pipeline
- Duration and model cost per suite run, logged by CI.
- Suite coverage
- Past findings and OWASP LLM categories represented in the suite.
Built on related work
LLM endpoint security scanner
Security platform (anonymised)
Workflow that scans Azure-hosted and custom HTTP LLM endpoints for prompt injection, jailbreaks and data leakage.
FAQs
01Will this slow our pipeline down?
The full suite can run on merges to main or nightly, with a smaller fast suite on every pull request. We tune the split to your release pace and budget.
02How do you handle different outputs on each run?
Each case runs several times and is judged on its worst and typical outcomes, not a single sample. Gates are based on new failures compared with the last release, which reduces noise.
03Can we trust an LLM to grade security tests?
Only after checking it against human labels. Deterministic checks handle what they can, the evaluator handles the rest, and borderline cases go to a person.
04Does it help when the provider changes the model?
Yes. Pin model versions where you can, and schedule a run when a provider announces a new snapshot. The dashboard shows behaviour by model version.
Related use cases
- SaaS & AI Product Companies
LLM Application Penetration Test (OWASP LLM Top 10)
A scoped pentest of your LLM feature and the app around it: prompt injection, data disclosure, output handling, excessive agency and system-prompt leakage, with reproducible evidence.
- SaaS & AI Product Companies
AI Agent Red-Teaming (Tool Misuse and Goal Hijack)
Red-team your AI agents for goal hijacking, tool misuse, excessive agency, privilege abuse and memory poisoning, in a sandbox that records every tool call and decision.
- SaaS & AI Product Companies
RAG Data-Leakage and Access-Control Testing
Test whether your RAG pipeline leaks documents across users, roles or tenants through retrieval, caching, citations or logs, using seeded canary documents and role-based test personas.
- SaaS & AI Product Companies
EU AI Act and ISO/IEC 42001 Evidence Pack
Assemble testing records, risk assessments, oversight design and technical documentation for your AI features, mapped to EU AI Act and ISO/IEC 42001 requirements, ready for counsel and auditors.

Founded by Akhilesh Mittal. 8 years building a security platform for a New Zealand company. IIT ISM Dhanbad and IMT Ghaziabad. Builds production agentic AI.
Scope a first test on one AI feature
Pick the LLM feature, agent or voice bot that worries you most. We will agree a short written scope and show you verified findings with evidence.