---
title: "Test the access rules on the running · Agent Wranglers"
url: https://agentwranglers.se/playbook/codebase-takeover/due-diligence/test-access-rules
id: TKO-32
level: Required
risk: data
updated: 2026-10-22
tokens: 855
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Test the access rules on the running product

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Due diligence](https://agentwranglers.se/playbook/codebase-takeover/due-diligence.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: TKO-32
- Level: Required
- Chapter: [Due diligence](https://agentwranglers.se/playbook/codebase-takeover/due-diligence.md)
- Rule: With two test accounts in the running product, try to read and change the other account's records on every route. Check that no secret key ships to the browser and that payments are confirmed on the server.
- Check: The report lists every route and table tested with the result for each, and the result of the browser bundle search. Every request for the other account's records fails.
- Risk: Data leaked or lost
- How: These are the holes most often found in AI-built apps, and each one can leak every customer's data. Test the routes from [Check ownership on every record](https://agentwranglers.se/playbook/adversarial-testing/access-and-accounts/object-access.md) and the tables from [Turn on row-level security for every table](https://agentwranglers.se/playbook/ai-assisted-development/apps-built-with-ai-builders/row-level-security.md). Search the browser bundle as [Keep secrets out of the browser](https://agentwranglers.se/playbook/adversarial-testing/data-and-secrets/secrets-out-of-browser.md) says. Follow [Confirm payments on the server](https://agentwranglers.se/playbook/adversarial-testing/abuse-and-limits/confirm-payment-server-side.md). Ask for the date of the last security test and the status of each of its findings.

## Sources

- [OWASP WSTG: Testing for Insecure Direct Object References](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References)

## Related rules

- SEC-17 [Check ownership on every record](https://agentwranglers.se/playbook/adversarial-testing/access-and-accounts/object-access.md) in Adversarial testing
- AID-35 [Turn on row-level security for every table](https://agentwranglers.se/playbook/ai-assisted-development/apps-built-with-ai-builders/row-level-security.md) in AI-assisted development
- SEC-34 [Keep secrets out of the browser](https://agentwranglers.se/playbook/adversarial-testing/data-and-secrets/secrets-out-of-browser.md) in Adversarial testing
- SEC-64 [Confirm payments on the server](https://agentwranglers.se/playbook/adversarial-testing/abuse-and-limits/confirm-payment-server-side.md) in Adversarial testing

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/codebase-takeover/due-diligence/test-access-rules">Agent Wranglers codebase takeover playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Scan the whole history for secrets](https://agentwranglers.se/playbook/codebase-takeover/due-diligence/history-secret-scan.md)
- Next: [Check how the team reviews AI-written code](https://agentwranglers.se/playbook/codebase-takeover/due-diligence/ai-review-practice.md)
- [Due diligence](https://agentwranglers.se/playbook/codebase-takeover/due-diligence.md)
