Token导航 LogoToken导航

Agent Skill · 前端设计

laravel-owasp-security(Laravel owasp 安全)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

laravel-owasp-security 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 2,573。

总安装 2,105周安装 86GitHub Stars 33下载 674核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:laravel-owasp-security(Laravel owasp 安全)
来源仓库:https://github.com/asyrafhussin/agent-skills
仓库路径:skills/laravel-owasp-security
安装命令:
npx skills add https://github.com/asyrafhussin/agent-skills --skill laravel-owasp-security
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/asyrafhussin/agent-skills --skill laravel-owasp-security

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

laravel-owasp-security 用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论。涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/laravel-owasp-security

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/asyrafhussin/agent-skills --skill laravel-owas…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

laravel-owasp-security 怎么安装?

在终端执行 npx skills add https://github.com/asyrafhussin/agent-skills --skill laravel-owasp-security。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

laravel-owasp-security 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

laravel-owasp-security 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

laravel-owasp-security 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

laravel-owasp-security 用的人多吗?

公开数据是累计安装 2,105 次,近一周安装 86 次,下载 674 次,GitHub 33 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

laravel-owasp-security 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
laravel-owasp-security

Laravel owasp 安全 · 本页

2,10533操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Laravel OWASP Security

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

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."

Step 2: Determine Scope

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

Step 3: Run Checklist

Work through every item below. For each, output:

  • PASS — brief confirmation of what was verified
  • 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/A — if the check does not apply to this project

OWASP Top 10 Checklist

1. Broken Access Control (A01:2021)

  • 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

2. Cryptographic Failures (A02:2021)

  • Passwords hashed with Hash::make() or 'hashed' Eloquent cast — never stored as plaintext
  • No MD5 or SHA1 used for password hashing
  • Sensitive fields (API keys, secrets) encrypted with Crypt::encryptString() or 'encrypted' Eloquent cast
  • APP_KEY is long, random, and unique per environment
  • Signed URLs (URL::signedRoute()) used for sensitive one-time actions (password reset, email verify)

3. Injection (A03:2021)

SQL & Mass Assignment:

  • No string concatenation in whereRaw(), selectRaw(), orderByRaw() — use ? bindings
  • Column names never derived from user input without a whitelist
  • No $request->all() passed directly to create(), fill(), or update()
  • No forceFill() or forceCreate() with unvalidated user input
  • Models define $fillable explicitly — not $guarded = []
  • Controllers use $request->validated() for mass operations

XSS — Blade & React:

  • No {!! $userInput!!} in Blade templates with untrusted data
  • {{}} used for all user-supplied Blade output
  • No dangerouslySetInnerHTML in React without DOMPurify.sanitize() first
  • href and src attributes not set from unvalidated user input
  • No eval(), new Function(), or setTimeout(string) with user-controlled strings
  • External CDN scripts use Subresource Integrity (integrity="sha384-...")

4. Insecure Design (A04:2021)

  • Business logic enforced server-side — prices, totals, and discounts never trusted from client input
  • Sensitive operations require secondary confirmation (e.g. password re-entry for account deletion)
  • No mass action endpoints without per-item authorization check
  • Admin-only features isolated behind separate middleware — not just hidden in the UI
  • Payment amounts and enrollment states calculated server-side, not passed as form inputs

5. Security Misconfiguration (A05:2021)

  • APP_DEBUG=false in production
  • .env is in .gitignore and never committed
  • Database uses a restricted user — not root/admin — in production
  • storage/ and bootstrap/cache/ have correct permissions (not world-writable)
  • APP_KEY is set and unique per environment
  • CORS allowed_origins is not ['*'] for authenticated API routes

6. Vulnerable & Outdated Components (A06:2021)

  • composer audit passes with no known CVEs
  • npm audit passes with no known CVEs
  • Laravel framework is on a supported version

7. Identification & Authentication Failures (A07:2021)

Auth:

  • Using Laravel Breeze, Fortify, or Jetstream — not custom-rolled auth
  • Passwords hashed with bcrypt or argon2 (Laravel default)
  • Login route rate limited — throttle middleware or RateLimiter in LoginRequest
  • Password reset and email verification routes rate limited
  • Payment and sensitive action routes have appropriate rate limits
  • session()->regenerate() called after successful login

Cookie & Session:

  • http_only = true in config/session.php
  • same_site = lax or strict in config/session.php
  • secure = true or null (auto for HTTPS) in config/session.php
  • lifetime is a reasonable value (15–30 min recommended for most apps)
  • domain = null unless subdomains are needed
  • EncryptCookies middleware is in the web group

8. Software & Data Integrity Failures (A08:2021)

CSRF:

  • VerifyCsrfToken middleware 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

Deserialization:

  • No unserialize($request->input(...))
  • No eval($request->input(...))
  • No extract($request->all())

9. Security Logging & Monitoring Failures (A09:2021)

  • Failed login attempts logged with IP and identifier
  • Payment failures and exceptions logged
  • Log entries do not contain raw passwords or secrets
  • Monitoring in place (Laravel Telescope, Sentry, or similar)

10. Server-Side Request Forgery — SSRF (A10:2021)

  • No Http::get($request->input('url')) with unvalidated URLs
  • User-supplied URLs validated against an allowlist or scheme check
  • Internal network addresses blocked from user-supplied URLs

Additional Checks

Not part of the OWASP Top 10 but critical for Laravel applications.

Command Injection & Dangerous Functions

  • No exec(), shell_exec(), system(), passthru() with user input
  • No open redirects — no redirect($request->input('url')) with unvalidated URLs
  • File uploads validate mimes:, max: — filenames never derived from raw user input

