function-level-enforcement-review
/function-level-enforcement-review
Sprawdza, czy każda operacja zna dozwolone klasy wywołujących i czy kontrola działa przed logiką biznesową i odczytem danych.
- Autor
- Wsh7Ash ↗
- Repozytorium
- authzmap ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 28.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 28.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Sprawdza, czy każda operacja zna dozwolone klasy wywołujących i czy kontrola działa przed logiką biznesową i odczytem danych.
Oryginalny opis (EN)
Verify each operation knows which caller classes may invoke it, and that the check runs before any business logic or data read. Use when you have classified endpoints into public, authenticated and restricted layers and need proof the layer actually gates execution
Jak działa
- Procedure
- Signals
- Patterns
- Pitfalls
- Done when
- References
Podgląd SKILL.md
---
name: function-level-enforcement-review
description: "Verify each operation knows which caller classes may invoke it, and that the check runs before any business logic or data read. Use when you have classified endpoints into public, authenticated and restricted layers and need proof the layer actually gates execution"
pack: authzmap
version: 1.0.0
category: api-security
tags: [function-level, bfla, enforcement]
---
# Function-Level Enforcement Review
> Verify each operation knows which caller classes may invoke it, and that the check runs before any business logic or data read
**Use when:** you have classified endpoints into public, authenticated and restricted layers and need proof the layer actually gates execution
**Avoid when:** the endpoint inventory is still missing, since you cannot distinguish intentional from lost authorization without it
## Procedure
1. Pick one operation from each auth layer in your inventory and identify the exact check that should gate it.
2. Call each operation with the lowest-privileged credential you hold and record status, body and side effects.
3. Compare the observed outcome against the permission matrix cell written during the mapping phase.
4. For any mismatch, determine the layer that failed: gateway rule, framework middleware or handler branch.
5. Repeat for write operations separately, because a refused read can hide an accepted write on the same route.
6. Record each verdict in the matrix so the final report distinguishes enforced, missing and inconsistent checks.
## Signals
- A restricted operation returns 200 with data for a low-privileged role, meaning the gate is absent entirely.
- The gate exists but runs after expensive logic, visible as timing or cost differences rather than data leakage.
- The same permission is enforced in one method and skipped in another on the same resource, indicating per-method checks.
- An operation relies on the client sending a role indicator, so roles are asserted rather than verified.
## Patterns
**1. Gate probe**
```text
GET /api/admin/stats as member -> 200 with figures
expected 403 -> function-level gate missing
```
**2. Write probe**
```text
DELETE /api/orders/{own} as peer -> 200
read refused but write accepted -> check is read-only
```
**3. Result row**
```text
op=/api/admin/stats layer=admin member-call=403 enforced=yes side-effect=none
```
## Pitfalls
- Treating an empty response body as a refusal, since 200 with no data still proves the operation ran.
- Testing only the layer you documented as authoritative while a parallel route skips the gate.
- Forgetting background or scheduled paths that invoke the same logic with a synthetic service identity.
## Done when
- Every sampled operation has an observed outcome recorded against its matrix cell for read and write methods.
- Mismatches are attributed to a specific failing layer, each with the request that exposed it.
## References
- [OWASP API Security Top 10 - BFLA](https://owasp.org/www-project-api-security/)
- [OWASP - access control cheat sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Testing.html)
Wersje
W bazie nie ma innych skilli o nazwie function-level-enforcement-review.
Migawka bazy z 13.11.2026 · wersja paczki 27473c311fad (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
Brak podobnych skilli w bazie.