A penetration test checks your app and API for known, generic weaknesses, and it is good at that. The bots that get through usually exploit none of them: they sign in with valid accounts, make ordinary API calls and time them around how your business works. Keep your scanning, bot protection and independent penetration test as the baseline, and add a white-box review that reads your code, your telemetry and your business flows together.
Why do bots get past a passed penetration test?
Bots get past because most of them do not need a vulnerability. A penetration test looks for ways to break the system, such as injection flaws, broken access control or weak configuration. Automated abuse usually uses the system exactly as it was built, just faster, at larger volume and at the moments that matter most to your business.
The OWASP Automated Threats to Web Applications project, which catalogues this kind of activity, describes it as often relating to misuse of inherent valid functionality rather than exploitation of a weakness. The OWASP API Security Top 10 gives it its own entry, API6:2023 Unrestricted Access to Sensitive Business Flows, with examples such as buying all the stock of a high-demand item to resell and reserving every available time slot.
A test can pass cleanly against a system that is wide open to this, because the two kinds of finding barely overlap.
What does a penetration test check, and what does it leave out?
A penetration test is an authorised attempt to break into a running system, carried out by an independent tester within an agreed scope and time. It is the right tool for finding the weaknesses an attacker would use to get in, and we advise every client with an app or API in production to commission one from an accredited firm.
It has limits that testers themselves are open about. The National Cyber Security Centre (NCSC) says a penetration test can only validate that systems are not vulnerable to known issues on the day of the test. Most tests also work without three things that business-logic abuse depends on:
- Your telemetry. The tester sees their own traffic, not the patterns in your production logs that show automation already happening.
- Your business context. A tester can confirm that an endpoint lets a signed-in user reserve an item. They usually cannot tell you that hundreds of reservations in the first few seconds of a release would empty your stock and anger your customers.
- Your source code, unless you agree white-box or partial access at scoping. Without it, endpoints the app never calls but the API still exposes can go unnoticed.
We say this to describe what a time-boxed test from outside is designed to do, and not as a criticism of testers. Our guide to penetration tests and production readiness reviews covers what a test is good at and how to choose a tester.
What does targeted automation look like in practice?
Targeted automation looks like your best customers, only faster and more consistent. In our experience, it shows up wherever something in the app is scarce or valuable:
- Limited stock and releases. Scripts that buy or reserve the moment a product drop, ticket release or appointment window opens.
- Slots and reservations. Holding or cancelling bookings to keep availability for one user or to resell it.
- Loyalty, referral and promotion schemes. Creating accounts or chaining referrals to claim rewards at scale.
- Account takeover. Credential stuffing, where leaked username and password pairs from other sites are tried against your sign-in endpoint.
- Scraping. Pulling prices, availability or personal data faster than any person could read it.
What these have in common is that each request is valid on its own. The user is signed in, the request is well formed and the response is correct. Bot protection at the edge and generic rate limits are tuned for traffic that looks obviously automated, so a script that signs in with real accounts, paces its calls and adapts when blocked can stay under them.
Why is this getting more common?
Writing a script used to take skill and time, and AI coding tools have removed most of both. In our recent work, some of the automation we traced appeared to come from ordinary customers running scripts of their own to get an advantage, rather than from organised attackers. That changes the response as well as the risk, because blocking your own customers heavy-handedly can cost more than the abuse did. Our guide to customers using AI bots on scarce stock covers that response, including personal AI agents such as Meta’s Muse.
What does a white-box review add?
A white-box review adds the three things a penetration test usually lacks: the source code, the telemetry and the business context, read together. The reviewer knows how the system was built, can see how it is being used, and understands which flows matter to the business.
In our security reviews, senior engineers work with AI to do three things:
- Trace code paths from each exposed endpoint through to the data and actions behind it, including endpoints the app does not call.
- Analyse telemetry logs for patterns that suggest automation, such as bursts of requests at release times, many accounts used from one device, or request rates no person could reach.
- Draft threat models from what the code and the logs show, which the engineers then test against the business context and the client’s priorities.