Security Headers

  • Content-Security-Policy set — with nonces (Vite::useCspNonce()) if possible
  • X-Frame-Options set
  • X-Content-Type-Options set
  • Strict-Transport-Security set for HTTPS
  • Referrer-Policy set
  • Permissions-Policy set

React + Inertia.js Checks

Only run if React + Inertia.js detected in Step 1.

R1. XSS in React Components

  • No dangerouslySetInnerHTML={{__html: userInput}} without DOMPurify.sanitize() first
  • href and src attributes not set from unvalidated user input — javascript: URLs execute scripts
  • No eval(), new Function(), or setTimeout(string) with user-controlled strings
  • Links from user input validate scheme (https:// or http:// only)

R2. Inertia.js Data Exposure (Critical)

  • HandleInertiaRequests::share() does NOT expose passwords, tokens, or internal-only flags
  • Controllers use ->only([...]) or API Resources — not raw model toArray()
  • All Inertia props are treated as public — visible in data-page HTML attribute on initial load
  • Payment secret keys and admin-only credentials are never passed as Inertia props
  • Inertia v2 History Encryption enabled for pages with sensitive data

R3. CSRF in Inertia.js

  • Inertia X-XSRF-TOKEN header not disabled
  • Custom fetch or axios calls include CSRF token manually if bypassing Inertia's router
  • Webhook/callback routes are the ONLY CSRF-excluded routes

R4. Authentication State in React

  • auth.user Inertia prop excludes password hash, remember tokens, and 2FA secrets
  • Role/permission checks enforced server-side — React checks are UI-only
  • auth.user contains only fields the UI actually needs

R5. Sensitive Data in Browser

  • No API keys or secrets hardcoded in React components or TypeScript files
  • No sensitive data in localStorage or sessionStorage — use HttpOnly cookies
  • VITE_* env vars contain no secrets — they are public by design

R6. Dependency Security

  • npm audit passes with no high/critical CVEs in React or Inertia packages
  • React is on a supported version
  • Third-party component libraries reviewed for known CVEs

Output Format

Structure the audit report as:

## Laravel OWASP Security Audit Report

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

### 1. Broken Access Control (A01:2021)
- **PASS** `app/Http/Middleware/RoleMiddleware.php` — role middleware applied to all route groups
- **FAIL** `app/Http/Controllers/PaymentController.php:42` — Payment model fetched without ownership check (direct object reference exposure). Fix: scope the query to the authenticated user.

[Continue for all 10 OWASP checks + Additional Checks + R1–R6 React/Inertia checks]

---

## Summary

### Critical Issues (fix immediately)
1. ...

### Warnings (fix soon)
1. ...

### Passed
X checks passed.

### Recommended Commands
composer audit
npm audit

When to Apply for Guidance

Reference the rule files when:

  • Implementing authentication or password handling
  • Building payment or webhook integrations
  • Writing file upload or download logic
  • Designing admin or role-based access control
  • Building API endpoints with user-supplied input
  • Using dangerouslySetInnerHTML in React components
  • Passing data from Laravel controllers to Inertia props

Rule Categories by Priority

PriorityCategoryImpactRule File
1Broken Access ControlCRITICALsec-broken-access-control
2Cryptographic FailuresCRITICALsec-cryptographic-failures
3Injection PreventionCRITICALsec-injection-prevention
4XSS & React/InertiaHIGHsec-xss-react-inertia
5CSRF ProtectionHIGHsec-csrf-protection
6Security MisconfigurationHIGHsec-security-misconfiguration
7Authentication & Rate LimitingHIGHsec-authentication-rate-limiting
8Inertia Data ExposureHIGHsec-inertia-data-exposure

Quick Reference

1. Broken Access Control (CRITICAL)

  • sec-broken-access-control — Middleware, ownership checks, policies, scoped queries

2. Cryptographic Failures (CRITICAL)

  • sec-cryptographic-failures — Password hashing, encrypted casts, signed URLs

3. Injection Prevention (CRITICAL)

  • sec-injection-prevention — SQL injection, mass assignment, raw query bindings

4. XSS & React/Inertia (HIGH)

  • sec-xss-react-inertia — dangerouslySetInnerHTML, DOMPurify, href/src validation

5. CSRF Protection (HIGH)

  • sec-csrf-protection — VerifyCsrfToken, webhook exclusions, Inertia CSRF

6. Security Misconfiguration (HIGH)

  • sec-security-misconfiguration — APP_DEBUG, APP_KEY, security headers, CORS

7. Authentication & Rate Limiting (HIGH)

  • sec-authentication-rate-limiting — Throttle, session regeneration, brute force prevention

8. Inertia Data Exposure (HIGH)

  • sec-inertia-data-exposure — data-page attribute exposure, secret props, API Resources

How to Use

Read individual rule files for detailed explanations and code examples:

rules/sec-broken-access-control.md
rules/sec-cryptographic-failures.md
rules/sec-injection-prevention.md
rules/sec-xss-react-inertia.md
rules/sec-csrf-protection.md
rules/sec-security-misconfiguration.md
rules/sec-authentication-rate-limiting.md
rules/sec-inertia-data-exposure.md

Each rule file contains:

  • YAML frontmatter with metadata (title, impact, tags)
  • Why it matters in Laravel/React context
  • Incorrect code example with explanation
  • Correct code example with fix
  • Laravel 13 and PHP 8.3+ specific context

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

平台分布

Codex

33.91%
按下载量换算229

Claude

32.11%
按下载量换算216

Cursor

18.73%
按下载量换算126

Gemini CLI

9.65%
按下载量换算65

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills