Today, modern apps run on APIs. For instance, your mobile app, customer portal, partner integrations and internal services all trade data through them.
As a result, auditors now look at APIs closely. After all, a single weak endpoint can expose more data than a breached laptop ever could.
This guide explains what an API security audit covers from an auditor’s point of view. It also shows which controls get tested and how they map to SOC 2, HIPAA and NIST. Finally, it lists the evidence to have ready.
What Is an API Security Audit?
The term covers two kinds of work. First, there’s technical testing, where security testers try to break the API with tools and crafted requests. Second, there’s a controls audit, where an auditor checks whether your program prevents and catches those problems over time.
Specifically, this guide focuses on the second kind. That’s what you’ll face in a SOC 2 examination, a HIPAA assessment or a NIST 800-53 assessment.
Still, the two work together. In fact, auditors often review the results of your API penetration tests and scans as evidence. However, a clean test on one day doesn’t prove your controls work all year.
Why APIs Get Extra Attention in Audits
Above all, APIs are built to hand out data, so a small mistake can have a large impact. For example, say an API doesn’t check whether a user owns a record. Then anyone can change an ID in the request and pull someone else’s data.
APIs are also easy to lose track of. In particular, old versions, test endpoints and partner integrations often keep running long after anyone remembers them.
Finally, firewalls and scanners don’t catch many API flaws. That’s because most of the top risks are logic and authorization problems, which only good design, testing and review can prevent.
The OWASP API Security Top 10
Generally, most auditors and testers use the OWASP API Security Top 10 (2023) as the risk list. Here’s each risk and the question an auditor will ask about it:
| Risk | What auditors ask |
|---|---|
| API1: Broken object level authorization | First, does every request check that the user may access that specific record? |
| API2: Broken authentication | Next, how are callers identified, and how are tokens issued and protected? |
| API3: Broken object property level authorization | Also, can users see or change fields they shouldn’t? |
| API4: Unrestricted resource consumption | Then, are there rate limits, size limits and quotas? |
| API5: Broken function level authorization | In addition, are admin functions blocked for regular users? |
| API6: Unrestricted access to sensitive business flows | Similarly, can bots abuse flows like sign-ups, checkouts or bookings? |
| API7: Server side request forgery | Also, can the API be tricked into calling internal systems? |
| API8: Security misconfiguration | Next, are headers, error messages and settings hardened? |
| API9: Improper inventory management | Then, do you know every API, version and environment you run? |
| API10: Unsafe consumption of APIs | Finally, do you validate data from third-party APIs before trusting it? |
OWASP’s API Security Project publishes details on each risk.
How API Security Maps to SOC 2, HIPAA and NIST
Notably, no major framework has a separate API chapter. Instead, API controls fall under rules you already know. For example:
| Control area | SOC 2 | HIPAA Security Rule | NIST SP 800-53 |
|---|---|---|---|
| Access and authorization | CC6.1, CC6.3 | 164.312(a)(1) | AC-3, AC-6 |
| Authentication | CC6.1 | 164.312(d) | IA-2, IA-9 |
| Encryption in transit | CC6.7 | 164.312(e)(1) | SC-8 |
| Logging and monitoring | CC7.2 | 164.312(b) | AU-2, AU-12 |
| Input validation and abuse | CC6.6, CC7.1 | 164.308(a)(1) | SI-10, SC-5 |
| Inventory and change | CC8.1 | 164.308(a)(1) | CM-8, SA-11 |
| Third-party APIs | CC9.2 | 164.308(b)(1) | SA-9, SR-6 |
For HIPAA, see our guides to the technical safeguards and HIPAA audit evidence. For federal systems, see our NIST 800-53 assessments.
What Auditors Test in an API Security Audit
In practice, most API reviews cover the same ten areas:
- Inventory: First, a current list of every API, version, environment and owner, including partner and internal APIs.
- Authentication: Next, strong methods such as OAuth 2.0 or mutual TLS, with short-lived tokens.
- Authorization: Also, checks on every request at the object, field and function level.
- Input validation: Then schema validation and safe handling of every input.
- Rate limiting: In addition, limits on requests, payload sizes and costly operations.
- Encryption: Next, TLS on every endpoint, with weak protocols turned off.
- Keys and secrets: Also, keys stored in a secrets manager, rotated and never hard-coded.
- Logging: Then logs of who called what, kept long enough and actually reviewed.
- Change and testing: In addition, code review and security testing before every release.
- Third-party APIs: Finally, review of the outside APIs you call and the data you accept from them.
Evidence to Have Ready
Above all, auditors want proof that controls worked across the whole period. Plan to produce:
| Area | Typical evidence |
|---|---|
| Inventory | First, the API catalog or gateway list, with owners and versions |
| Authentication | Next, identity provider and gateway settings, plus token lifetimes |
| Authorization | Also, design docs, test cases for access checks and pen test results |
| Rate limiting | Then gateway or WAF policies and alert examples |
| Keys and secrets | In addition, secrets manager settings and rotation records |
| Logging | Next, sample logs, retention settings and review tickets |
| Change | Also, pull requests with approvals and security scan results |
| Vulnerabilities | Finally, scan and pen test reports, with tickets showing fixes |
For more on scanning evidence, see vulnerability management for SOC 2.
How an API Security Audit Works
In general, a typical review follows these steps:
Common API Security Audit Findings
However, the same issues come up again and again:
How to Prepare for an API Security Audit
Ideally, start a few months ahead and work through these steps:
If you run on AWS, our guide to AWS SOC 2 compliance covers the cloud controls around your APIs.
How Audit Peak Helps
Specifically, Audit Peak is a licensed, minority-owned CPA firm based in New York City. Our team has hands-on AWS, Azure and GCP experience, along with CPA and CISA credentials. We review API controls as part of:
- SOC 2 audits: First, we test API controls within your SOC 2 examination.
- HIPAA assessments: Next, we review how your APIs protect ePHI in a HIPAA assessment.
- Readiness reviews: Also, we find API control gaps before your audit through a readiness assessment.
- Fixed quotes: Finally, you get a fixed fee and timeline before work starts.
Also, as your independent auditor, we don’t design or run your controls.
FAQs About the API Security Audit
In summary, an API security audit rewards teams that know every API they run. It also rewards teams that check access on every request and keep evidence as they go.
Preparing for an audit that includes your APIs? Contact Audit Peak for a free consultation.