Add .well-known/security.txt for RFC 9116 compliance#355
Add .well-known/security.txt for RFC 9116 compliance#355mendarb wants to merge 1 commit intodatabuddy-analytics:mainfrom
Conversation
Closes databuddy-analytics#325 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@mendar is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a Key issues found:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Researcher as Security Researcher
participant Domain as databuddy.cc
participant App as Web App public dir
Researcher->>Domain: GET /.well-known/security.txt
Domain-->>Researcher: 404 Not Found
note over Domain: File only exists at repo root,<br/>not in any app public/ dir
note over Researcher,App: After fixes applied
App->>Domain: Serves file from public/.well-known/security.txt
Researcher->>Domain: GET /.well-known/security.txt
Domain-->>Researcher: 200 OK with correct Canonical URL
Researcher->>Researcher: Validates Canonical matches request URL
Last reviewed commit: "Add .well-known/secu..." |
| Expires: 2027-03-21T00:00:00.000Z | ||
| Preferred-Languages: en | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Canonical: https://github.com/databuddy-analytics/Databuddy/blob/main/.well-known/security.txt |
There was a problem hiding this comment.
Canonical URL points to GitHub, not the actual served location
RFC 9116 §2.5 requires the Canonical field to contain the HTTPS URI on the web host where the file is served — it is used by validators and security researchers to confirm they've reached the authoritative copy. Pointing it at github.com/…/blob/main/… (the GitHub file-browser view, which is neither the served domain nor a raw file) defeats this purpose entirely.
The value should be the URL at which your server will actually respond to requests, e.g.:
| Canonical: https://github.com/databuddy-analytics/Databuddy/blob/main/.well-known/security.txt | |
| Canonical: https://databuddy.cc/.well-known/security.txt |
Replace databuddy.cc with the correct primary domain if it differs.
| Contact: mailto:security@databuddy.cc | ||
| Expires: 2027-03-21T00:00:00.000Z | ||
| Preferred-Languages: en | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Canonical: https://github.com/databuddy-analytics/Databuddy/blob/main/.well-known/security.txt |
There was a problem hiding this comment.
File placed at repo root — not copied into any web app's
public/ directory
For this file to actually be reachable at https://<domain>/.well-known/security.txt, it must be placed where the web server (or framework) will serve it as a static asset. All the apps in this monorepo that serve HTTP use their own public/ directory (e.g., apps/dashboard/public/, apps/docs/public/). Placing the file only at the repository root means it will never be picked up by any of those apps.
Wherever the main databuddy.cc domain resolves (likely apps/dashboard or apps/docs), the file should be placed at:
apps/<main-app>/public/.well-known/security.txt
Without this, the RFC 9116 endpoint simply won't exist on the live domain, even though the repository file looks correct.
| Contact: mailto:security@databuddy.cc | ||
| Expires: 2027-03-21T00:00:00.000Z | ||
| Preferred-Languages: en | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md |
There was a problem hiding this comment.
Policy URL resolves to the GitHub HTML viewer, not a raw/web page
The Policy field currently links to the GitHub blob viewer. While this is technically accessible to humans, security automation tools and some validators expect either a raw file URL or a proper web page. Consider pointing to the raw content URL or hosting the policy on your own domain:
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | |
| Policy: https://raw.githubusercontent.com/databuddy-analytics/Databuddy/main/SECURITY.md |
(Or better, a rendered page at https://databuddy.cc/security if one exists.)
Summary
.well-known/security.txtper RFC 9116 with contact, expiry (1 year), preferred languages, policy link, and canonical URLSECURITY.mdCloses #325