Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

laravel-owasp-security

БесплатноБез исполняемых скриптовНе проверен

OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP…

AsyrafHussinот AsyrafHussin★ 112 звёзд на GitHub

Об этом скилле

Laravel OWASP Security

Dual-purpose security skill for Laravel 13 + React/Inertia.js applications. Run an OWASP Top 10:2025 audit against a codebase, or use as a secure coding reference when building features.

Modes

  • Guidance (default): questions, writing secure code, reviewing one feature. Use the relevant rule files; do not produce a full audit report.
  • Audit: only when asked to audit, pen-test or security-review the codebase (or a named part of it). Follow the steps below and report with verdicts, not PASS/FAIL.

How to Audit

Step 1: Detect Stack

Check if the project uses React + Inertia.js by looking for:

  • app/Http/Middleware/HandleInertiaRequests.php exists
  • resources/js/ contains .tsx or .jsx files
  • inertiajs/inertia-laravel in composer.json
  • @inertiajs/react in package.json

If detected, state at the top of the report:

"React + Inertia.js detected — Laravel OWASP checklist AND React/Inertia security checks will both be applied."

If not detected, state:

"No React/Inertia.js detected — applying Laravel OWASP checklist only."

If only the server side is present (inertiajs/inertia-laravel and HandleInertiaRequests, but no React files), state that, apply the server-side Inertia checks (R2 props, R3 CSRF server part), and list R1, R5 and the client part of R3 under Coverage as not reviewed.

Step 2: Determine Scope

  • If arguments provided ($ARGUMENTS): review only those files or features
  • If no arguments: review the entire codebase

Step 3: Map the Trust Boundaries

Before hunting, list what an attacker can reach and who they can be:

  • Routes and their middleware: php artisan route:list --json (guest, auth, roles, signed, throttle), including vendor and dev-package routes. A route that exists only with APP_ENV=local or dev dependencies installed is Needs validation (check production APP_ENV and composer install --no-dev)
  • Guards and actors: guests, customers, staff, admins, API tokens, other tenants
  • Authorization points: policies, gates, Form Request authorize(), global scopes, scopeBindings()
  • Inputs beyond forms: webhooks, uploads, imports, queued payloads, Inertia partial reloads
  • Data leaving the server: Inertia shared props and page props, API Resources, exports
  • Controls outside the repository (production .env, web server, proxy/CDN): see audit-outside-repo-controls

Step 4: Hunt With the Checklist

Use the OWASP checklist below as a map of where to look. A failed checklist item is a lead, not a finding. Follow each lead to a concrete path an actor can use.

Step 5: Gate, Prove, Disprove

  • Pass every candidate through audit-candidate-gate: actor, input, control, boundary, result
  • Prove it with a Pest feature test on the test database (audit-prove-with-tests). Never test against production, staging data or real accounts
  • Try to disprove it (global scopes, middleware in bootstrap/app.php, policies registered elsewhere). When another agent is available, give it each Confirmed candidate with its file paths and proof test and ask it to break the claim; keep only what survives. This step is recommended, not required; say in the report whether it was done
  • Never reproduce secrets, API keys, tokens or .env values from the code in the report

Step 6: Report With Verdicts

Classify each item with audit-verdicts-severity: Confirmed (with severity), Needs validation (missing fact and how to check it, no severity), Hardening (no severity). List checklist areas that were reviewed with nothing found as coverage, not as findings.


OWASP Top 10:2025 Checklist

Numbering follows the OWASP Top 10:2025. Changes from 2021: SSRF (CWE-918) is rolled into A01, where CSRF (CWE-352) and open redirect (CWE-601) are also mapped; Security Misconfiguration moves up to A02; Vulnerable & Outdated Components grew into A03 Software Supply Chain Failures; A10 is the new Mishandling of Exceptional Conditions.

1. Broken Access Control (A01:2025)

Authorization:

  • Middleware protects all route groups by role (auth, role:admin, etc.)
  • Resource queries scoped to authenticated user — ->where('user_id', auth()->id())
  • No direct object reference without ownership check
  • Gates and Policies used to authorize resource access
  • Frontend role checks are mirrored server-side — never rely on React UI checks alone

CSRF (CWE-352):

  • CSRF middleware (PreventRequestForgery in Laravel 13; VerifyCsrfToken / ValidateCsrfToken are aliases of it) active in the web group
  • Only stateless routes (webhooks, external callbacks) are excluded from CSRF
  • @csrf directive used in all non-Inertia POST forms
  • Excluded routes in validateCsrfTokens(except: [...]) are justified

SSRF (CWE-918):

  • No Http::get($request->input('url')) with unvalidated URLs
  • User-supplied URLs validated against an
Полный SKILL.md на GitHub

Установить laravel-owasp-security в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdREADME.mdmetadata.jsonrules/_sections.mdrules/_template.mdrules/audit-candidate-gate.mdrules/audit-outside-repo-controls.mdrules/audit-prove-with-tests.mdrules/audit-verdicts-severity.mdrules/sec-authentication-rate-limiting.mdrules/sec-broken-access-control.mdrules/sec-cryptographic-failures.mdrules/sec-csrf-protection.mdrules/sec-inertia-data-exposure.mdrules/sec-injection-prevention.mdrules/sec-security-misconfiguration.mdrules/sec-xss-react-inertia.md

FAQ

Что делает скилл laravel-owasp-security?

OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codebase.

Как установить скилл laravel-owasp-security?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл laravel-owasp-security запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить laravel-owasp-security с