owasp-api-security-top-10

OWASP API Security Top 10 - prevention, detection, and remediation for REST/GraphQL/API security. Use when designing or reviewing APIs - object- and function-level authorization, authentication, rate limiting and resource consumption, sensitive business flows, SSRF, API inventory and versioning, or consumption of third-party APIs.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "owasp-api-security-top-10" with this command: npx skills add yariv1025/skills/yariv1025-skills-owasp-api-security-top-10

OWASP API Security Top 10

This skill encodes the OWASP API Security Top 10 for secure API design, code review, and vulnerability prevention. References are loaded per risk (progressive disclosure).

Based on OWASP API Security Top 10:2023.

When to Read Which Reference

RiskRead
API1 Broken Object Level Authorizationreferences/api1-broken-object-level-authorization.md
API2 Broken Authenticationreferences/api2-broken-authentication.md
API3 Broken Object Property Level Authorizationreferences/api3-broken-object-property-authorization.md
API4 Unrestricted Resource Consumptionreferences/api4-unrestricted-resource-consumption.md
API5 Broken Function Level Authorizationreferences/api5-broken-function-level-authorization.md
API6 Unrestricted Access to Sensitive Business Flowsreferences/api6-sensitive-business-flows.md
API7 Server Side Request Forgery (SSRF)references/api7-ssrf.md
API8 Security Misconfigurationreferences/api8-security-misconfiguration.md
API9 Improper Inventory Managementreferences/api9-improper-inventory-management.md
API10 Unsafe Consumption of APIsreferences/api10-unsafe-consumption-of-apis.md

Quick Patterns

  • Enforce object-level and function-level authorization on every API request; never trust client-supplied IDs without server-side checks.
  • Validate and sanitize all inputs; treat third-party API responses as untrusted.
  • Apply rate limiting, quotas, and cost controls to prevent abuse and DoS.
  • Maintain an API inventory; retire or protect deprecated and debug endpoints.

Quick Reference / Examples

TaskApproach
Object-level auth (IDOR)Verify user owns/can access the resource by ID server-side. See API1.
Function-level authCheck user role before admin/sensitive operations. See API5.
Rate limitingApply per-user/IP limits, quotas, and timeouts. See API4.
SSRF preventionValidate/allowlist URLs; block internal ranges. See API7.
Third-party APIsValidate responses, use TLS, set timeouts. See API10.

Safe - object-level authorization check:

@app.get("/api/orders/{order_id}")
def get_order(order_id: int, current_user: User):
    order = Order.query.get(order_id)
    if order.user_id != current_user.id:
        raise HTTPException(403, "Access denied")
    return order

Unsafe - missing authorization (IDOR vulnerability):

@app.get("/api/orders/{order_id}")
def get_order(order_id: int):
    return Order.query.get(order_id)  # Any user can access any order!

Rate limiting example (FastAPI):

from slowapi import Limiter
limiter = Limiter(key_func=get_remote_address)

@app.get("/api/search")
@limiter.limit("10/minute")
def search(query: str):
    return perform_search(query)

Workflow

  1. Object-level authorization (IDOR) → Read references/api1-broken-object-level-authorization.md.
  2. Authentication and tokens → Read references/api2-broken-authentication.md.
  3. Rate limiting / DoS → Read references/api4-unrestricted-resource-consumption.md.
  4. Admin vs user endpoints → Read references/api5-broken-function-level-authorization.md.
  5. User-supplied URLs in API → Read references/api7-ssrf.md.
  6. Third-party API consumption → Read references/api10-unsafe-consumption-of-apis.md.

Load reference files only when relevant to the task.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

agent-dev-guardrails

No summary provided by upstream source.

Repository SourceNeeds Review
General

owasp-mobile-top-10

No summary provided by upstream source.

Repository SourceNeeds Review
General

owasp-iot-top-10

No summary provided by upstream source.

Repository SourceNeeds Review
General

owasp-privacy-top-10

No summary provided by upstream source.

Repository SourceNeeds Review