[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78C7REN7GHQ41Y06PCADSJW":3,"skill-same:01M78C7REN7GHQ41Y06PCADSJW":99},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M78C7REN7GHQ41Y06PCADSJW","laravel-owasp-security",null,"OWASP Top 10 security audit and secure coding guidelines for Laravel + React\u002FInertia.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.","projectweb738-dev\u002FBANKDATA_JHON","projectweb738-dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F321402929?v=4","01M78BF0E5DXCH964FKTRKZDBT","01M78BF0F66D1WXYXVN7CN29DH",0,"MIT","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: laravel-owasp-security\ndescription: OWASP Top 10 security audit and secure coding guidelines for Laravel + React\u002FInertia.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.\nlicense: MIT\nmetadata:\n  author: AsyrafHussin\n  version: \"1.0.3\"\n  laravelVersion: \"13.x\"\n  phpVersion: \"8.3+\"\n---\n\n# Laravel OWASP Security\n\nDual-purpose security skill for Laravel 13 + React\u002FInertia.js applications. Run a full OWASP Top 10 audit against a codebase, or use as a secure coding reference when building features.\n\n## How to Audit\n\n### Step 1: Detect Stack\n\nCheck if the project uses React + Inertia.js by looking for:\n- `app\u002FHttp\u002FMiddleware\u002FHandleInertiaRequests.php` exists\n- `resources\u002Fjs\u002F` contains `.tsx` or `.jsx` files\n- `inertiajs\u002Finertia-laravel` in `composer.json`\n- `@inertiajs\u002Freact` in `package.json`\n\n**If detected**, state at the top of the report:\n> \"React + Inertia.js detected — Laravel OWASP checklist AND React\u002FInertia security checks will both be applied.\"\n\n**If not detected**, state:\n> \"No React\u002FInertia.js detected — applying Laravel OWASP checklist only.\"\n\n### Step 2: Determine Scope\n\n- If arguments provided (`$ARGUMENTS`): review only those files or features\n- If no arguments: review the entire codebase\n\n### Step 3: Run Checklist\n\nWork through every item below. For each, output:\n- **PASS** — brief confirmation of what was verified\n- **FAIL** — exact `file:line`, a description of the vulnerability (do NOT reproduce any code, values, API keys, tokens, or .env contents from the file), and a fix recommendation\n- **N\u002FA** — if the check does not apply to this project\n\n---\n\n## OWASP Top 10 Checklist\n\n### 1. Broken Access Control (A01:2021)\n\n- [ ] Middleware protects all route groups by role (`auth`, `role:admin`, etc.)\n- [ ] Resource queries scoped to authenticated user — `->where('user_id', auth()->id())`\n- [ ] No direct object reference without ownership check\n- [ ] Gates and Policies used to authorize resource access\n- [ ] Frontend role checks are mirrored server-side — never rely on React UI checks alone\n\n### 2. Cryptographic Failures (A02:2021)\n\n- [ ] Passwords hashed with `Hash::make()` or `'hashed'` Eloquent cast — never stored as plaintext\n- [ ] No MD5 or SHA1 used for password hashing\n- [ ] Sensitive fields (API keys, secrets) encrypted with `Crypt::encryptString()` or `'encrypted'` Eloquent cast\n- [ ] `APP_KEY` is long, random, and unique per environment\n- [ ] Signed URLs (`URL::signedRoute()`) used for sensitive one-time actions (password reset, email verify)\n\n### 3. Injection (A03:2021)\n\n**SQL & Mass Assignment:**\n- [ ] No string concatenation in `whereRaw()`, `selectRaw()`, `orderByRaw()` — use `?` bindings\n- [ ] Column names never derived from user input without a whitelist\n- [ ] No `$request->all()` passed directly to `create()`, `fill()`, or `update()`\n- [ ] No `forceFill()` or `forceCreate()` with unvalidated user input\n- [ ] Models define `$fillable` explicitly — not `$guarded = []`\n- [ ] Controllers use `$request->validated()` for mass operations\n\n**XSS — Blade & React:**\n- [ ] No `{!! $userInput !!}` in Blade templates with untrusted data\n- [ ] `{{ }}` used for all user-supplied Blade output\n- [ ] No `dangerouslySetInnerHTML` in React without `DOMPurify.sanitize()` first\n- [ ] `href` and `src` attributes not set from unvalidated user input\n- [ ] No `eval()`, `new Function()`, or `setTimeout(string)` with user-controlled strings\n- [ ] External CDN scripts use Subresource Integrity (`integrity=\"sha384-...\"`)\n\n### 4. Insecure Design (A04:2021)\n\n- [ ] Business logic enforced server-side — prices, totals, and discounts never trusted from client input\n- [ ] Sensitive operations require secondary confirmation (e.g. password re-entry for account deletion)\n- [ ] No mass action endpoints without per-item authorization check\n- [ ] Admin-only features isolated behind separate middleware — not just hidden in the UI\n- [ ] Payment amounts and enrollment states calculated server-side, not passed as form inputs\n\n### 5. Security Misconfiguration (A05:2021)\n\n- [ ] `APP_DEBUG=false` in production\n- [ ] `.env` is in `.gitignore` and never committed\n- [ ] Database uses a restricted user — not root\u002Fadmin — in production\n- [ ] `storage\u002F` and `bootstrap\u002Fcache\u002F` have correct permissions (not world-writable)\n- [ ] `APP_KEY` is set and unique per environment\n- [ ] CORS `allowed_origins` is not `['*']` for authenticated API routes\n\n### 6. Vulnerable & Outdated Components (A06:2021)\n\n- [ ] `composer audit` passes with no known CVEs\n- [ ] `npm audit` passes with no known CVEs\n- [ ] Laravel framework is on a supported version\n\n### 7. Identification & Authentication Failures (A07:2021)\n\n**Auth:**\n- [ ] Using Laravel Breeze, Fortify, or Jetstream — not custom-rolled auth\n- [ ] Passwords hashed with bcrypt or argon2 (Laravel default)\n- [ ] Login route rate limited — `throttle` middleware or `RateLimiter` in `LoginRequest`\n- [ ] Password reset and email verification routes rate limited\n- [ ] Payment and sensitive action routes have appropriate rate limits\n- [ ] `session()->regenerate()` called after successful login\n\n**Cookie & Session:**\n- [ ] `http_only = true` in `config\u002Fsession.php`\n- [ ] `same_site = lax` or `strict` in `config\u002Fsession.php`\n- [ ] `secure = true` or `null` (auto for HTTPS) in `config\u002Fsession.php`\n- [ ] `lifetime` is a reasonable value (15–30 min recommended for most apps)\n- [ ] `domain = null` unless subdomains are needed\n- [ ] `EncryptCookies` middleware is in the web group\n\n### 8. Software & Data Integrity Failures (A08:2021)\n\n**CSRF:**\n- [ ] `VerifyCsrfToken` middleware active in the web group\n- [ ] Only stateless routes (webhooks, external callbacks) are excluded from CSRF\n- [ ] `@csrf` directive used in all non-Inertia POST forms\n- [ ] Excluded routes in `validateCsrfTokens(except: [...])` are justified\n\n**Deserialization:**\n- [ ] No `unserialize($request->input(...))`\n- [ ] No `eval($request->input(...))`\n- [ ] No `extract($request->all())`\n\n### 9. Security Logging & Monitoring Failures (A09:2021)\n\n- [ ] Failed login attempts logged with IP and identifier\n- [ ] Payment failures and exceptions logged\n- [ ] Log entries do not contain raw passwords or secrets\n- [ ] Monitoring in place (Laravel Telescope, Sentry, or similar)\n\n### 10. Server-Side Request Forgery — SSRF (A10:2021)\n\n- [ ] No `Http::get($request->input('url'))` with unvalidated URLs\n- [ ] User-supplied URLs validated against an allowlist or scheme check\n- [ ] Internal network addresses blocked from user-supplied URLs\n\n---\n\n## Additional Checks\n\n> Not part of the OWASP Top 10 but critical for Laravel applications.\n\n### Command Injection & Dangerous Functions\n\n- [ ] No `exec()`, `shell_exec()`, `system()`, `passthru()` with user input\n- [ ] No open redirects — no `redirect($request->input('url'))` with unvalidated URLs\n- [ ] File uploads validate `mimes:`, `max:` — filenames never derived from raw user input\n\n### Security Headers\n\n- [ ] `Content-Security-Policy` set — with nonces (`Vite::useCspNonce()`) if possible\n- [ ] `X-Frame-Options` set\n- [ ] `X-Content-Type-Options` set\n- [ ] `Strict-Transport-Security` set for HTTPS\n- [ ] `Referrer-Policy` set\n- [ ] `Permissions-Policy` set\n\n---\n\n## React + Inertia.js Checks\n\n> Only run if React + Inertia.js detected in Step 1.\n\n### R1. XSS in React Components\n\n- [ ] No `dangerouslySetInnerHTML={{ __html: userInput }}` without `DOMPurify.sanitize()` first\n- [ ] `href` and `src` attributes not set from unvalidated user input — `javascript:` URLs execute scripts\n- [ ] No `eval()`, `new Function()`, or `setTimeout(string)` with user-controlled strings\n- [ ] Links from user input validate scheme (`https:\u002F\u002F` or `http:\u002F\u002F` only)\n\n### R2. Inertia.js Data Exposure (Critical)\n\n- [ ] `HandleInertiaRequests::share()` does NOT expose passwords, tokens, or internal-only flags\n- [ ] Controllers use `->only([...])` or API Resources — not raw model `toArray()`\n- [ ] All Inertia props are treated as public — visible in `data-page` HTML attribute on initial load\n- [ ] Payment secret keys and admin-only credentials are never passed as Inertia props\n- [ ] Inertia v2 History Encryption enabled for pages with sensitive data\n\n### R3. CSRF in Inertia.js\n\n- [ ] Inertia `X-XSRF-TOKEN` header not disabled\n- [ ] Custom `fetch` or `axios` calls include CSRF token manually if bypassing Inertia's router\n- [ ] Webhook\u002Fcallback routes are the ONLY CSRF-excluded routes\n\n### R4. Authentication State in React\n\n- [ ] `auth.user` Inertia prop excludes password hash, remember tokens, and 2FA secrets\n- [ ] Role\u002Fpermission checks enforced server-side — React checks are UI-only\n- [ ] `auth.user` contains only fields the UI actually needs\n\n### R5. Sensitive Data in Browser\n\n- [ ] No API keys or secrets hardcoded in React components or TypeScript files\n- [ ] No sensitive data in `localStorage` or `sessionStorage` — use HttpOnly cookies\n- [ ] `VITE_*` env vars contain no secrets — they are public by design\n\n### R6. Dependency Security\n\n- [ ] `npm audit` passes with no high\u002Fcritical CVEs in React or Inertia packages\n- [ ] React is on a supported version\n- [ ] Third-party component libraries reviewed for known CVEs\n\n---\n\n## Output Format\n\nStructure the audit report as:\n\n```\n## Laravel OWASP Security Audit Report\n\n> React + Inertia.js detected — Laravel OWASP checklist AND React\u002FInertia security checks will both be applied.\n\n### 1. Broken Access Control (A01:2021)\n- **PASS** `app\u002FHttp\u002FMiddleware\u002FRoleMiddleware.php` — role middleware applied to all route groups\n- **FAIL** `app\u002FHttp\u002FControllers\u002FPaymentController.php:42` — Payment model fetched without ownership check (direct object reference exposure). Fix: scope the query to the authenticated user.\n\n[Continue for all 10 OWASP checks + Additional Checks + R1–R6 React\u002FInertia checks]\n\n---\n\n## Summary\n\n### Critical Issues (fix immediately)\n1. ...\n\n### Warnings (fix soon)\n1. ...\n\n### Passed\nX checks passed.\n\n### Recommended Commands\ncomposer audit\nnpm audit\n```\n\n---\n\n## When to Apply for Guidance\n\nReference the rule files when:\n- Implementing authentication or password handling\n- Building payment or webhook integrations\n- Writing file upload or download logic\n- Designing admin or role-based access control\n- Building API endpoints with user-supplied input\n- Using `dangerouslySetInnerHTML` in React components\n- Passing data from Laravel controllers to Inertia props\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Rule File |\n|----------|----------|--------|-----------|\n| 1 | Broken Access Control | CRITICAL | `sec-broken-access-control` |\n| 2 | Cryptographic Failures | CRITICAL | `sec-cryptographic-failures` |\n| 3 | Injection Prevention | CRITICAL | `sec-injection-prevention` |\n| 4 | XSS & React\u002FInertia | HIGH | `sec-xss-react-inertia` |\n| 5 | CSRF Protection | HIGH | `sec-csrf-protection` |\n| 6 | Security Misconfiguration | HIGH | `sec-security-misconfiguration` |\n| 7 | Authentication & Rate Limiting | HIGH | `sec-authentication-rate-limiting` |\n| 8 | Inertia Data Exposure | HIGH | `sec-inertia-data-exposure` |\n\n## Quick Reference\n\n### 1. Broken Access Control (CRITICAL)\n- `sec-broken-access-control` — Middleware, ownership checks, policies, scoped queries\n\n### 2. Cryptographic Failures (CRITICAL)\n- `sec-cryptographic-failures` — Password hashing, encrypted casts, signed URLs\n\n### 3. Injection Prevention (CRITICAL)\n- `sec-injection-prevention` — SQL injection, mass assignment, raw query bindings\n\n### 4. XSS & React\u002FInertia (HIGH)\n- `sec-xss-react-inertia` — dangerouslySetInnerHTML, DOMPurify, href\u002Fsrc validation\n\n### 5. CSRF Protection (HIGH)\n- `sec-csrf-protection` — VerifyCsrfToken, webhook exclusions, Inertia CSRF\n\n### 6. Security Misconfiguration (HIGH)\n- `sec-security-misconfiguration` — APP_DEBUG, APP_KEY, security headers, CORS\n\n### 7. Authentication & Rate Limiting (HIGH)\n- `sec-authentication-rate-limiting` — Throttle, session regeneration, brute force prevention\n\n### 8. Inertia Data Exposure (HIGH)\n- `sec-inertia-data-exposure` — data-page attribute exposure, secret props, API Resources\n\n## How to Use\n\nRead individual rule files for detailed explanations and code examples:\n\n```\nrules\u002Fsec-broken-access-control.md\nrules\u002Fsec-cryptographic-failures.md\nrules\u002Fsec-injection-prevention.md\nrules\u002Fsec-xss-react-inertia.md\nrules\u002Fsec-csrf-protection.md\nrules\u002Fsec-security-misconfiguration.md\nrules\u002Fsec-authentication-rate-limiting.md\nrules\u002Fsec-inertia-data-exposure.md\n```\n\nEach rule file contains:\n- YAML frontmatter with metadata (title, impact, tags)\n- Why it matters in Laravel\u002FReact context\n- Incorrect code example with explanation\n- Correct code example with fix\n- Laravel 13 and PHP 8.3+ specific context\n\n## Full Compiled Document\n\nFor the complete guide with all rules expanded: `AGENTS.md`\n","# Laravel OWASP Security\n\nDual-purpose security skill for Laravel 13 + React\u002FInertia.js applications. Run a full OWASP Top 10 audit against a codebase, or use as a secure coding reference when building features.\n\n## How to Audit\n\n### Step 1: Detect Stack\n\nCheck if the project uses React + Inertia.js by looking for:\n- `app\u002FHttp\u002FMiddleware\u002FHandleInertiaRequests.php` exists\n- `resources\u002Fjs\u002F` contains `.tsx` or `.jsx` files\n- `inertiajs\u002Finertia-laravel` in `composer.json`\n- `@inertiajs\u002Freact` in `package.json`\n\n**If detected**, state at the top of the report:\n> \"React + Inertia.js detected — Laravel OWASP checklist AND React\u002FInertia security checks will both be applied.\"\n\n**If not detected**, state:\n> \"No React\u002FInertia.js detected — applying Laravel OWASP checklist only.\"\n\n### Step 2: Determine Scope\n\n- If arguments provided (`$ARGUMENTS`): review only those files or features\n- If no arguments: review the entire codebase\n\n### Step 3: Run Checklist\n\nWork through every item below. For each, output:\n- **PASS** — brief confirmation of what was verified\n- **FAIL** — exact `file:line`, a description of the vulnerability (do NOT reproduce any code, values, API keys, tokens, or .env contents from the file), and a fix recommendation\n- **N\u002FA** — if the check does not apply to this project\n\n---\n\n## OWASP Top 10 Checklist\n\n### 1. Broken Access Control (A01:2021)\n\n- [ ] Middleware protects all route groups by role (`auth`, `role:admin`, etc.)\n- [ ] Resource queries scoped to authenticated user — `->where('user_id', auth()->id())`\n- [ ] No direct object reference without ownership check\n- [ ] Gates and Policies used to authorize resource access\n- [ ] Frontend role checks are mirrored server-side — never rely on React UI checks alone\n\n### 2. Cryptographic Failures (A02:2021)\n\n- [ ] Passwords hashed with `Hash::make()` or `'hashed'` Eloquent cast — never stored as plaintext\n- [ ] No MD5 or SHA1 used for password hashing\n- [ ] Sensitive fields (API keys, secrets) encrypted with `Crypt::encryptString()` or `'encrypted'` Eloquent cast\n- [ ] `APP_KEY` is long, random, and unique per environment\n- [ ] Signed URLs (`URL::signedRoute()`) used for sensitive one-time actions (password reset, email verify)\n\n### 3. Injection (A03:2021)\n\n**SQL & Mass Assignment:**\n- [ ] No string concatenation in `whereRaw()`, `selectRaw()`, `orderByRaw()` — use `?` bindings\n- [ ] Column names never derived from user input without a whitelist\n- [ ] No `$request->all()` passed directly to `create()`, `fill()`, or `update()`\n- [ ] No `forceFill()` or `forceCreate()` with unvalidated user input\n- [ ] Models define `$fillable` explicitly — not `$guarded = []`\n- [ ] Controllers use `$request->validated()` for mass operations\n\n**XSS — Blade & React:**\n- [ ] No `{!! $userInput !!}` in Blade templates with untrusted data\n- [ ] `{{ }}` used for all user-supplied Blade output\n- [ ] No `dangerouslySetInnerHTML` in React without `DOMPurify.sanitize()` first\n- [ ] `href` and `src` attributes not set from unvalidated user input\n- [ ] No `eval()`, `new Function()`, or `setTimeout(string)` with user-controlled strings\n- [ ] External CDN scripts use Subresource Integrity (`integrity=\"sha384-...\"`)\n\n### 4. Insecure Design (A04:2021)\n\n- [ ] Business logic enforced server-side — prices, totals, and discounts never trusted from client input\n- [ ] Sensitive operations require secondary confirmation (e.g. password re-entry for account deletion)\n- [ ] No mass action endpoints without per-item authorization check\n- [ ] Admin-only features isolated behind separate middleware — not just hidden in the UI\n- [ ] Payment amounts and enrollment states calculated server-side, not passed as form inputs\n\n### 5. Security Misconfiguration (A05:2021)\n\n- [ ] `APP_DEBUG=false` in production\n- [ ] `.env` is in `.gitignore` and never committed\n- [ ] Database uses a restricted user — not root\u002Fadmin — in production\n- [ ] `storage\u002F` and `bootstrap\u002Fcache\u002F` have correct permissions (not world-writable)\n- [ ] `APP_KEY` is set and unique per environment\n- [ ] CORS `allowed_origins` is not `['*']` for authenticated API routes\n\n### 6. Vulnerable & Outdated Components (A06:2021)\n\n- [ ] `composer audit` passes with no known CVEs\n- [ ] `npm audit` passes with no known CVEs\n- [ ] Laravel framework is on a supported version\n\n### 7. Identification & Authentication Failures (A07:2021)\n\n**Auth:**\n- [ ] Using Laravel Breeze, Fortify, or Jetstream — not custom-rolled auth\n- [ ] Passwords hashed with bcrypt or argon2 (Laravel default)\n- [ ] Login route rate limited — `throttle` middleware or `RateLimiter` in `LoginRequest`\n- [ ] Password reset and email verification routes rate limited\n- [ ] Payment and sensitive action routes have appropriate rate limits\n- [ ] `session()->regenerate()` called after successful login\n\n**Cookie & Session:**\n- [ ] `http_only = true` in `config\u002Fsession.php`\n- [ ] `same_site = lax` or `strict` in `config\u002Fsession.php`\n- [ ] `secure = true` or `null` (auto for HTTPS) in `config\u002Fsession.php`\n- [ ] `lifetime` is a reasonable value (15–30 min recommended for most apps)\n- [ ] `domain = null` unless subdomains are needed\n- [ ] `EncryptCookies` middleware is in the web group\n\n### 8. Software & Data Integrity Failures (A08:2021)\n\n**CSRF:**\n- [ ] `VerifyCsrfToken` middleware active in the web group\n- [ ] Only stateless routes (webhooks, external callbacks) are excluded from CSRF\n- [ ] `@csrf` directive used in all non-Inertia POST forms\n- [ ] Excluded routes in `validateCsrfTokens(except: [...])` are justified\n\n**Deserialization:**\n- [ ] No `unserialize($request->input(...))`\n- [ ] No `eval($request->input(...))`\n- [ ] No `extract($request->all())`\n\n### 9. Security Logging & Monitoring Failures (A09:2021)\n\n- [ ] Failed login attempts logged with IP and identifier\n- [ ] Payment failures and exceptions logged\n- [ ] Log entries do not contain raw passwords or secrets\n- [ ] Monitoring in place (Laravel Telescope, Sentry, or similar)\n\n### 10. Server-Side Request Forgery — SSRF (A10:2021)\n\n- [ ] No `Http::get($request->input('url'))` with unvalidated URLs\n- [ ] User-supplied URLs validated against an allowlist or scheme check\n- [ ] Internal network addresses blocked from user-supplied URLs\n\n---\n\n## Additional Checks\n\n> Not part of the OWASP Top 10 but critical for Laravel applications.\n\n### Command Injection & Dangerous Functions\n\n- [ ] No `exec()`, `shell_exec()`, `system()`, `passthru()` with user input\n- [ ] No open redirects — no `redirect($request->input('url'))` with unvalidated URLs\n- [ ] File uploads validate `mimes:`, `max:` — filenames never derived from raw user input\n\n### Security Headers\n\n- [ ] `Content-Security-Policy` set — with nonces (`Vite::useCspNonce()`) if possible\n- [ ] `X-Frame-Options` set\n- [ ] `X-Content-Type-Options` set\n- [ ] `Strict-Transport-Security` set for HTTPS\n- [ ] `Referrer-Policy` set\n- [ ] `Permissions-Policy` set\n\n---\n\n## React + Inertia.js Checks\n\n> Only run if React + Inertia.js detected in Step 1.\n\n### R1. XSS in React Components\n\n- [ ] No `dangerouslySetInnerHTML={{ __html: userInput }}` without `DOMPurify.sanitize()` first\n- [ ] `href` and `src` attributes not set from unvalidated user input — `javascript:` URLs execute scripts\n- [ ] No `eval()`, `new Function()`, or `setTimeout(string)` with user-controlled strings\n- [ ] Links from user input validate scheme (`https:\u002F\u002F` or `http:\u002F\u002F` only)\n\n### R2. Inertia.js Data Exposure (Critical)\n\n- [ ] `HandleInertiaRequests::share()` does NOT expose passwords, tokens, or internal-only flags\n- [ ] Controllers use `->only([...])` or API Resources — not raw model `toArray()`\n- [ ] All Inertia props are treated as public — visible in `data-page` HTML attribute on initial load\n- [ ] Payment secret keys and admin-only credentials are never passed as Inertia props\n- [ ] Inertia v2 History Encryption enabled for pages with sensitive data\n\n### R3. CSRF in Inertia.js\n\n- [ ] Inertia `X-XSRF-TOKEN` header not disabled\n- [ ] Custom `fetch` or `axios` calls include CSRF token manually if bypassing Inertia's router\n- [ ] Webhook\u002Fcallback routes are the ONLY CSRF-excluded routes\n\n### R4. Authentication State in React\n\n- [ ] `auth.user` Inertia prop excludes password hash, remember tokens, and 2FA secrets\n- [ ] Role\u002Fpermission checks enforced server-side — React checks are UI-only\n- [ ] `auth.user` contains only fields the UI actually needs\n\n### R5. Sensitive Data in Browser\n\n- [ ] No API keys or secrets hardcoded in React components or TypeScript files\n- [ ] No sensitive data in `localStorage` or `sessionStorage` — use HttpOnly cookies\n- [ ] `VITE_*` env vars contain no secrets — they are public by design\n\n### R6. Dependency Security\n\n- [ ] `npm audit` passes with no high\u002Fcritical CVEs in React or Inertia packages\n- [ ] React is on a supported version\n- [ ] Third-party component libraries reviewed for known CVEs\n\n---\n\n## Output Format\n\nStructure the audit report as:\n\n```\n## Laravel OWASP Security Audit Report\n\n> React + Inertia.js detected — Laravel OWASP checklist AND React\u002FInertia security checks will both be applied.\n\n### 1. Broken Access Control (A01:2021)\n- **PASS** `app\u002FHttp\u002FMiddleware\u002FRoleMiddleware.php` — role middleware applied to all route groups\n- **FAIL** `app\u002FHttp\u002FControllers\u002FPaymentController.php:42` — Payment model fetched without ownership check (direct object reference exposure). Fix: scope the query to the authenticated user.\n\n[Continue for all 10 OWASP checks + Additional Checks + R1–R6 React\u002FInertia checks]\n\n---\n\n## Summary\n\n### Critical Issues (fix immediately)\n1. ...\n\n### Warnings (fix soon)\n1. ...\n\n### Passed\nX checks passed.\n\n### Recommended Commands\ncomposer audit\nnpm audit\n```\n\n---\n\n## When to Apply for Guidance\n\nReference the rule files when:\n- Implementing authentication or password handling\n- Building payment or webhook integrations\n- Writing file upload or download logic\n- Designing admin or role-based access control\n- Building API endpoints with user-supplied input\n- Using `dangerouslySetInnerHTML` in React components\n- Passing data from Laravel controllers to Inertia props\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Rule File |\n|----------|----------|--------|-----------|\n| 1 | Broken Access Control | CRITICAL | `sec-broken-access-control` |\n| 2 | Cryptographic Failures | CRITICAL | `sec-cryptographic-failures` |\n| 3 | Injection Prevention | CRITICAL | `sec-injection-prevention` |\n| 4 | XSS & React\u002FInertia | HIGH | `sec-xss-react-inertia` |\n| 5 | CSRF Protection | HIGH | `sec-csrf-protection` |\n| 6 | Security Misconfiguration | HIGH | `sec-security-misconfiguration` |\n| 7 | Authentication & Rate Limiting | HIGH | `sec-authentication-rate-limiting` |\n| 8 | Inertia Data Exposure | HIGH | `sec-inertia-data-exposure` |\n\n## Quick Reference\n\n### 1. Broken Access Control (CRITICAL)\n- `sec-broken-access-control` — Middleware, ownership checks, policies, scoped queries\n\n### 2. Cryptographic Failures (CRITICAL)\n- `sec-cryptographic-failures` — Password hashing, encrypted casts, signed URLs\n\n### 3. Injection Prevention (CRITICAL)\n- `sec-injection-prevention` — SQL injection, mass assignment, raw query bindings\n\n### 4. XSS & React\u002FInertia (HIGH)\n- `sec-xss-react-inertia` — dangerouslySetInnerHTML, DOMPurify, href\u002Fsrc validation\n\n### 5. CSRF Protection (HIGH)\n- `sec-csrf-protection` — VerifyCsrfToken, webhook exclusions, Inertia CSRF\n\n### 6. Security Misconfiguration (HIGH)\n- `sec-security-misconfiguration` — APP_DEBUG, APP_KEY, security headers, CORS\n\n### 7. Authentication & Rate Limiting (HIGH)\n- `sec-authentication-rate-limiting` — Throttle, session regeneration, brute force prevention\n\n### 8. Inertia Data Exposure (HIGH)\n- `sec-inertia-data-exposure` — data-page attribute exposure, secret props, API Resources\n\n## How to Use\n\nRead individual rule files for detailed explanations and code examples:\n\n```\nrules\u002Fsec-broken-access-control.md\nrules\u002Fsec-cryptographic-failures.md\nrules\u002Fsec-injection-prevention.md\nrules\u002Fsec-xss-react-inertia.md\nrules\u002Fsec-csrf-protection.md\nrules\u002Fsec-security-misconfiguration.md\nrules\u002Fsec-authentication-rate-limiting.md\nrules\u002Fsec-inertia-data-exposure.md\n```\n\nEach rule file contains:\n- YAML frontmatter with metadata (title, impact, tags)\n- Why it matters in Laravel\u002FReact context\n- Incorrect code example with explanation\n- Correct code example with fix\n- Laravel 13 and PHP 8.3+ specific context\n\n## Full Compiled Document\n\nFor the complete guide with all rules expanded: `AGENTS.md`\n",{"name":5,"license":14,"metadata":23,"description":7},{"author":24,"version":25,"phpVersion":26,"laravelVersion":27},"AsyrafHussin","1.0.3","8.3+","13.x","main","1d1992f15739dafb1e105b9293d9d4a60f3f940f","bankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON","https:\u002F\u002Fbankdata-jhon.vercel.app","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev","2026-09-01 19:20:34",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add projectweb738-dev\u002FBANKDATA_JHON --skill laravel-owasp-security",{"tool":41,"command":42},"bunx","bunx skills add projectweb738-dev\u002FBANKDATA_JHON --skill laravel-owasp-security",{"tool":44,"command":45},"pnpm","pnpm dlx skills add projectweb738-dev\u002FBANKDATA_JHON --skill laravel-owasp-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002FSKILL.md",true,[49,55,59,63,67,71,75,79,83,87,91,95],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"AGENTS.md","REFERENCE","参考文档",15015,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002FAGENTS.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"README.md",2171,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002FREADME.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"rules\u002F_sections.md",3842,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002F_sections.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"rules\u002F_template.md",1664,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002F_template.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"rules\u002Fsec-authentication-rate-limiting.md",6631,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-authentication-rate-limiting.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"rules\u002Fsec-broken-access-control.md",5196,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-broken-access-control.md",{"path":76,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":77,"sourceHtmlUrl":78},"rules\u002Fsec-cryptographic-failures.md",4880,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-cryptographic-failures.md",{"path":80,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":81,"sourceHtmlUrl":82},"rules\u002Fsec-csrf-protection.md",4972,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-csrf-protection.md",{"path":84,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":85,"sourceHtmlUrl":86},"rules\u002Fsec-inertia-data-exposure.md",7467,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-inertia-data-exposure.md",{"path":88,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":89,"sourceHtmlUrl":90},"rules\u002Fsec-injection-prevention.md",5976,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-injection-prevention.md",{"path":92,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":93,"sourceHtmlUrl":94},"rules\u002Fsec-security-misconfiguration.md",5458,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-security-misconfiguration.md",{"path":96,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":97,"sourceHtmlUrl":98},"rules\u002Fsec-xss-react-inertia.md",5500,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Flaravel-owasp-security\u002Frules\u002Fsec-xss-react-inertia.md",[100,107,114,123,130,138],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M78D1BKYFY69R04PNRR5HSZJ","wordpress-pro","Develops custom WordPress themes and plugins, creates and registers Gutenberg blocks and block patterns, configures WooCommerce stores, implements WordPress REST API endpoints, applies security hardening (nonces, sanitization, escaping, capability checks), and optimizes performance through caching and query tuning. Use when building WordPress themes, writing plugins, customizing Gutenberg blocks, extending WooCommerce, working with ACF, using the WordPress REST API, applying hooks and filters, or improving WordPress performance and security.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwordpress-pro\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M78D13G4YF5N0SPXAJRA1JYT","websocket-engineer","Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebsocket-engineer\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":118,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":18},"01M78D10XEZAMYSSWTRE2WS9KK","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":18},"01M78D0V06RFFQBT70678K5Y7M","web-design-guidelines","UI\u002FUX best practices and accessibility audit. Use when reviewing UI code, checking accessibility, running accessibility audits, auditing forms, or ensuring web interface best practices. Triggers on \"audit accessibility\", \"check WCAG\", \"review UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check best practices\".","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":118,"licenseFileUrl":134,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":18},"01M78D0QH26WXXHZW4V54HS0TS","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":18},"01M78D0C3NRETBTGVCFTXG6PSF","vue-expert","Builds Vue 3 components with Composition API patterns, configures Nuxt 3 SSR\u002FSSG projects, sets up Pinia stores, scaffolds Quasar\u002FCapacitor mobile apps, implements PWA features, and optimises Vite builds. Use when creating Vue 3 applications with Composition API, writing reusable composables, managing state with Pinia, building hybrid mobile apps with Quasar or Capacitor, configuring service workers, or tuning Vite configuration and TypeScript integration.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fvue-expert\u002FSKILL.md",[],[]]