Skip to content
cloudgrip

$ cat hydra/api-security-testing.md

//offense · hydra

Find the API calls that hand over someone else's data.

AI agents call your API as different users and tenants, change IDs, tokens and fields, and report only the flaws they could exploit, with the request that proves it.

  • 5 min read
  • updated Nov 15, 2026

Hydra, Cloudgrip's offensive product, sends AI agents to call your API as different users and tenants. They change the IDs, tokens and fields in each request and report only the flaws they could exploit, with the request and response that prove it.

How it works

  1. Map the endpoints. Agents read your OpenAPI file or GraphQL schema if you have one, and explore the live service if you do not. With read access to your repo they also find routes the documentation leaves out.
  2. Call them as different users. Using your test logins, agents send the same request as each user. They swap record IDs, edit tokens and add fields the client never sends.
  3. Prove the flaw. A flaw counts only when the response shows it, for example user A receiving user B's invoice. Every exploit is replayed from a clean session, and findings that don't reproduce are dropped.
  4. Confirm the fix. Each finding comes with the exact request, the response and a fix, written as a pull request if you connect your repo. After the fix merges, Hydra attacks again to confirm it holds.

What gets tested

Most API flaws are about who is allowed to do what. A scanner can spot a malformed header. Finding out that one customer can read another customer's orders takes several requests and some reasoning.

  • Access to records: changing an ID in a request to read or edit a record that belongs to another user or tenant. This is known as broken object level authorization (BOLA).
  • Access to functions: admin and internal operations that answer to an ordinary account, or to no account at all.
  • Authentication and tokens: API keys, JSON Web Tokens (JWTs) and OAuth flows, tested for weak validation, missing expiry and endpoints that skip the check.
  • Too much data in, too much out: responses that return fields the caller should not see, and requests that can set fields such as a role or a price.
  • Injection and request forgery: SQL and command injection through parameters and bodies, and server-side request forgery (SSRF) through any field that accepts a URL. With a read-only cloud role, Hydra can follow an SSRF into your cloud IAM paths.
  • Webhooks: endpoints that accept forged or replayed webhook calls.
  • Logic and limits: steps called out of order, requests replayed, and rate or quota rules that can be sidestepped with ordinary calls.

API scanner, manual pentest, or Hydra

Topic API scanner Manual pentest Cloudgrip Hydra
Where the endpoint list comes from The spec or traffic file you give it The spec, plus what the tester discovers The spec, the live API, and your code if you give read access to a repo
Authorization flaws Hard to detect without knowing who owns each record Found, within the days that were booked Tested by replaying requests across users and tenants
Proof Alerts that your team has to verify Findings confirmed by the tester Each finding exploited and replayed from a clean session, with request and response
How often On every build or on a schedule Usually once or twice a year On every release
New endpoints Covered once the spec is updated Wait for the next engagement Mapped again on the next release

An API scanner is a fast check for known issues and fits well in a build pipeline. A human tester remains the right choice for unusual protocols and for frameworks that require one.

What is API security testing?

An API (application programming interface) is how software talks to other software. Your web front end, your mobile app and your customers' integrations all use one. API security testing means sending requests to that API the way an attacker would, to see whether it gives away data or performs actions it should refuse.

The most common API weakness is a missing check, not an exotic bug. The API confirms that you are logged in, but not that the record you asked for is yours. The OWASP API Security Top 10, a widely used list of API risks, puts this problem first.

FAQ

Which kinds of API can you test?

REST, GraphQL, gRPC and webhooks, with or without authentication. Public APIs, the private APIs behind your web and mobile apps, and partner APIs can all be put in scope.

We do not have an OpenAPI spec. Is that a problem?

No. Agents can build the endpoint list from the live service. A spec, a GraphQL schema or read access to the repo helps them find endpoints that are hard to discover from outside.

How many test logins should we provide?

Two is enough to start, ideally in two separate tenants. Authorization flaws show up when one account asks for another account's data, so a single account limits what can be proven. If your API has several roles, a login for each role lets the agents test what each one is allowed to do.

Is it safe to point this at a production API?

Staging is the default, and production is opt-in. Agents work through the test logins you provide, confirm a flaw, then stop. They stay within the rate limits you set, every request is logged and tagged, and a kill switch halts every agent.

Does it cover the OWASP API Security Top 10?

Yes. Agents test for the risks on that list, including broken authorization, broken authentication and server-side request forgery. They also look for logic flaws specific to your API, which a general list cannot describe.

What happens after a flaw is fixed?

Hydra attacks again after the fix merges to confirm it holds. The same attack path also becomes a detection that Cerberus, Cloudgrip's defense product, watches for in the telemetry you already collect.

See what an attacker would find.

Give us a URL and two test logins. If there’s something to find, your first exploited findings land within 24 hours.

You talk to the people who build Hydra and Cerberus. No sales script.

or write to founders@cloudgrip.ai