Skip to content

Commit

Permalink
Create SECURITY.md (#2002)
Browse files Browse the repository at this point in the history
* Create SECURITY.md
* DRY the documentation
* Add to published documentation
  • Loading branch information
pablobm committed Jun 17, 2021
1 parent 9071a7e commit c0f32ed
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Expand Up @@ -106,11 +106,7 @@ Issues and PRs are split into two levels of labels, at the higher level:

## Security

For security inquiries or vulnerability reports, please email
<security@thoughtbot.com>.
If you'd like, you can use our [PGP key] when reporting vulnerabilities.

[PGP key]: https://thoughtbot.com/thoughtbot.asc
See the [security policy](./SECURITY.md).

## Releasing

Expand Down
14 changes: 14 additions & 0 deletions SECURITY.md
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

Only the the latest version of Administrate is supported at a given time. If you find
a security issue with an older version, please try updating to the latest version first.

If for some reason you can't update to the latest version, please let us know your reasons
so that we can have a better understanding of your situation.

## Reporting a Vulnerability

For security inquiries or vulnerability reports, please email security@thoughtbot.com.
If you'd like, you can use our PGP key when reporting vulnerabilities.
2 changes: 2 additions & 0 deletions spec/example_app/app/controllers/docs_controller.rb
Expand Up @@ -9,6 +9,8 @@ def show
render_page("CONTRIBUTING", "Contributing Guide")
when "license", "LICENSE"
render_page("LICENSE", "LICENSE")
when "security", "SECURITY"
render_page("SECURITY", "Security Policy")
else
render_page("docs/#{params[:page]}")
end
Expand Down
12 changes: 12 additions & 0 deletions spec/features/documentation_spec.rb
Expand Up @@ -39,6 +39,18 @@
expect(page).to have_content("The MIT License (MIT)")
end

it "shows the Security Policy in both forms" do
visit("/security")

expect(page).to have_css("div.main h1", text: "Security Policy")
expect(page).to have_content("security inquiries")

visit("/SECURITY.md")

expect(page).to have_css("div.main h1", text: "Security Policy")
expect(page).to have_content("security inquiries")
end

it "shows other docs pages" do
visit("/getting_started")

Expand Down

0 comments on commit c0f32ed

Please sign in to comment.