> For clean Markdown of this page, append .md to its URL. For the complete documentation index, see https://www.superagent.sh/llms.txt.


Review whether the backend enforces approval, transaction terms, and the order of state changes.

# Approval and state transitions in code


[← Back to attack scenarios](https://www.superagent.sh/docs/products/red-teaming/attack-scenarios)

A state change may depend on completing a previous step or getting approval for specific terms. This scenario examines whether the backend enforces those conditions wherever it performs the transition.

Use it for repositories with approvals or transactional workflows. The report can connect an invalid state change to the code path that allowed it.

The app lists this scenario as **Bypass approval, transaction binding, or state ordering** (`REPO-06`) in [Repository Red Teaming](https://www.superagent.sh/docs/products/red-teaming/repositories).

## Standards and guidance

[CWE-841 Improper Enforcement of Behavioral Workflow](https://cwe.mitre.org/data/definitions/841.html)

---
Source: https://www.superagent.sh/docs/products/red-teaming/attack-scenarios/repository-approval-state-integrity
Index: https://www.superagent.sh/llms.txt
