API Contract Review

Inventory an OpenAPI or Swagger contract and safely probe bounded read-only endpoints for authentication, error handling, and exposure signals. Use when an API specification is available for an authorized service.

0xcryptj Updated
AgentSec — audit, reason, remediate, verify

File contents

API Contract Review

When to Use

Use this capability when a team has an OpenAPI or Swagger document and needs a safe inventory of endpoints plus limited evidence about authentication and server-side error handling.

Prerequisites

  • An OpenAPI or Swagger JSON/YAML export.
  • Authorization for the optional base URL probe.
  • Test credentials only when the engagement explicitly requires authenticated validation.

Workflow

  1. Run ./agentsec api ./openapi.json to inventory the contract.
  2. If authorized, add --base-url https://staging.example for bounded read-only probes.
  3. Review operations missing security declarations, server errors, and sensitive paths.
  4. Confirm object-level authorization in source or an approved test plan; a contract cannot prove it.

Verification

Verify the report includes every declared operation, the request cap, authorization state, and separate review-needed observations for behavior that cannot be proven from the contract.

0xcryptj/AgentSec commit 6b5e70a074

Frequently asked questions

npx get-skill add 0xcryptj/api-contract-review