技能 laravel-security-audit
🛡️

laravel-security-audit

安全

Audit Laravel Apps for Security Vulnerabilities

Laravel developers need to ensure their applications follow security best practices. This skill provides comprehensive security auditing using OWASP standards and Laravel-specific security knowledge.

支援: Claude Codex Code(CC)
🥉 74 青銅
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「laravel-security-audit」。 Review a Laravel controller that fetches user posts by ID

預期結果:

  • Issue: Missing Authorization Check
  • Risk: High
  • Problem: The controller fetches a post by ID without verifying ownership or user permissions.
  • Exploit: An authenticated user can access another user's post by changing the ID parameter.
  • Fix: Add policy check or scope the query to the authenticated user's posts.
  • Example: Post::where('user_id', auth()->id())->findOrFail($id)

正在使用「laravel-security-audit」。 Review file upload validation logic

預期結果:

  • Issue: Insufficient File Type Validation
  • Risk: Medium
  • Problem: Only file extension is checked, MIME type validation is missing.
  • Exploit: Attacker could upload a PHP file disguised as an image.
  • Fix: Use Laravel's mimeTypes validation rule and store outside public directory.
  • Example: $request->file('avatar')->validate(['mimes:jpg,png', 'max:2048'])

安全審計

安全
v1 • 2/25/2026

All static analysis findings are false positives. This is an educational/documentation skill containing prompt instructions for security auditing, not executable code. The detected patterns (external_commands, network, env_access) are references to security concepts being taught, not actual vulnerable code. No security risks identified.

1
已掃描檔案
224
分析行數
0
發現項
1
審計總數
未發現安全問題
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
50
社群
100
安全
91
規範符合性

你能建構什麼

Pre-Deployment Security Review

Review Laravel application code before deploying to production to identify security vulnerabilities.

Code Review Assistance

Integrate security analysis into pull request reviews to catch vulnerabilities early.

Legacy Code Audit

Assess existing Laravel applications for security debt and misconfigurations.

試試這些提示

Basic Security Check
Review this Laravel controller for security vulnerabilities. Check for proper authorization, input validation, and common OWASP issues.
Full Application Audit
Perform a comprehensive security audit of this Laravel application. Analyze authentication, authorization, input validation, database queries, file uploads, and API security. Classify each finding by risk level.
Authentication Flow Review
Audit the authentication implementation in this Laravel application. Check password hashing, session management, token handling, and Sanctum/JWT configuration for security issues.
API Security Assessment
Evaluate the API endpoints in this Laravel application for security vulnerabilities. Check rate limiting, authorization, input validation, response sanitization, and mass assignment protection.

最佳實務

  • Always use FormRequest classes for input validation and authorization
  • Apply the principle of least privilege for database and file system access
  • Enable rate limiting on all public API endpoints to prevent abuse

避免

  • Using request()->all() without validation in create or update operations
  • Checking authorization only in controllers without policy enforcement
  • Storing uploaded files in publicly accessible directories without validation

常見問題

What Laravel versions does this skill support?
This skill is designed for Laravel 10 and 11+ applications but can audit older versions with knowledge of version-specific security features.
Can this skill scan my entire codebase automatically?
The skill analyzes code files you provide. For large codebases, provide key files like controllers, models, and middleware for focused security review.
Does this replace penetration testing?
No. This skill provides static code analysis and security guidance. It complements but does not replace professional penetration testing or dynamic security scans.
What OWASP categories does this cover?
Coverage includes Injection, Broken Authentication, Sensitive Data Exposure, XML External Entities, Broken Access Control, Security Misconfiguration, XSS, Insecure Deserialization, and Known Vulnerabilities.
Can this skill fix vulnerabilities automatically?
The skill identifies vulnerabilities and provides secure code examples. You must manually review and implement the recommended fixes in your codebase.
Is my code shared or stored when using this skill?
Code analysis happens within your session. However, avoid sharing sensitive credentials, API keys, or production secrets in any code snippets.

開發者詳情

檔案結構

📄 SKILL.md