Laravel static analysis and taint-based security scanning for Psalm
open sourceMITfree
The Psalm Laravel plugin adds Laravel-aware static analysis to Psalm, with taint analysis that traces user input from request to sink to find SQL injection, XSS, shell injection, file traversal, SSRF, open redirects, timing-unsafe secret comparisons and prompt injection in laravel/ai agents. It boots the Laravel application to resolve facades, config and Eloquent model metadata, adds 13 Laravel-specific checks, can analyse Blade templates, and writes a GitHub Actions workflow that uploads findings to GitHub Code Scanning. Everything runs in your own project and CI. It's maintained in the psalm GitHub organization, separate from Psalm itself.
Problems it solves
- find SQL injection and XSS in a Laravel app before it ships
- run static analysis that understands Laravel facades and Eloquent models
- add security scanning of a Laravel codebase to CI without a paid tool
Features
- Taint analysis from Laravel request input to SQL, HTML, shell, file, HTTP and redirect sinks
- 13 Laravel-aware checks such as undefined model relations and unknown model attributes
- Opt-in analysis of Blade templates
- Boots the Laravel app to resolve facades, config and Eloquent models
- Generates a GitHub Actions workflow that uploads findings to Code Scanning
- Runs locally and in CI with no account or cloud upload
Limitations
Alternatives
The same job
These do what Psalm Laravel plugin does.
