Download the PHP package austinheap/laravel-security-txt without Composer
On this page you can find all versions of the php package austinheap/laravel-security-txt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download austinheap/laravel-security-txt
More information about austinheap/laravel-security-txt
Files in austinheap/laravel-security-txt
Package laravel-security-txt
Short Description A package for serving `security.txt` in Laravel 5.5+, based on configuration settings.
License MIT
Homepage https://github.com/austinheap/laravel-security-txt
Informations about the package laravel-security-txt
Laravel 5.5+ security.txt
Package
A package for serving security.txt
in Laravel 5.5+, based on configuration settings.
The purpose of this project is to create a set-it-and-forget-it package that can be
installed without much effort to get a Laravel project compliant with the current
security.txt
spec. It is therefore highly opinionated
but built for configuration.
When enabled, it allows access to all clients and serves up the security.txt
.
Otherwise, it operates almost identically to Laravel's default configuration,
denying access to all clients.
security.txt
is a draft
"standard" which allows websites to define security policies. This "standard"
sets clear guidelines for security researchers on how to report security issues,
and allows bug bounty programs to define a scope. Security.txt is the equivalent
of robots.txt
, but for security issues.
There is documentation for laravel-security-txt
online,
the source of which is in the docs/
directory. The most logical place to start are the docs for the SecurityTxt
class.
Table of Contents
- Summary
- Installation
- Step 1: Composer
- Step 2: Remove any existing
security.txt
- Step 3: Enable the package (Optional)
- Step 4: Configure the package
- Full
.env
Example - Unit Tests
- References
- Credits
- License
Installation
Step 1: Composer
Via Composer command line:
Or add the package to your composer.json
:
Step 2: Remove any existing security.txt
Laravel doesn't ship with a default security.txt
file. If you have added one, it needs to be removed for the configured route to work.
Step 3: Enable the package (Optional)
This package implements Laravel 5.5's auto-discovery feature. After you install it the package provider and facade are added automatically.
If you would like to declare the provider and/or alias explicitly, then add the service provider to your config/app.php
:
Add the service provider to your config/app.php
:
And then add the alias to your config/app.php
:
Step 4: Configure the package
Publish the package config file:
You may now allow clients via security.txt
by editing the config/security-txt.php
file, opening up the route to the public:
Or simply setting the the SECURITY_TXT_ENABLED
environment variable to true, via the Laravel .env
file or hosting environment.
Full .env
Example
After installing the package with composer, simply add the following to your .env file:
Now point your browser to http://your-site.com/.well-known/security.txt
and you should see:
Unit Tests
This package has aggressive unit tests built with the wonderful orchestral/testbench package which is built on top of PHPUnit.
There are code coverage reports for laravel-security-txt
available online.
References
Credits
This is a fork of InfusionWeb/laravel-robots-route, which was a fork of ellisthedev/laravel-5-robots, which was a fork of jayhealey/Robots, which was based on earlier work.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-security-txt with dependencies
laravel/framework Version 5.5.*|5.6.*
austinheap/php-security-txt Version ^0.4