Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Laravel Security Review (OWASP Top 10)

    by Saizul Amin

    1

    Find and fix mass assignment, SQL injection, XSS, and authorization gaps in Laravel applications.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Laravel Security Review (OWASP Top 10)

    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

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. 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 $guarded or $fillable definitions.
    • SQL injection audit identifies whereRaw, DB::raw, and DB::select calls 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 .env configurations, APP_DEBUG status, and CSRF middleware exceptions.
    • Dependency auditing runs composer audit to identify known CVEs in your PHP packages.

    How it works

    1. Root Analysis: Identify the Laravel version and locate key configuration files like artisan and composer.json.
    2. Automated Scan: Run the laravel_security_scan.py script against the full project or specific changed files in a PR.
    3. Manual Triage: Verify automated findings against route middleware, gate definitions, and sanitization logic to eliminate false positives.
    4. Manual Checklist: Execute secondary checks for file upload validation, rate limiting, and secret exposure.
    5. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

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

    Frequently Asked Questions

    The skill is optimized for Laravel versions 8.0 through 12.x, accounting for architectural shifts like the simplified directory structure introduced in Laravel 11.

    Unlike generic AI prompts, this skill uses a specialized scanner that understands Laravel-specific concepts like Eloquent mass assignment and Blade escaping, significantly reducing the hallucinations and false positives common with general-purpose models.

    The skill focuses on application-level logic; it does not audit server-side infrastructure, OS-level hardening, or network configurations like firewalls and SSL certificates.

    Upon purchase, you receive the full automation script, the structured manual triage framework, a remediation report template, and integration guides for running the review via CLI or within a CI/CD pipeline.

    While the automated scan is fast, the full multi-step triage process typically takes 5–15 minutes depending on the size of your codebase and the number of custom Eloquent models to be analyzed.

    New in APIs & Backend