The discussion revolves around adding a feature to create and add a ‘security.txt’ file for Discourse forums. JoshuaH requested this feature, citing its purpose of helping security researchers contact companies about security issues. pfaffman suggested a custom plugin as a short-term solution, but JoshuaH wants a built-in feature.
Jagster questioned why Discourse should host the security.txt file, suggesting it’s normally static and tied to the organization, and that Nginx should host webserver-level things like the well-known directory.
supermathie proposed using a permalink to host the security.txt file, providing an example. pfaffman built upon this idea, suggesting creating a hidden topic, making it unlisted, and using the post_id to create a permalink to the raw text of the post. This allows for a text URL like /posts/1093/raw to be used as the security.txt file.
supermathie praised this hack, combining a permalink with a raw link to get just the text.
I have not found a possibility to add a security.txt file to our Discourse forums ans was wondering if it would be possible to add that possibility.
It would be great if there’s an option to add this file (which should land in rootwebsite/.well-known/security.txt) and fill in the necessary parameters within Settings > Security for example.
As stated on their website:
The main purpose of security.txt is to help make things easier for companies and security researchers when trying to secure platforms. Thanks to security.txt, security researchers can easily get in touch with companies about security issues.
Create a topic somewhere hidden; make it unlisted; move it somewhere public. Add .json to the copy URL to get the post_id of the OP. Then use that URL in the permalink. Then you can get the URL of the raw text of that post with a URL like /posts/1093/raw (where 1093 is the post_id of your topic.