chore: add .well-known/security.txt for RFC 9116 compliance#404
chore: add .well-known/security.txt for RFC 9116 compliance#404jaysu66 wants to merge 2 commits intodatabuddy-analytics:mainfrom
Conversation
|
@jaysu66 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 |
izadoesdev
left a comment
There was a problem hiding this comment.
Hey @jaysu66 — welcome to Databuddy! Thanks for the contribution 🎉 Great to have you here.
Summary
Adds a .well-known/security.txt file per RFC 9116 with the existing security@databuddy.cc contact, a link to SECURITY.md, and an expiry date of 2027-04-10. Clean, well-scoped change that closes #325.
Review
No security, performance, or type safety concerns — this is a static metadata file with no runtime impact.
🟡 Warning — File location may not be served correctly
The file is placed at .well-known/security.txt in the repo root. For this to actually be accessible at https://databuddy.cc/.well-known/security.txt, it typically needs to live inside the web app's static/public directory (e.g. public/.well-known/security.txt for Next.js). If the deployment pipeline already copies repo-root files into the served directory, this is fine — but worth confirming so security researchers can actually discover it.
🔵 Suggestion — Canonical URL field
RFC 9116 recommends including a Canonical field pointing to the canonical URL of the security.txt file itself (e.g. Canonical: https://databuddy.cc/.well-known/security.txt). Not required, but it helps prevent spoofing and is considered a best practice.
Assessment
Looks good for merge once the file path is confirmed to be served correctly by the web app. The content itself is clean and follows the RFC spec well. Nice PR description too — clear context and linked issue.
Greptile SummaryThis PR adds a
Confidence Score: 4/5Not safe to merge as-is — the file won't be reachable in production until relocated into an app's public directory. A P1 finding blocks the primary goal of this PR: the security.txt file placed at the repo root is never served over HTTP in this monorepo architecture, making the RFC 9116 addition a no-op. The fix is straightforward (move the file to the correct
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Security Researcher] -->|GET /.well-known/security.txt| B{Where is the file served from?}
B -->|Current: repo root| C[❌ Not served — file unreachable]
B -->|Correct: app public dir| D[✅ apps/dashboard/public/.well-known/security.txt]
D --> E[Next.js serves static file]
E --> F[RFC 9116 compliant response]
C --> G[404 — no RFC 9116 benefit]
Reviews (1): Last reviewed commit: "chore: add .well-known/security.txt" | Re-trigger Greptile |
| Contact: mailto:security@databuddy.cc | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Expires: 2027-04-10T00:00:00.000Z | ||
| Preferred-Languages: en |
There was a problem hiding this comment.
File won't be served at
/.well-known/security.txt
Placing this file at the repository root does not make it accessible via HTTP. In this monorepo, the Next.js dashboard serves static files from apps/dashboard/public/ — a file needs to live there (and/or in apps/docs/public/) for it to be reachable at https://[domain]/.well-known/security.txt. Without that, the file exists only in version control and no automated scanner or security researcher will actually find it, defeating the RFC 9116 goal entirely.
Move the file to the correct public directory of whichever app owns the primary domain:
apps/dashboard/public/.well-known/security.txt
apps/docs/public/.well-known/security.txt # if docs is the main public domain
| Contact: mailto:security@databuddy.cc | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Expires: 2027-04-10T00:00:00.000Z | ||
| Preferred-Languages: en |
Per reviewer feedback: file needs to be in apps/dashboard/public/.well-known/ to be served at https://databuddy.cc/.well-known/security.txt by Next.js. Also adds RFC 9116 recommended Canonical field.
|
Good catch — moved the file to |
Adds .well-known/security.txt per RFC 9116 to improve automated discoverability for security researchers.
References the existing security@databuddy.cc contact and SECURITY.md policy without modifying the current workflow.
Closes #325