- Home
- Skills
- APIs & Backend
- Laravel Security Review (OWASP Top 10)
Works with the AI Agents you already use
Laravel Security Review (OWASP Top 10)
by Saizul Amin
Find and fix mass assignment, SQL injection, XSS, and authorization gaps in Laravel applications.
$12
Laravel Security Review (OWASP Top 10)
Example session with this skill installed
Run the Laravel Security Review skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the laravel security review
Here is what the Laravel Security Review (OWASP Top 10) skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
laravel security scan: 12 high, 0 medium, 0 low, 0 info
HIGH .env.production:2 [debug] APP_DEBUG=true in .env.production with APP_ENV=production
> APP_DEBUG=true
fix: Ship APP_DEBUG=false; examples copied to servers should default to false.
HIGH app/Http/Controllers/PostController.php:15 [raw-sql] ->whereRaw built with interpolated/concatenated values
> ->whereRaw("title LIKE '%{$request->q}%'")
fix: Use bindings: ->whereRaw('price > ?', [$price]) or DB::select('... = ?', [$id]).
HIGH app/Http/Controllers/PostController.php:18 [raw-sql] DB::select built with interpolated/concatenated values
> $total = DB::select('select count(*) as c from posts where user_id = ' . $request->user()->id);
fix: Use bindings: ->whereRaw('price > ?', [$price]) or DB::select('... = ?', [$id]).
HIGH app/Http/Controllers/PostController.php:28 [mass-assignment] unfiltered request data passed to a model write
> $post = Post::create($request->all());
fix: Use $request->validated() from a FormRequest, or $request->only([...]).
HIGH app/Http/Controllers/PostController.php:35 [mass-assignment] unfiltered request data passed to a model write
> $post->update($request->all());
fix: Use $request->validated() from a FormRequest, or $request->only([...]).
HIGH app/Http/Controllers/PostController.php:49 [dangerous-call] unserialize() called with request input
> $data = unserialize($request->input('payload'));
fix: Never pass user input to these functions; use json_decode, Process with an argument array, or an allow-list.
HIGH app/Http/Middleware/VerifyCsrfToken.php:10 [csrf] CSRF protection disabled for every route ('*')
> '*',
fix: Remove '*'; list only webhook URIs that verify their own signatures.
HIGH app/Models/Post.php:10 [mass-assignment] model has $guarded = [] (every attribute is mass assignable)
> protected $guarded = [];
fix: List assignable columns in $fillable, or guard sensitive ones (is_admin, role, user_id).
HIGH bootstrap/app.php:5 [csrf] CSRF protection disabled for every route ('*')
> $middleware->validateCsrfTokens(except: ['*']);
fix: Remove '*'; list only webhook URIs that verify their own signatures.
HIGH config/app.php:5 [debug] 'debug' => true hard-coded in config/app.php
> 'debug' => true,
fix: Use 'debug' => (bool) env('APP_DEBUG', false).
HIGH config/cors.php:5 [cors] CORS allows any origin with credentials
> 'allowed_origins' => ['*'],
fix: List your front-end origins explicitly when supports_credentials is true.
HIGH resources/views/post.blade.php:3 [blade-unescaped] unescaped Blade output of request data
> <p>Search: {!! request('q') !!}</p>
fix: Use {{ }}; if HTML is required, sanitize it first (e.g. a purifier) and document why.
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Ship your Laravel application with confidence by catching common vulnerabilities before they reach production. This skill automates the detection of critical security flaws that text-based linters often miss, focusing on Laravel-specific patterns like mass assignment, SQL injection in raw queries, and improper Blade escaping. It combines automated scanning with a structured manual triage process to distinguish between real threats and false positives.
What it does
- Mass assignment detection scans for
$request->all()in Eloquent create/update methods and unsafe$guardedor$fillabledefinitions. - SQL injection audit identifies
whereRaw,DB::raw, andDB::selectcalls using interpolated variables instead of bindings. - XSS prevention flags unescaped Blade output
{!! !!}and tracks whether the source is user-controllable. - Access control review checks for controllers missing authorization logic, policies, or middleware protection.
- Environment hardening verifies
.envconfigurations,APP_DEBUGstatus, and CSRF middleware exceptions. - Dependency auditing runs
composer auditto identify known CVEs in your PHP packages.
How it works
- Root Analysis: Identify the Laravel version and locate key configuration files like
artisanandcomposer.json. - Automated Scan: Run the
laravel_security_scan.pyscript against the full project or specific changed files in a PR. - Manual Triage: Verify automated findings against route middleware, gate definitions, and sanitization logic to eliminate false positives.
- Manual Checklist: Execute secondary checks for file upload validation, rate limiting, and secret exposure.
- Remediation: Provide a categorized report with file locations, risk explanations, and code fixes.
Frameworks & tools
Specifically built for Laravel 8 through 12. Utilizes Python for static analysis, PHP/Composer for dependency auditing, and integrates with artisan test for regression verification.
Why this beats prompting it yourself
Generic security prompts often miss Laravel's specific middleware-based authorization or fail to account for the difference between Laravel 10 and 11 configuration structures. This skill uses a specialized scanner and a multi-step triage process that understands Eloquent relationships and Blade syntax nuances.
Use cases
- Auditing a legacy codebase before starting a refactor.
- Reviewing a pull request for potential security regressions.
- Preparing a production-ready checklist for a new application launch.
- Responding to a vulnerability report or pentest finding.
Known limitations
This skill focuses on application-level code and does not audit server-level hardening like SSH, firewalls, or host TLS configurations. It assumes standard Laravel conventions.
Open source: saizul/laravel-php-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Focuses on application code, not server/OS hardening. Requires Laravel 8-12. Static analysis may require manual triage for authorization false positives.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Git
Python 3.8+