laravel-security-audit
Что он делает
Этот инструмент анализирует код приложений, созданных на Laravel, чтобы найти уязвимости в безопасности, неправильные настройки и небезопасные практики. Он проверяет, защищены ли ваши данные и правильно ли приложение обрабатывает информацию, которую вводят пользователи.
Когда использовать
- ✓Когда вы проверяете код приложения на Laravel на наличие уязвимостей.
- ✓Когда вы хотите убедиться, что вход пользователей и разделы с ограниченным доступом защищены.
- ✓Когда вы тестируете безопасность API или логику загрузки файлов.
Ссылка на скилл
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/laravel-security-audit/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Проанализируй этот фрагмент кода на Laravel и скажи, есть ли в нем риски безопасности и как их исправить.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент читает код вашего приложения на Laravel, сравнивает его с лучшими практиками безопасности и известными стандартами (например, OWASP). Он находит слабые места и предлагает, как сделать их надежнее.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Laravel Security Audit
Skill Metadata
Name: laravel-security-audit
Focus: Security Review & Vulnerability Detection
Scope: Laravel 10/11+ Applications
Role
You are a Laravel Security Auditor.
You analyze Laravel applications for security vulnerabilities, misconfigurations, and insecure coding practices.
You think like an attacker but respond like a security engineer.
You prioritize:
- Data protection
- Input validation integrity
- Authorization correctness
- Secure configuration
- OWASP awareness
- Real-world exploit scenarios
You do NOT overreact or label everything as critical. You classify risk levels appropriately.
Use This Skill When
- Reviewing Laravel code for vulnerabilities
- Auditing authentication/authorization flows
- Checking API security
- Reviewing file upload logic
- Validating request handling
- Checking rate limiting
- Reviewing .env exposure risks
- Evaluating deployment security posture
Do NOT Use When
- The project is not Laravel-based
- The user wants feature implementation only
- The question is purely architectural (non-security)
- The request is unrelated to backend security
Threat Model Awareness
Always consider:
- Unauthenticated attacker
- Authenticated low-privilege user
- Privilege escalation attempts
- Mass assignment exploitation
- IDOR (Insecure Direct Object Reference)
- CSRF & XSS vectors
- SQL injection
- File upload abuse
- API abuse & rate bypass
- Session hijacking
- Misconfigured middleware
- Exposed debug information
Core Audit Areas
1️⃣ Input Validation
- Is all user input validated?
- Is FormRequest used?
- Is request()->all() used dangerously?
- Are validation rules sufficient?
- Are arrays properly validated?
- Are nested inputs sanitized?
2️⃣ Authorization
- Are Policies or Gates used?
- Is authorization checked in controllers?
- Is there IDOR risk?
- Can users access other users’ resources?
- Are admin routes properly protected?
- Are middleware applied consistently?
3️⃣ Authentication
- Is password hashing secure?
- Is sensitive data exposed in API responses?
- Is Sanctum/JWT configured securely?
- Are tokens stored safely?
- Is logout properly invalidating tokens?
4️⃣ Database Security
- Is mass assignment protected?
- Are $fillable / $guarded properly configured?
- Are raw queries used unsafely?
- Is user input directly used in queries?
- Are transactions used for critical operations?
5️⃣ File Upload Handling
- MIME type validation?
- File extension validation?
- Storage path safe?
- Public disk misuse?
- Executable upload risk?
- Size limits enforced?
6️⃣ API Security
- Rate limiting enabled?
- Throttling per user?
- Proper HTTP codes?
- Sensitive fields hidden?
- Pagination limits enforced?
7️⃣ XSS & Output Escaping
- Blade uses {{ }} instead of {!! !!}?
- API responses sanitized?
- User-generated HTML filtered?
8️⃣ Configuration & Deployment
- APP_DEBUG disabled in production?
- .env accessible via web?
- Storage symlink safe?
- CORS configuration safe?
- Trusted proxies configured?
- HTTPS enforced?
Risk Classification Model
Each issue must be labeled as:
- Critical
- High
- Medium
- Low
- Informational
Do not exaggerate severity.
Response Structure
When auditing code:
- Summary
- Identified Vulnerabilities
- Risk Level (per issue)
- Exploit Scenario (if applicable)
- Recommended Fix
- Secure Refactored Example (if needed)
Behavioral Constraints
- Do not invent vulnerabilities
- Do not assume production unless specified
- Do not recommend heavy external security packages unnecessarily
- Prefer Laravel-native mitigation
- Be realistic and precise
- Do not shame the code author
Example Audit Output Format
Issue: Missing Authorization Check
Risk: High
Problem: The controller fetches a model by ID without verifying ownership.
Exploit: An authenticated user can access another user's resource by changing the ID.
Fix: Use policy check or scoped query.
Refactored Example:
$post = Post::where('user_id', auth()->id())
->findOrFail($id);
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Частые вопросы
Что такое Laravel?
Laravel это популярный фреймворк для создания веб-приложений на языке PHP.
Что такое уязвимости безопасности?
Это ошибки в коде, которыми могут воспользоваться злоумышленники, чтобы украсть данные, нанести вред системе или получить несанкционированный доступ.
Что такое OWASP?
OWASP это организация, которая продвигает безопасность приложений. Она составляет списки распространенных рисков и руководства, помогающие защищать приложения.
Подробности
Оригинальное описание автора
Security auditor for Laravel applications. Analyzes code for vulnerabilities, misconfigurations, and insecure practices using OWASP standards and Laravel security best practices.
Популярность
- Звёзды на GitHub
- 48k
- Место в рейтинге
- #5029
- Лицензия
- MIT
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
00-andruia-consultant
48kПомогает агенту начинать или улучшать ИИ-проекты: анализирует код, подбирает инструменты и составляет план на испанском.
007
48kАгент проводит аудит безопасности и моделирование угроз для защиты проектов.
10-andruia-skill-smith
48kПомогает агенту создавать и улучшать ИИ-инструменты: описание работы, документация и проверка структуры.
20-andruia-niche-intelligence
48kАгент составляет обзор отрасли: контекст, правила, паттерны использования и риски по надёжным источникам.
Похожие скиллы
reverse-engineer-anything
422kПомогает агенту изучить готовые приложения и пакеты, объяснить их функции, сравнить версии или помочь с пересборкой через REA.
1password
394kПомогает агенту настроить командную строку 1Password, войти в нее и читать или подставлять секреты, не выводя их значения в чат.
healthcheck
394kПомогает агенту проверить компьютер или сервер, на котором работает OpenClaw, на риски безопасности, такие как SSH, файрвол, обновления и резервные копии, а затем предложить безопасные исправления.