Repository navigation
feat(chart): serve security.txt (RFC 9116) - #721
GeertJohan wants to merge 5 commits into
Conversation
An installation can publish where to report a vulnerability at /.well-known/security.txt on its hostnames. Envoy Gateway answers from a ConfigMap, as it does for the discovery document, so no pod is involved. Off by default. When enabled, the chart requires a contact URI and an expiry date and refuses to render once that date has passed.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Image scan: 6 of 8 images have fixable vulnerabilitiesChart images: bump the tag in
Dockerfile base images: bump the
Fixable high and critical findings; packages in the run summary. Does not block merging. Exploitable for us? Open a private security advisory, do not discuss it here. |
There was a problem hiding this comment.
🟡 Changes recommended
The generated HTTPRoute exceeds Gateway API’s 16-hostname limit with the 20-host local configuration, blocking installation or upgrade, while Canonical URLs omit non-default HTTPS ports and undermine trust in security.txt.
2 open issues
What changed in this PR
Adds optional security.txt support to the Fundament Helm chart so security researchers can find vulnerability-reporting contacts for an installation.
Changes:
- Serves
/.well-known/security.txtthrough an Envoy Gateway direct response and exact-path HTTPRoute. - Validates contact URI prefixes and requires a parseable, unexpired expiration timestamp.
- Adds disabled-by-default configuration for routing, contacts, expiration, languages, and policy.
| File | Description |
|---|---|
| charts/fundament/values.yaml | Documents security.txt settings and defaults. |
| charts/fundament/templates/security-txt.yaml | Validates settings and renders the response ConfigMap, filter, and route. |
Review effort: Balanced
…ntact and canonical An HTTPRoute takes at most 16 hostnames, so a longer list is spread over several routes that share the filter. A contact with whitespace is refused, which also keeps a value from adding a line to the file. Canonical URLs can be set for an installation that is not on port 443. The values comment no longer states a one-year limit the chart does not enforce.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
A canonical URL may not carry a path before /.well-known/security.txt, and an explicit list has to cover every hostname the file is served on. preferredLanguages is checked as a list of language tags, which also refuses a carriage return.
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
A tag starts with 2 to 8 letters, followed by subtags of 1 to 8 letters or digits. Values such as "-", "nl-" or "en--GB" no longer render.
|
@cubic-dev-ai please review the latest commit. |
@GeertJohan I’ve started reviewing the changes since the last completed review. I’ll post the results here when it’s done. |
|
@cubic-dev-ai please review the latest commit. |
@GeertJohan I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
A wildcard hostname has no concrete URL to list as Canonical.

Why this change is needed
A running installation has no way to tell a security researcher where to report a vulnerability. RFC 9116 defines that as a file at
/.well-known/security.txton every host that is reachable over HTTPS, with at least aContactand anExpiresfield.What changed
templates/security-txt.yaml: a ConfigMap, anHTTPRouteFilterdirect response and anHTTPRoutewith an exact path match, the same mechanism as the discovery document. The exact match wins over the prefix route that serves the rest of a hostname, so one route covers every listed hostname.values.yaml:securityTxt, off by default:httproute.parentRefs,httproute.hostnames,contact,expires, and optionalpreferredLanguagesandpolicy. Each hostname gets aCanonicalfield.The chart refuses to render when a contact is not a
mailto:,https://ortel:URI, and whenexpiresis missing, unparseable or in the past. The last check means an upgrade fails once the date has passed, until someone confirms the contact and sets a new date. That is deliberate: an expired file is treated by researchers as stale.Like the discovery document, this needs Envoy Gateway.
Verification
helm templatewith the option on renders the three resources and this body:Each validation failure was rendered once and gives its own message. With default values nothing is rendered, and
helm lintpasses. Not deployed to a cluster.