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.

The short answer: An API security audit checks whether the controls protecting your APIs are designed well and working. Auditors review your API inventory, authentication, authorization, input validation, rate limiting, encryption, key management, logging, change management and third-party APIs. Then they ask for evidence, such as settings, logs, test results and tickets. The OWASP API Security Top 10 is the usual guide to the risks.

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:

1

Scope
First, agree on which APIs, environments and frameworks are in scope.
2

Walkthroughs
Next, the auditor meets your engineers to learn how requests flow.
3

Document review
Then the auditor reads policies, standards, architecture diagrams and the API inventory.
4

Testing
After that, the auditor inspects settings and samples changes, keys, users and alerts.
5

Findings
Next, each gap is rated by risk, with a recommended fix.
6

Report
Finally, results go into your SOC 2 report, HIPAA assessment or other deliverable.

Common API Security Audit Findings

However, the same issues come up again and again:

1No complete inventory

The mistake: Old versions and test APIs are still live and unmonitored.

✓ How to avoid it: Keep a catalog tied to your gateway and retire unused endpoints.

2Access checks in the wrong place

The mistake: The app hides data in the interface, but the API returns it anyway.

✓ How to avoid it: Enforce authorization on the server for every request.

3Long-lived keys

The mistake: API keys never expire and sit in code or shared files.

✓ How to avoid it: Use a secrets manager, short-lived tokens and scheduled rotation.

4Logs no one reviews

The mistake: API calls are logged, but no alerts or reviews exist.

✓ How to avoid it: Set alerts for unusual patterns and record each review.

5Unchecked third-party data

The mistake: Data from partner APIs is trusted without validation.

✓ How to avoid it: Validate outside data and include those APIs in vendor reviews.

How to Prepare for an API Security Audit

Ideally, start a few months ahead and work through these steps:

1

Build the inventory
First, list every API, version and owner, and remove what you don’t need.
2

Check against OWASP
Next, review each API against the Top 10 and log the gaps.
3

Test it
Then run security tests and a penetration test, and fix high-risk issues.
4

Tighten keys and logs
After that, rotate old keys, move secrets to a vault and turn on alerts.
5

Gather evidence
Next, collect dated settings, tickets and reports for each area.
6

Brief the team
Finally, prepare engineers to walk auditors through the design.

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

It’s a review of whether the controls protecting your APIs are well designed and working. It covers access, authentication, encryption, logging, change management and third-party APIs.
No. Instead, a penetration test tries to break the API at one point in time. An audit checks whether your controls work over a period, and it often uses pen test results as evidence.
Yes, indirectly. In fact, API controls fall under the common criteria for access, operations, change management and vendors.
In short, it’s a list of the ten most critical API security risks, published by OWASP. The current edition is from 2023.
Typically, most companies review API controls during their yearly SOC 2 or HIPAA assessment, with testing after major changes.
In our experience, missing or incomplete API inventories. After all, you can’t protect APIs you don’t know about.

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.

Please reach out if you would like to learn more about how Audit Peak can assist you with SOC 2 or for a free consultation. WE WILL TAKE YOU TO THE PEAK.