agentleFS
ViviBeriViviBeri/webcraft-pro/skills/api-security/SKILL.md

api-security

Skill11 starsChanged 9 days agoMITView on GitHub

Use when designing, implementing, reviewing or testing REST, GraphQL, webhook and service APIs for authentication, authorization, abuse resistance and safe data exposure.

35 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use js-reverse, mobile-reverse and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • DorianGalloSkill

    js-reverse

    Also in 8 projects that use this

  • DorianGalloSkill

    mobile-reverse

    Also in 8 projects that use this

  • zhaoxuya520Skill

    browser-extension-reverse

    Use for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic recovery.

    Also in 4 projects that use this

  • zhaoxuya520Skill

    cloud-k8s

    Use for authorized cloud, container, and Kubernetes security assessment including metadata SSRF, IAM misconfig, container escape paths, and cluster RBAC review.

    Also in 4 projects that use this

  • +3 more from DorianGallo
  • +5 more from zhaoxuya520

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the OWASP API Security Top 10 (2023) as a threat checklist:

    line 14
  2. Distinctive:

    Use the current official project material when updating the threat baseline.

    line 26
  3. Distinctive:

    Test webhook signature failure, stale timestamps and duplicate delivery.

    line 52
  4. Distinctive:

    Verify errors and logs do not disclose credentials or sensitive records.

    line 53
  5. Distinctive:

    Every endpoint has documented access rules, resource limits and schemas.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Security Engineering

Objective

Protect API data and business operations against unauthorized access, abuse, unsafe integration behavior and operational exhaustion.

Threat baseline

Use the OWASP API Security Top 10 (2023) as a threat checklist:

  • Broken Object Level Authorization.
  • Broken Authentication.
  • Broken Object Property Level Authorization.
  • Unrestricted Resource Consumption.
  • Broken Function Level Authorization.
  • Unrestricted Access to Sensitive Business Flows.
  • Server Side Request Forgery.
  • Security Misconfiguration.
  • Improper Inventory Management.
  • Unsafe Consumption of APIs.

Use the current official project material when updating the threat baseline.

Design workflow

  1. Inventory API versions, routes, methods, schemas, data classifications, consumers and external dependencies.
  2. Define authentication and authorization for each operation. Verify object, function and property-level access.
  3. Validate request and response schemas, content types, lengths and allowed fields.
  4. Apply rate limits and quotas by principal, client, route and business action. Add concurrency and payload limits.
  5. Protect sensitive business flows with server-side state transitions, anti-automation controls and risk-based limits.
  6. Restrict CORS to required origins and methods. CORS is not authentication or authorization.
  7. Enforce TLS, secure headers and safe error responses. Do not expose stack traces, internal IDs or secrets.
  8. Validate webhook signatures, timestamps and replay protection. Make handlers idempotent where retries are possible.
  9. Constrain outbound requests to third-party APIs and apply timeouts, response-size limits and schema validation.
  10. Maintain an API inventory, deprecation policy and monitoring for unexpected usage.

GraphQL-specific checks

Limit query depth, complexity, aliases, batch size and execution time. Authorize fields and resolvers at the data boundary. Prevent introspection exposure where policy requires it, but do not treat disabling introspection as a substitute for access control.

API test cases

  • Substitute object IDs across users and tenants.
  • Request privileged methods and routes with low-privilege identities.
  • Submit unexpected writable fields and over-posted properties.
  • Send expired, malformed, replayed and incorrectly scoped credentials.
  • Exercise rate limits, pagination, large bodies, expensive queries and concurrent requests.
  • Test webhook signature failure, stale timestamps and duplicate delivery.
  • Verify errors and logs do not disclose credentials or sensitive records.

Common AI failure mode

Failure: The agent checks that a caller is authenticated, then fetches a record by the caller-supplied object ID without enforcing that the caller is authorized for that specific object and tenant.

Why it matters: An authenticated user can substitute another user's or tenant's identifier and read or modify records outside their authority. This creates a direct confidentiality and integrity breach even though login and endpoint-level authentication appear to work.

Prevention: Enforce object authorization at the data-access boundary on every request. Scope the lookup by both the requested object identifier and the authenticated principal's tenant or ownership context; do not fetch globally and rely on the client to filter. Add negative tests that substitute another user's and another tenant's IDs for every read and mutation path, and verify that unauthorized requests disclose no record data and perform no mutation.

Completion criteria

Every endpoint has documented access rules, resource limits and schemas; API inventory and versioning are current; and negative tests cover OWASP API risk categories relevant to the product.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.