An API security check that stops at “the token was valid” has not checked whether the token could access this object, whether a batch endpoint bypasses the same rule, or whether a failure disclosed too much.

Why this Skill is needed

The API Security Testing Skill reviews the boundary between caller identity, requested object, input, response, and operational controls. It prepares bounded AST-## scenarios and keeps unauthorized or destructive actions outside the workflow until they are explicitly approved.

What the Skill does

Use this Skill when a team needs to review authentication, authorization, object scope, input exposure, secrets, rate limits, error leakage, or audit evidence for an API.

A thorough review follows one object across the full request: who owns it, who may act on it, which alternate entry points exist, what a failure reveals, and which audit record proves the decision. A 403, an OpenAPI document, or a valid token alone is not comprehensive security evidence.

What it does not do

It does not replace:

  • Penetration testing, red-team action, vulnerability scanning, or an authorized exploit.
  • An unauthorized call to a real API or a production probe.
  • Security requirement review, threat modeling, or permission design.
  • Risk acceptance, exception approval, or release-security judgment.
  • Complete runtime security assurance outside the supplied request boundary.

What it checks

FocusQuestionHandoff output
Attack surfaceWhich path, query, body, header, upload, batch, or alternate endpoint accepts input?Inventory and boundary
Input boundaryWhat malformed, oversized, encoded, repeated, or unexpected input must be handled?Safe scenario and oracle
AuthenticationWho issued the token, and what do its subject, tenant, and lifecycle show?Identity and token evidence
AuthorizationCan this caller perform this action?Role and action policy
Object authorizationCan the caller access this specific object, including across tenant boundaries?Ownership matrix and allow/deny evidence
Error and responseWhat do status, body, timing, headers, URLs, and logs reveal on failure?Leakage check and evidence
Rate limits and abuseHow are repeated, bulk, unusually frequent, or resource-heavy requests handled?Bounded scenario and expected limit
AuditCan a security-relevant action be traced without exposing excess data?Audit event and evidence path
Security contractCan authentication, permission, data, error, rate, and audit rules trace to verification?AST finding and close condition

The matrix turns a security label into a request that can be authorized, executed, and reviewed.

Audit inputs before you start

StateMeaningHandling
knownDirectly supported by an API contract, policy, sample, or run recordPreserve source, version, and identity
missingNeeded for the scenario but not suppliedRecord the gap and stay in preparation
conflictingOpenAPI, permission matrix, and security requirement disagreePreserve all sources and request a decision
staleToken shape, endpoint, policy, or environment is oldMark freshness before using it
out_of_scopeProduction calls, real credentials, intrusive payloads, or destructive actionsExclude unless separately authorized
assumptionsSynthetic tenant, object, role, or isolated environment is assumedState the assumption and stop condition

Input templates and request examples are not execution evidence. A safe analysis can continue, but it must say what still needs an authorized run.

From problem to structured Finding

Connect the source, scope, evidence state, analysis, owner, action, close condition, and validation before writing the conclusion. The case below keeps this Skill’s identifier and domain context.

Keep the decision layers separate

LayerHow to write itExample
FactWhat the contract or request material directly showsThe endpoint accepts a token and job_id
Evidence-backed InferenceWhat the missing binding could allowAuthentication may be implemented without object authorization
RecommendationThe smallest safe next actionDefine tenant binding, error semantics, audit fields, and a synthetic validation
Human DecisionWhat requires authorization or risk choiceOwners approve environment, account scope, and leakage trade-off

Do not label a request sent, a 403 returned, or a template generated as a complete security pass.

A complete case

This case follows Input, Analysis, Finding, Decision, and Validation. When material is incomplete, keep missing, conflicting, or assumptions visible instead of turning them into a pass.

Input

MaterialWhat to provideWhat to do when it is missing
Security modelIdentity, role, tenant, resource ownership, and allowed operationsKeep policy ambiguity open
Attack surfacePath, query, body, headers, file names, batch behavior, and error responsesInclude malformed and overlong inputs
EvidenceAllow and deny logs, redaction, rate-limit events, and account matrixDo not infer protection from middleware names
Authorization boundaryIsolated environment, synthetic data, account scope, and stop conditionsDo not use production as a shortcut

Use a request like this:

Use the api-security-testing Skill.

