Security scenarios
Security scenarios are repeatable tests for attack behavior. They look like normal API scenarios, but their meaning is different: pass means the app blocked the attack, and fail means the app may be vulnerable. This lets security checks live beside functional tests without losing the evidence and severity model needed for security work.Functional scenario vs security scenario
A functional scenario checks that the app does what it should do. A security scenario checks that the app refuses what it should not allow.
This difference is important. A failing security scenario is not something Qodex should “fix” by changing the expected status to
200. The failure is the signal.
How Qodex authors them
Security scenarios are created by thesecurity and pentest skills.
- security creates methodical OWASP-aligned checks and regression scenarios.
- pentest goes deeper on a focused surface, chains attack vectors, and proves impact when possible.
- Reads the target surface, imported endpoints, auth profiles, memory, and environment constraints.
- Chooses relevant probes such as BOLA, IDOR, auth bypass, injection, SSRF, or rate-limit checks.
- Saves each check as a scenario with the secure result as the expected result.
- Auto-verifies the scenario on save.
- Opens a finding if verification shows the attack succeeded.
Authoring from chat
Describe the surface and the risk you care about:- Endpoint scope: “Only
/api/v1/orders/*.” - Role scope: “Run as viewer against admin endpoints.”
- Attack scope: “Skip rate limiting because it already ran today.”
- Environment scope: “Use staging, not production.”
How severity is chosen
Qodex maps findings to severity based on impact:
Every finding includes request and response evidence, reproduction steps, suggested remediation, and the OWASP category when applicable.
Environment constraints
Before creating or running security scenarios, Qodex reads the active environment. Constraints decide what the agent is allowed to attempt:read_only: trueblocks write verbs such as POST, PUT, PATCH, and DELETE.allow_destructive_tests: falseblocks destructive payloads even when the HTTP verb is allowed.max_requests_per_secondlimits brute-force, burst, and rate-limit probes.
Related
Inverted semantics
Learn the rule that protects security assertions.
OWASP API Top 10 in Qodex
See which probes Qodex runs for each category.
Sensitive endpoints
Understand how environment flags scope active tests.
API scenarios
Review the scenario model shared with API testing.