Download the PHP package xchimx/laravel-security without Composer
On this page you can find all versions of the php package xchimx/laravel-security. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xchimx/laravel-security
More information about xchimx/laravel-security
Files in xchimx/laravel-security
Package laravel-security
Short Description A Laravel package for automated monitoring of security vulnerabilities and outdated packages in Composer and NPM dependencies.
License MIT
Homepage https://github.com/xchimx/laravel-security
Informations about the package laravel-security
Laravel Security Package
A Laravel package for automated monitoring of security vulnerabilities and outdated packages in Composer and NPM dependencies.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
You can publish the views, or you add this line to your app.css:
Customize the config/security.php file according to your requirements or set the corresponding ENV variables:
Optionally, you can publish the views using
Usage
The package automatically registers the following tasks in the Laravel Scheduler:
- Security Audit: Daily at 02:00 (configurable)
- Outdated Check: Weekly on Mondays at 3:00 a.m. (configurable)
Ensure that the Laravel Scheduler is running:
Manual Usage
Dashboard Component
Integrate the Security Dashboard Component into your Blade views:
Programmatic Access
Notifications
Database notifications
Database notifications are sent to the user ID configured in SECURITY_NOTIFY_USER_ID. If the user has an email address and SECURITY_NOTIFY_DATABASE_MAIL is set to true, the notification is also sent to that address
When database notifications are enabled, notifications are stored in the notifications table. This requires the standard Laravel notifications migration:
Email notifications
Emails are sent to the address configured in SECURITY_MAIL_TO. You can separate multiple addresses with commas:
Slack notifications
Configure your Slack token:
Data model
The security_audits table stores:
type: 'audit' or 'outdated'source: 'composer' or 'npm'results: JSON with details about the issues foundvulnerabilities_count: Number of security vulnerabilitiesoutdated_count: Number of outdated packageshas_issues: Boolean flagraw_output: Raw output of the commandexecuted_at: Time of execution
Requirements
- PHP ^8.3
- Laravel ^13.0
- Composer (installed on the server)
- NPM (Optional if NPM packages are to be checked)
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
Views
Dashboard
Mail Notification
Slack Notification Audit
Slack Notification Outdated
All versions of laravel-security with dependencies
illuminate/contracts Version ^13.0
illuminate/support Version ^13.0
laravel/slack-notification-channel Version ^3.0
spatie/laravel-package-tools Version ^1.16