laravel-security-audit
Laravel-Apps auf Sicherheitslücken überprüfen
Laravel-Entwickler müssen sicherstellen, dass ihre Anwendungen bewährte Sicherheitspraktiken befolgen. Diese Fähigkeit bietet umfassende Sicherheitsaudits anhand von OWASP-Standards und Laravel-spezifischem Sicherheitswissen.
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“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'])
安全审计
安全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.
质量评分
你能构建什么
Sicherheitsüberprüfung vor dem Deployment
Überprüfe Laravel-Anwendungscode vor dem Deployment in die Produktion, um Sicherheitslücken zu identifizieren.
Unterstützung bei Code Reviews
Integriere Sicherheitsanalyse in Pull-Request-Reviews, um Schwachstellen frühzeitig zu erkennen.
Legacy-Code-Audit
Bewerte bestehende Laravel-Anwendungen auf Sicherheitsrückstände und Fehlkonfigurationen.
试试这些提示
Review this Laravel controller for security vulnerabilities. Check for proper authorization, input validation, and common OWASP issues.
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.
Audit the authentication implementation in this Laravel application. Check password hashing, session management, token handling, and Sanctum/JWT configuration for security issues.
Evaluate the API endpoints in this Laravel application for security vulnerabilities. Check rate limiting, authorization, input validation, response sanitization, and mass assignment protection.
最佳实践
- Verwende immer FormRequest-Klassen für Eingabevalidierung und Autorisierung
- Wende das Prinzip der geringsten Rechte für Datenbank- und Dateisystemzugriff an
- Aktiviere Rate Limiting auf allen öffentlichen API-Endpunkten, um Missbrauch zu verhindern
避免
- Verwendung von request()->all() ohne Validierung bei create- oder update-Operationen
- Autorisierungsprüfung nur in Controllern ohne Policy-Durchsetzung
- Speicherung hochgeladener Dateien in öffentlich zugänglichen Verzeichnissen ohne Validierung