psalm/plugin-laravel
Psalm plugin for Laravel that adds deep framework-aware static analysis plus taint-based security scanning. Detects SQL injection, XSS, SSRF, shell injection, file traversal, and open redirects by tracking user input flows across functions and services.
Use this package if:
Look elsewhere if:
*"This plugin turns Laravel’s static analysis into a security powerhouse. By integrating psalm-plugin-laravel, we can:
DB::statement("SELECT * FROM users WHERE name = '" . $request->input('name') . "'");
No false positives—it tracks taint flow across functions, unlike rule-based scanners.*"psalm-plugin-laravel is the missing link between Larastan (type safety) and security. Here’s why it’s a game-changer:
composer require and run ./vendor/bin/psalm. It automatically scans for:
DB::statement(), DB::unprepared()).Response::make() with unescaped user input).Http::get($user_url)).Storage::get($user_path)).--set-baseline to suppress legacy issues and focus on new vulnerabilities.composer.json, run psalm --init, and let it catch vulnerabilities before they reach production."**"This plugin bridges the gap between static analysis and Laravel-specific security risks. Key advantages:
function unsafeQuery(Request $req) { return "SELECT * FROM users WHERE name = '" . $req->input('name') . "'"; }
DB::statement(unsafeQuery($request)); // **Caught**: Taint flows from $request → unsafeQuery → DB::statement().
Hash::make() sanitizes input).How can I help you explore Laravel packages today?