What kinds of finding does it turn up?
The findings that matter tend to sit between the app, the API and the infrastructure, where no single test looks. These are the kinds we look for:
- Rate limits that do not add up. A limit enforced separately on each instance of an API multiplies with every instance you run, so a limit of 10 requests a minute on four instances can let through up to 40. Limits keyed on IP address are easy to spread across many addresses. Our guide to rate limiting across multiple API instances covers where limits belong and what to key them on.
- Rules enforced only in the app. If the app stops a user reserving more than two items but the API does not, a script that calls the API directly is not stopped at all.
- Endpoints the app no longer uses. Older versions of an endpoint, or ones built for an admin tool, are still reachable unless something removes them.
- No way to tell your app from a script. Without app attestation, such as Apple App Attest or Google Play Integrity, the API cannot distinguish a request from your genuine app from one sent by a script using a stolen token. Our guide to App Attest and Play Integrity for mobile APIs covers how to add it without locking out real users.
- Telemetry that cannot answer the question. If logs do not record which account, device and app version made each request, abuse is hard to see and harder to prove.
Why should the response be proportionate?
The response should be proportionate because the cheapest control to switch on is often the one that hurts your real customers most. Blocking every request that looks automated, forcing a CAPTCHA on every sign-in or rejecting older app versions overnight can lock out the people you are trying to protect, at exactly the moment demand peaks.
In our experience, these approaches keep the response sized to the risk:
- Measure before you block. Most web application firewalls can run rules in a detection or logging mode, which logs what a rule would have blocked without blocking it. Run new rules that way first and check who they would have caught.
- Roll out stronger checks in phases. App attestation can start by logging which requests pass, then favour attested users, and only later refuse requests without it, timed for a quiet period after most users have updated.
- Change the product as well as the controls. Waitlists, fairer release windows and per-account limits can remove the advantage a script was after, and often do more for fairness than a technical control would.
- Fix the app and the API together. Many fixes need a change on both sides, such as a new header from the app that the API then checks, so plan them as one release.
How should you run a penetration test and a white-box review together?
Run them as separate layers with different jobs, rather than choosing between them. Automated scanning runs on every change. A penetration test from an accredited firm runs at least annually and after significant changes, because buyers and standards often expect it. A white-box review runs when the signals say it is needed:
- you see automated traffic you cannot explain, or customers complain that something sells out or fills up suspiciously fast;
- you are about to launch or release something in limited supply;
- you have changed sign-in, payments, rewards or any flow with limited availability;
- a penetration test has passed but the business still sees abuse.
Share findings in both directions. A recent penetration test report helps a white-box reviewer focus, and the threat models from a review help you scope the next penetration test.
What can you check yourself this week?
You can make a useful start without any outside help, using your own logs and your own team’s knowledge:
- List your sensitive business flows. Write down every flow where something is scarce or valuable: stock, slots, rewards, referrals, personal data. These are where abuse pays.
- Look at the first minutes of your last busy release. Check your telemetry for accounts, devices or IP ranges with request rates no person could reach.
- Ask how your rate limits are enforced. Find out whether they are shared across every instance of the API or held separately on each one, and what they are keyed on.
- Compare the app’s rules with the API’s. For each limit the app enforces, check that the API enforces it too.
- Read your last penetration test’s scope. Check whether business-logic abuse of those flows was in scope, and whether the tester had your code or telemetry.
If any of these turns up something you cannot explain, a white-box review is the next step to consider.
How do we approach this?
We do not carry out penetration testing, and we recommend every client commissions one from a CREST-accredited tester. Our mobile and API security review is the white-box layer on top. Senior engineers working with AI trace code paths, analyse telemetry logs and draft threat models, then test them against how your business works and recommend fixes sized to the real risk.
We validate mobile apps against the OWASP Mobile Application Security Verification Standard (MASVS), whether or not we built them, and we can make the fixes across the app and the API together. Reviews are fixed price, quoted after a short scoping call. If you have a recent penetration test report, it is a useful place to start the conversation.
Frequently asked questions
Should we stop paying for penetration tests if bots still get in?
Can we ask our penetration tester to cover business-logic abuse?
Is bot protection from our CDN or web application firewall enough?
Does a CAPTCHA solve the problem?
How often should a white-box security review happen?
Related guides
Your Customers Are Using AI Bots: Keeping Scarce Stock Fair
Customers now use AI-written scripts and agents such as Meta's Muse to grab tickets, drops and appointments. How to keep scarce stock fair without a ban.
Mobile App Attestation: App Attest and Play Integrity
How to use Apple App Attest and Google Play Integrity to protect a mobile API, which endpoints to cover, and how to roll it out without locking out users.
Mobile API Best Practices: Building Backends That Scale
How to design, secure, and operate APIs for mobile apps. Protocol choice, authentication flows, offline sync, push notifications, versioning, and Azure architecture patterns.