Amp works through a longer thread, so the code it produces encodes assumptions about how your app authenticates and who owns what. Test those assumptions explicitly on each new path, since the thread explains a task rather than an access model.
Where this class of bug actually lives in Amp output
- Auth-model assumptions. It infers your scheme from the code it read and applies it unevenly.
- New paths for an existing feature. A second route to the same data, with the check on the first one only.
- Thread-level decisions. Choices made mid-thread and never restated in the summary you read.
- Test coverage shaped by the task. Tests for the described behaviour, none for cross-account access.
What to try first
- Ask for the thread's decisions, then test each one against your actual auth model.
- Find every route that reaches the same data and compare their checks.
- Exercise each new path with two accounts.
- Confirm the tests fail when the access check is removed.
A reproduction you can keep
Two routes, one resource. The weaker one is the finding:
for r in /api/invoices/1003 /api/v2/invoices/1003 /api/export/invoices/1003; do
printf '%-30s ' "$r"
curl -sS -o /dev/null -w '%{http_code}\n' "https://staging.example.com$r" \
-H 'Authorization: Bearer ***'
done
# vulnerable: 200 on one of the three
# fixed: identical 404s on all three, for a foreign idWhat "fixed" has to look like
Every path to the same resource must run the same authorization, ideally through one shared function, and the pass condition is identical responses across all of them for a foreign id. Verify by removing the check locally and confirming the tests fail.
Where people get this wrong
- The thread summary omits the reasoning, so decisions made in the middle are invisible in review.
- A v2 or export route to the same data is where the check goes missing.
- Autonomous test generation covers the task, not the threat model.
What Offense does here
Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.
Questions this page answers
What is the risk with a long autonomous thread?
Decisions accumulate and the summary does not carry them, so the access model is applied unevenly across the paths it built.
How do I verify authorization on a new path?
Two accounts, one foreign id, and compare with a nonexistent id. Then remove the check and confirm a test fails.
Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.