Hostile agents and bots
AI agents and bots attack sites at scale. Verify who an agent is, limit scraping, give agents scoped tokens and keep their actions reversible.
- Required 3
- Recommended 2
Required
Verify who an agent is
RequiredNever trust the user agent string. Give special access to a bot or agent only after it proves who it is.
Give agents scoped tokens instead of passwords
RequiredLet agents act for a user only with a token that has narrow rights, a short life and can be revoked. Never ask users to share a password.
Log agent actions and let users undo them
RequiredRecord which agent did what for which user, and make its changes easy to undo.
Recommended
Limit bulk reads and scraping
RecommendedCap how fast one client can page through your data and how much it can read in a day.
Mark user content that agents read
RecommendedKeep text written by your users apart from your own content, so other people's agents can tell it is not yours.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers security testing playbook: https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots.