Gatsby Plugin security.txt
When security risks in web services are discovered by independent security researchers who understand the severity of the risk, they often lack the channels to disclose them properly. As a result, security issues may be communicated on inappropriate channels or left unreported.
security.txt is an Internet draft standard, submitted for RFC review, to help website owners define the process for security researchers to disclose security vulnerabilities securely.
Gatsby plugin "gatsby-plugin-security-txt" creates a text file called security.txt under the .well-known directory (see RFC5785) of your project on every Gatsby build.
Getting Started
-
Install the package with npm or yarn
npm install gatsby-plugin-security-txt
yarn add gatsby-plugin-security-txt
-
Add to plugins in your gatsby-config.js
module.exports = {
plugins: ['gatsby-plugin-security-txt'],
};
- Run
gatsby build
NB The resulting file will appear on path /.well-known/security.txt of your site only after it's built. It is not enough to run gatsby develop
.
Options
Example Options
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-security-txt',
options: {
contact: 'https://www.example.com/johndoe',
expires: '2025-12-31T23:59:59z',
canonical: 'https://www.example.com/.well-known/security.txt',
languages: 'en, es, fr',
},
},
],
};
Example Implementations
A few real-world implementation examples of security.txt
More documentation
A body of additional documentation is growing at https://vacilando.org/article/gatsby-plugin-securitytxt
We also welcome links to sites that make use of this plugin. Send us a representative link to your security.txt and we will consider it for inclusion on the documentation page.
Thanks
The security.txt syntax follows specifications of the excellent security.txt.
Maintenance and development
Developed and maintained by Vacilando since 2020/02/10 — see the main article.
Every contribution is very much appreciated. Feel free to file bugs, feature- and pull-requests.
If this plugin is helpful for you, please star it on GitHub.