Welcome to the Livewire Injection Stopper documentation. This package provides comprehensive security for your Laravel + Livewire applications.
- Installation Guide - Get started quickly
- Middleware Configuration - Configure bot blocking
- Security Audit - Scan for vulnerabilities
- Livewire Security - Best practices and attack examples
- Testing Guide - Run and write tests
Automatically blocks spam robots and malicious bots based on:
- User-Agent headers (Python Requests, curl, wget, etc.)
- IP addresses
- Configurable whitelist for legitimate API access
Scans your Livewire components for property injection vulnerabilities:
- Detects unprotected public properties
- Classifies severity (CRITICAL, HIGH, MEDIUM)
- Provides actionable fix recommendations
- Integrates with CI/CD pipelines
Silences bot-driven Livewire exceptions from error trackers:
CannotUpdateLockedPropertyException- Livewire property assignment
TypeErrorexceptions caused by malicious payloads
Returns a configurable block response while optionally logging locally.
composer require darvis/livewire-injection-stopperphp artisan vendor:publish --tag=livewire-injection-stopper-configphp artisan livewire-injection-stopper:audit- Start with Installation
- Read Livewire Security to understand the threats
- Run the Security Audit
- Configure the Middleware
- Review Testing Guide
- Understand Livewire Security patterns
- Integrate audit into your CI/CD
- Read Livewire Security for attack vectors
- Review Security Audit capabilities
- Implement automated scanning
The middleware is automatically applied to all web routes upon installation. No additional configuration required for basic protection.
If your app has a custom app/Exceptions/Handler.php with manual Sentry reporting in report(), add a guard to skip reporting when the package marks an exception as silenced.
The security audit uses pattern matching to identify:
- Authorization flags (
$isAdmin,$canEdit) - Model instances (
User,Cart) - Business logic limits (
$maxQuantity) - Configuration values (
$locale)
The audit is designed to minimize false positives while catching real vulnerabilities. All detections include:
- File path and line number
- Property name and type
- Severity classification
- Fix recommendation
The middleware automatically blocks automated form submissions from bots.
The security audit detects vulnerable price/quantity properties in e-commerce components.
Identifies authorization flags that could be manipulated to gain admin access.
Whitelist legitimate API endpoints while blocking automated scrapers.
- Email: info@arvid.nl
- Issues: GitHub Issues
- Security: Report vulnerabilities privately to info@arvid.nl
Contributions are welcome! Please:
- Include tests for new features
- Follow PSR-12 coding standards
- Update documentation
- Run full test suite before submitting
MIT License - see LICENSE file for details
Developed by Arvid de Jong