Skip to content

Make security.txt readable by RFC 9116 tooling - #17391

Merged
stevejalim merged 2 commits into
mozilla:mainfrom
dkautomation23:security-txt-rfc-9116
Sep 21, 2026
Merged

stevejalim merged 2 commits into
mozilla:mainfrom
dkautomation23:security-txt-rfc-9116

Conversation

@dkautomation23

Copy link
Copy Markdown
Contributor

The file served at https://www.mozilla.org/.well-known/security.txt predates RFC 9116 and uses field names the RFC does not define — Email, Main info, Bounty program.

A conforming parser reads no Contact and no Expires from it — the two fields the RFC makes mandatory — and treats the file as invalid. In practice an automated pipeline looking up where to report a vulnerability in a Mozilla property finds nothing, even though the address is in the file.

This keeps the same three pieces of information, in the field names the RFC defines:

  • the address becomes Contact: (as a mailto: URI, which §2.5.3 requires)
  • the bug-bounty page becomes Policy:
  • the security overview stays as a comment
  • Expires: is added, dated a year out (§2.5.5's recommended upper bound)
  • Canonical: is added so a copy found elsewhere can be checked against this one

Verified against the file as currently published:

before: 2 blockers  — no Contact field, no Expires field
after:  0 blockers, 0 warnings

Two things for you to decide: the Expires date (placeholder a year out — set it to your renewal cadence), and whether to keep the human-readable lines as comments (done here) or drop them.

The file at https://www.mozilla.org/.well-known/security.txt predates RFC 9116
and uses field names the RFC does not define - Email, Main info, Bounty
program. A conforming parser therefore finds no Contact field and no Expires
field, which are the two the RFC makes mandatory, and treats the file as
invalid. In practice that means an automated vulnerability-reporting pipeline
looking up where to report a bug in a Mozilla property finds nothing, even
though the address is right there in the file.

Same three pieces of information, in the field names the RFC defines: the
address becomes Contact, the bug bounty page becomes Policy, and the overview
page stays as a comment. Expires is dated a year out, the upper bound section
2.5.5 recommends. Canonical is added so a copy found elsewhere can be checked
against this one.

Checked with well-known-audit against the file as published:
  before: 2 blockers - no Contact field, no Expires field
  after:  0 blockers, 0 warnings
@dkautomation23
dkautomation23 requested a review from a team as a code owner September 20, 2026 12:10

@mozfreddyb mozfreddyb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to revisit the file every year. Ideally, we would just leave the Expiry but that's in violation of the RFC.

Let's do +10 years. I also don't think there's a lot of value in having some automated updater here. That just seems like more work than necessary

Comment thread bedrock/mozorg/templates/mozorg/security.txt Outdated
@mozfreddyb

Copy link
Copy Markdown
Contributor

Thanks for the pull request. Please change the date to give us additional 10 years before this expires and then it's ready to go.

@mozilla/bedrock-team No need to flag security again for a review, once this suggested change is applied.

Co-authored-by: Frederik Braun <fbraun+gh@mozilla.com>
@stevejalim

Copy link
Copy Markdown
Contributor

Thanks for the contribution @dkautomation23! I hope this helps improve the stats on https://dkautomation23.github.io/security-txt-survey.html - nice work!

@stevejalim
stevejalim added this pull request to the merge queue Sep 21, 2026
Merged via the queue into mozilla:main with commit 1d33472 Sep 21, 2026
stevejalim added a commit to mozmeao/springfield that referenced this pull request Sep 21, 2026
Port of mozilla/bedrock#17391. The file used field names RFC 9116 does
not define (Email, Main info, Bounty program), so conforming parsers saw
no Contact or Expires and treated it as invalid. Same three pieces of
information, in the RFC's field names, plus Expires, Preferred-Languages
and a Canonical URL pointing at www.firefox.com.
bluewave41 pushed a commit to mozmeao/springfield that referenced this pull request Sep 22, 2026
Port of mozilla/bedrock#17391. The file used field names RFC 9116 does
not define (Email, Main info, Bounty program), so conforming parsers saw
no Contact or Expires and treated it as invalid. Same three pieces of
information, in the RFC's field names, plus Expires, Preferred-Languages
and a Canonical URL pointing at www.firefox.com.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants