feat: add .well-known/security.txt for RFC 9116 compliance#333
feat: add .well-known/security.txt for RFC 9116 compliance#333maoshuorz wants to merge 2 commits intodatabuddy-analytics:mainfrom
Conversation
Adds a security.txt file following RFC 9116 to improve automated discoverability of the project's vulnerability disclosure policy. References the existing SECURITY.md and security@databuddy.cc contact. Closes databuddy-analytics#325
|
@maoshuorz 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
Confidence Score: 1/5
Sequence DiagramsequenceDiagram
participant Scanner as Security Scanner / Researcher
participant Web as databuddy.cc web server
participant NextJS as Next.js App (apps/dashboard or apps/docs)
participant Repo as Repository Root
Scanner->>Web: GET /.well-known/security.txt
Web->>NextJS: Route request to Next.js app
NextJS->>NextJS: Look in public/.well-known/security.txt
NextJS-->>Web: 404 Not Found (file not in public/)
Web-->>Scanner: 404 Not Found
Note over Repo: .well-known/security.txt<br/>exists here but is<br/>never served over HTTP
Note over NextJS: File should be placed at<br/>apps/dashboard/public/.well-known/security.txt<br/>for HTTP discovery to work
Last reviewed commit: 9cf656f |
.well-known/security.txt
Outdated
| Contact: mailto:security@databuddy.cc | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Preferred-Languages: en | ||
| Expires: 2027-03-06T00:00:00.000Z |
There was a problem hiding this comment.
File not served — wrong location in monorepo
This file sits at the repository root, but the web apps in this monorepo are Next.js apps (e.g., apps/dashboard, apps/docs). Next.js only serves static files placed inside each app's public/ directory. A file at the repo root is never served by any of these apps, so https://databuddy.cc/.well-known/security.txt (or whichever domain is the canonical one) will return 404.
For example, apps/docs/public/robots.txt is already served this way — the pattern is established.
The file needs to be placed at apps/dashboard/public/.well-known/security.txt and/or apps/docs/public/.well-known/security.txt, depending on which app owns the root domain. Placing it at the repo root provides no HTTP-accessible endpoint and does not satisfy RFC 9116.
.well-known/security.txt
Outdated
| Contact: mailto:security@databuddy.cc | ||
| Policy: https://github.com/databuddy-analytics/Databuddy/blob/main/SECURITY.md | ||
| Preferred-Languages: en | ||
| Expires: 2027-03-06T00:00:00.000Z |
There was a problem hiding this comment.
Non-standard millisecond precision in Expires timestamp
The value 2027-03-06T00:00:00.000Z includes a sub-second .000 component. RFC 9116 §2.5.5 cites the ISO 8601 standard and its own example uses 2021-12-31T18:37:07z (no fractional seconds). While RFC 3339 technically permits fractional seconds, the standard format without sub-second precision is preferred for maximum compatibility with security.txt validators.
Use the standard RFC 3339 form without fractional seconds:
| Expires: 2027-03-06T00:00:00.000Z | |
| Expires: 2027-03-06T00:00:00Z |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Move from repo root to apps/dashboard/public/.well-known/ so Next.js can serve it at /.well-known/security.txt. Also fix Expires timestamp to use standard RFC 9116 format without milliseconds.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
@greptile-apps Thanks for the review, but I believe both issues mentioned are already addressed:
The diff confirms both: |
|
You're absolutely right on both points—I apologize for the confusion in my previous review.
The file looks good and follows the RFC correctly. Thanks for the clarification! |
Summary
.well-known/security.txtfollowing RFC 9116 for automated vulnerability disclosure discoverabilitySECURITY.mdpolicy andsecurity@databuddy.cccontactCloses #325
Test plan
.well-known/security.txtis accessible and contains valid RFC 9116 fields