Download the PHP package ozankurt/laravel-security without Composer

On this page you can find all versions of the php package ozankurt/laravel-security. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-security

Web Application Firewall (WAF) package for Laravel

Downloads Tests StyleCI

This package intends to protect your Laravel app from different type of attacks such as XSS, SQLi, RFI, LFI, User Agent, and a lot more. It will also block repeated attacks and send notification via email and/or slack when attack is detected. Furthermore, it will log failed logins and block the IP after a number of attempts.

Note: Some middleware classes (i.e. Xss) are empty as the Middleware abstract class that they extend does all of the job, dynamically. In short, they all works ;)

Getting Started

1. Install

Run the following command:

2. Publish

Publish configuration, language, and migrations

3. Database

Create db tables

4. Configure

You can change the security settings of your app from config/security.php file

Usage

Middlewares are already defined so should just add them to routes. The firewall.all middleware applies all the middlewares available in the all_middleware array of config file.

You can apply each middleware per route. For example, you can allow only whitelisted IPs to access admin:

Or you can get notified when anyone NOT in whitelist access admin, by adding it to the inspections config:

Available middlewares applicable to routes:

You may also define routes for each middleware in config/security.php and apply that middleware or firewall.all at the top of all routes.

Notifications

Firewall will send a notification as soon as an attack has been detected. Emails entered in notifications.email.to config must be valid Laravel users in order to send notifications. Check out the Notifications documentation of Laravel for further information.

Dashboard

In order to view the dashboard, you must enable it in your AppServiceProvider:

.env Variables

Changelog

Please see Releases for more information on what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

Please review our security policy on how to report security vulnerabilities.

Credits

Todo

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of laravel-security with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/framework Version ^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^7.4
ozankurt/agent Version ^1.0
voku/anti-xss Version ~4.1.42
voku/portable-utf8 Version ^6.0.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ozankurt/laravel-security contains the following files

Loading the files please wait ....