{"success":true,"name":"rate-limit-endpoints-that-can-be-abused","description":"Building login, signup, search, email-sending, or other public endpoints.","category":"ai-brimind","path":"ai-brimind/rate-limit-endpoints-that-can-be-abused/SKILL.md","file":"SKILL.md","content":"---\nname: rate-limit-endpoints-that-can-be-abused\ndescription: \"Building login, signup, search, email-sending, or other public endpoints.\"\n---\n\n# Rate-Limit Endpoints That Can Be Abused\n\n## When to use\nAn endpoint is reachable without (or with cheap) authentication and could be hammered: login attempts, OTP/email sending, expensive searches, form submissions.\n\n## Example request\nLogin with unlimited attempts → a script tries 100,000 passwords overnight — brute force invited. 'Send verification email' with no limit → attacker triggers thousands of emails to a victim, and your sender gets blacklisted — abuse amplification. Expensive search endpoint open → one crawler loops it and the database melts — unmetered costly work.\n\n## Instructions\nAct like a developer who assumes every public endpoint will be scripted by someone hostile or careless. Identify abuse-prone endpoints: authentication (login, password reset, OTP), anything that sends (email, SMS), anything expensive (search, export, generation), and anything that creates records. For each: (1) define a sane human rate ('a real user logs in at most a few times a minute') and enforce a limit keyed by IP and/or account with a clear 429-style response — check whether the framework or a standard middleware already provides this before building it; (2) for login specifically, add progressive slowing or temporary lockout after repeated failures, and log the attempts; (3) make limits visible in responses (retry-after info) so legitimate clients can behave. Then verify: script 50 rapid requests against the endpoint and confirm the limiter actually triggers. Only proceed once each abuse-prone endpoint has a stated limit, an enforced response, and a log trail — an endpoint whose only limit is server capacity has no limit.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1092\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}