Przejdź do treści
Biblioteka skilli
Bezpieczeństwo · Budowanie i kod

api-security

/api-security

Zabezpiecza API przez autoryzację na poziomie obiektu, limity na wywołującego i walidację danych wejściowych schematem w każdym endpoincie.

Repozytorium
AI-SKILLS ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Zabezpiecza API przez autoryzację na poziomie obiektu, limity na wywołującego i walidację danych wejściowych schematem w każdym endpoincie.

Oryginalny opis (EN)

Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations.

Jak działa

  1. Method
  2. Checks
  3. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 49 linii, 410 słów
Podgląd SKILL.md
---
name: api-security
description: Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations.
---

# API security

Every endpoint makes a silent promise about who may touch which object and in
what shape. The flaws that dominate the OWASP API Top 10 are dull, not clever:
a handler that trusts the ID in the path, a parser that swallows fields it was
never told about, an endpoint with no ceiling that one client drains. Each one
ships green through functional tests and breaks on the first deliberate probe.

## Method

1. **Authorize the object, not only the route.** Once the caller is
   authenticated, verify this caller may access this exact record before you
   return it. `GET /invoices/5567` must confirm invoice 5567 belongs to the
   token's tenant. Broken object-level authorization (BOLA) is the most
   exploited API flaw, and route middleware never sees the record ID.
2. **Validate the body against a closed schema.** Model every request with
   Zod, Pydantic, or JSON Schema that pins types, formats, bounds, and
   `additionalProperties: false`. Reject unknown keys outright so a client
   cannot slip `is_admin: true` into a profile update that mass-assigns.
3. **Serialize through an output allowlist.** Build responses from an explicit
   field list, never the raw ORM row. Dumping the whole record leaks
   `password_hash`, internal flags, and columns from joined tables.
4. **Meter every caller and weight expensive calls.** Give each token a rate
   bucket, charge search and export more than a point read, and cap page size
   and GraphQL query depth so one call cannot pull 50,000 rows or nest
   resolvers without limit.
5. **Issue machine clients scoped, expiring credentials.** Grant API keys or
   OAuth client-credentials the narrowest scopes the integration uses, set an
   expiry, and support rotation with overlap. One omnipotent static key is a
   single leak away from full compromise.
6. **Return errors that say nothing extra.** Send 401 versus 403 correctly but
   keep bodies generic: no stack traces, no SQL fragments, no "wrong password"
   message that confirms an account exists.

## Checks

- Does requesting another tenant's object ID return 403 rather than the data?
- Does a body with one unexpected field get rejected, not silently accepted?
- Does a scripted loop actually hit a per-caller quota and get throttled?
- Do 500 responses omit stack traces and internal identifiers?

## Boundaries

This covers authorization, input, and quota at the application layer. It does
not replace transport security (see tls-configuration), a gateway's network
controls, or the identity provider that mints tokens. Framework defaults rarely
enforce object-level checks: assume you write those by hand.

Wersje

RepozytoriumWynikLicencja
Ta strona · Amey-Thakur/AI-SKILLS90MIT
coco-research/coco100MIT
jefflester/claude-skills-supercharged100MIT
claude-dev-suite/claude-dev-suite100MIT
andreibesleaga/gabbe90CC-BY-4.0

Migawka bazy z 13.11.2026 · wersja paczki 54aa00947804 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95memstack-security-api-audit
    Sprawdza, czy trasy API mają uwierzytelnianie, autoryzację i walidację danych wejściowych.
  • 100api-audit
    Sprawdza API REST, GraphQL i RPC pod kątem OWASP API Security Top 10 2023: uwierzytelnianie, autoryzację, limity i ekspozycję danych.
  • 90graphql-security
    Zabezpiecza wdrożenia API GraphQL przed wyciekiem danych przez introspekcję, zbyt głębokimi zapytaniami i brakiem autoryzacji.
  • 100secure-api-design
    Projektuje bezpieczne API REST, GraphQL i RPC: uwierzytelnianie, autoryzację i zasady dostępu do zasobów.
  • 95api-review
    Sprawdza endpointy API przed wdrożeniem pod kątem uwierzytelniania, autoryzacji i walidacji danych wejściowych.
  • 100golang-security
    Zabezpiecza usługi backendowe w Go: walidację danych wejściowych, kryptografię i zapobieganie SQL injection.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.