Task: Review a document-download API shared by employees, contractors, and service accounts across tenants.
Inputs: [API contract, versions, permission matrix, redacted requests, logs, reports, or data paths]
Scope: [included and excluded objects]
Unknowns: [missing environment, accounts, data, or permissions]
Expected output: [AST-## findings, evidence status, safe validation, and next actions]

Audit the inputs first. Separate facts, assumptions, and open questions. Do not claim execution without an authorized run record.

Analysis

Use the input, matrix, and evidence state to form the judgment before writing the Finding; keep missing material as a gap.

Finding

Example finding: AST-02 exposes an object-authorization gap

Suppose the contract contains:

GET `/exports/{job_id}/download`
Authorization: Bearer <token>

The materials do not explain how job_id is bound to the caller’s tenant, whether a cross-tenant object returns 403 or 404, or whether the failure response reveals object existence. This is an illustrative preparation pattern, not an exploit result.

AST-02 — Download authorization and error leakage are underspecified
FieldExample
Object and ruleGET /exports/{job_id}/download and tenant-owned export access
SourceAPI Contract v3.2; token description supplied, object matrix and error contract missing
TriggerTenant A requests Tenant B’s job_id, a nonexistent job_id, and an expired job_id
Expected concernAuthentication success must not bypass object authorization; failure should not overexpose existence or sensitive fields
Evidence statemissing
Impact and priorityAPI, gateway, audit, and client may implement different failure semantics; the example provides no impact assessment or priority rubric, so priority remains unassigned
Owner and decisionAPI, security, and tenant-authorization owners choose enforcement point and 403, 404, or uniform-error strategy
Close conditionAuthorization, error, audit, and sensitive-data rules are explicit in the contract
ValidationIn an authorized isolated environment use synthetic tenants and files; retain raw responses, audit records, version, time, and stop conditions

This finding does not claim a vulnerability exists. It says the current evidence cannot yet support a reviewable object-authorization test.

Decision

The accountable owner confirms the decision question and risk trade-off; the Skill does not make that choice.

Validation

Before closing the finding, run the stated validation and retain the raw artifact. Without an execution record, the status remains unverified.

How a Finding enters the next stage

Handoff output

At minimum, hand off the source, evidence state, owner, close condition, and validation action; the route still needs an accountable owner.

Next-stage route

  1. Audit the API contract, permission matrix, and redacted request or response.
  2. Produce AST-## scenarios with preconditions, stimulus, expected result, evidence, and stop conditions.
  3. Have the accountable owner confirm environment, accounts, data, and authorization.
  4. Run in an isolated environment with minimum privilege and synthetic data.
  5. Record response, audit log, version, time, and residual risk separately from the preparation.

The Skill prepares step 4. It does not perform step 4 by implication.

How to prepare better input

Provide the API contract and version, endpoint scope, role and tenant matrix, object ownership, input fields, data classification, rate policy, audit fields, redacted samples, history, authorized environment, synthetic data, account scope, and stop conditions.

A useful handoff keeps target, object, in/out scope, evidence states, AST finding, owner, close condition, expected result, and validation method together.

Working with other Skills

Common traps

  1. Treating a valid token as proof that the caller can access this object.
  2. Testing the UI while ignoring direct, batch, background, and download entry points.
  3. Treating 403 as proof that every object is safe, without checking 404 and error leakage.
  4. Listing attack names without trigger, expected result, evidence, and stop conditions.
  5. Using real credentials or production APIs to fill a missing material gap.

Install and invoke

npx skills add naodeng/awesome-qa-skills --skill api-security-testing

Installation and troubleshooting:

Use the api-security-testing Skill.
Include objective, endpoint scope, versions, evidence paths, constraints, and authorization boundary.
Audit inputs first. Return AST-## findings with trigger, expected result, evidence state, owner, stop condition, and safe validation method.

FAQ

Does a 403 prove that the resource is protected?

No. Confirm the identity, object ownership, version, alternate entry points, response body, timing, and audit record.

Can the Skill perform an attack?

No. It provides evidence-bounded analysis and validation preparation. Intrusive actions require explicit authorization, safe data, and a controlled environment.

References

The Skill does not log in with real credentials, read secrets, call production APIs, or perform destructive probing. Static contracts, request templates, and dry runs remain planning or material evidence; they do not prove an attack occurred, a vulnerability is absent, or a release was approved.

Share