itox-gmbh/laravel-security

Laravel security hardening package

0.0.2 2025-04-23 19:53 UTC

This package is auto-updated.

Last update: 2025-06-16 04:36:33 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require itox-gmbh/laravel-security

You can publish and run the migrations with:

php artisan security:install

Usage

Change the security.php in your config folder to you needs

'enforceSSL' => true,
    'headers' => [
        'hsts' => true,
        'x-frame-options' => 'SAMEORIGIN',
        'x-content-type-options' => 'nosniff',
        'x-xss-protection' => '1; mode=block',
        'permissions-policy' => 'camera=(), microphone=(), geolocation=(), fullscreen=(self), payment=(), accelerometer=(), gyroscope=()',
        'feature-policy' => "camera 'none'; microphone 'none'; geolocation 'none'; fullscreen 'none'; payment 'none'; accelerometer 'none'; gyroscope 'none';",
    ],

Changelog

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

Security Vulnerabilities

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

Credits

License

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