Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add security.txt #167

Open
Leptopoda opened this issue Sep 22, 2020 · 2 comments
Open

add security.txt #167

Leptopoda opened this issue Sep 22, 2020 · 2 comments

Comments

@Leptopoda
Copy link

@Leptopoda Leptopoda commented Sep 22, 2020

Feature request

Feature description

Add a configuration option for the security.txt file. It could look like:

#security.txt
location /security.txt {
    return 301 http://$host/.well-known/security.txt;
}

location = /.well-known/security.txt {
    alias /<User configurable path>/security.txt
}

Source/ inspired by

How the feature is useful

The security.txt is comparable to the robots.txt and serves contact information etc. to security researchers.
More information can be found on their site.

@Leptopoda
Copy link
Author

@Leptopoda Leptopoda commented Sep 23, 2020

Another option would be generate the security.txt file as well. In this case we could return it directly as plain text.

#security.txt
location /security.txt {
    return 301 http://$host/.well-known/security.txt;
}

location = /.well-known/security.txt {
    default_type text/plain;
    return 200 '
    Contact: mailto:<example@example.me>
    Preferred-Languages: <some language>
    ';
}

The example generator from their website can be found here.

@MattIPv4
Copy link
Member

@MattIPv4 MattIPv4 commented Sep 23, 2020

👍 I think we should go for the former here, providing an option on each site added for a security.txt path. If present, we then include the blocks in the opening comment for that site.

Whilst nginxconfig is 100% a generator tool, I think we should focus on keeping it aimed at generating nginx config parts, not other files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.