Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@
help: A link to any security-related job openings in your organisation. Remember to include "https://".
placeholder: https://example.com/jobs.html
spec: 6
-
name: CSAF
id: csaf
tags: ['Optional']
help: A link to the provider-metadata.json of your CSAF (Common Security Advisory Framework) provider. Remember to include "https://".
placeholder: https://example.com/.well-known/csaf/provider-metadata.json
input: url
spec: IANA
url: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#718-requirement-8-securitytxt

recent_changes: >
The date format for Expires has changed to ISO 8601. An example of the new format is <code>Expires: 2021-12-31T18:37:07.000Z</code>.
---
Expand Down Expand Up @@ -163,11 +173,18 @@ <h1 class="title">Step 1</h1>
{% endfor %}
</legend>
<p class="help">
{{ directive.help }} See
<a target="_blank" rel="noopener"
href="https://www.rfc-editor.org/rfc/rfc9116#section-2.5.{{directive.spec}}">
the full description of {{ directive.name }}
</a>
{{ directive.help }} See
{% if directive.spec == 'IANA' %}
<a target="_blank" rel="noopener"
href="{{directive.url}}">
the full description of {{ directive.name }}
</a>
{% else %}
<a target="_blank" rel="noopener"
href="https://www.rfc-editor.org/rfc/rfc9116#section-2.5.{{directive.spec}}">
the full description of {{ directive.name }}
</a>
{% endif %}
</p>
<ul class="list-of-inputs">
{% if directive.input == 'datetime' %}
Expand Down
5 changes: 4 additions & 1 deletion js/genform.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ genform.addEventListener("submit", function(event){
}

generate('security.txt', [
"contact", "expires", "encryption", "acknowledgments", "preferredLanguages", "canonical", "policy", "hiring"
"contact", "expires", "encryption", "acknowledgments", "preferredLanguages", "canonical", "policy", "hiring", "csaf"
]);

scrollToStepTwo()
Expand All @@ -46,6 +46,9 @@ function generate(filename, field_array){
// Converts camel case like 'abcDefGhi' into
// the format 'Abc-Def-Ghi'
function camelToHyphen(camelCaseWord) {
// introduce the special case for CSAF (short term solution)
if (camelCaseWord === "csaf") {return "CSAF"}

var components = camelCaseWord.split(/(?=[A-Z])/) // abcDef => [abc, Def]

return components.map(function (component) {
Expand Down