Skip to content

feat(chart): serve security.txt (RFC 9116) - #721

Open
GeertJohan wants to merge 5 commits into
masterfrom
chart-security-txt
Open

GeertJohan wants to merge 5 commits into
masterfrom
chart-security-txt

Conversation

@GeertJohan

@GeertJohan GeertJohan commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

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.txt on every host that is reachable over HTTPS, with at least a Contact and an Expires field.

What changed

  • templates/security-txt.yaml: a ConfigMap, an HTTPRouteFilter direct response and an HTTPRoute with 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 optional preferredLanguages and policy. Each hostname gets a Canonical field.

The chart refuses to render when a contact is not a mailto:, https:// or tel: URI, and when expires is 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 template with the option on renders the three resources and this body:

Contact: mailto:sec@example.com
Contact: https://example.com/report
Expires: 2027-06-01T00:00:00Z
Preferred-Languages: nl, en
Canonical: https://a.example.com/.well-known/security.txt
Canonical: https://b.example.com/.well-known/security.txt

Each validation failure was rendered once and gives its own message. With default values nothing is rendered, and helm lint passes. Not deployed to a cluster.

View guided diff Turn on auto-fix

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.
Copilot AI balanced review requested due to automatic review settings December 1, 2026 12:55

@cubic-dev-ai cubic-dev-ai Bot 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.

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

Comment thread charts/fundament/values.yaml Resolved
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Image scan: 6 of 8 images have fixable vulnerabilities

Chart images: bump the tag in charts/fundament

Image Critical / high Upgrade to Newer major
busybox:1.36 –
postgresql:18.6 2 / 16 no newer release
openfga:v1.22.1 1 / 10 v1.23.0 (0 / 0)

Dockerfile base images: bump the FROM

Image Critical / high Upgrade to Newer major Dockerfiles in
alpine:3.21 – plugins/cloudnativepg
alpine:3.24 0 / 2 no newer release plugins/cert-manager, plugins/external-dns, plugins/gateway-api/envoy-gateway, plugins/gateway-api/istio, plugins/storage/ceph-rook
trek:0.12.6 2 / 94 no newer release db
nginx:alpine 0 / 8 floating tag, waits on upstream console-frontend, dcim-frontend, docs-frontend
node:24.22-alpine 0 / 8 24.23-alpine (0 / 2) 26.14-alpine marketplace-frontend

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.

Copilot AI 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.

🟡 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.txt through 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

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

PR Environment

Service URL
Console https://console.pr721.preview.fundament.digilab.reviews
Console demo (walkthrough) https://console-demo.pr721.preview.fundament.digilab.reviews
Authn API https://authn.pr721.preview.fundament.digilab.reviews
Organization API https://organization.pr721.preview.fundament.digilab.reviews
Kube API Proxy https://k8s-api.pr721.preview.fundament.digilab.reviews
Docs https://docs.pr721.preview.fundament.digilab.reviews
DCIM https://dcim.pr721.preview.fundament.digilab.reviews
DCIM API https://dcim-api.pr721.preview.fundament.digilab.reviews
DCIM Auth https://dcim-authn.pr721.preview.fundament.digilab.reviews
Marketplace https://marketplace.pr721.preview.fundament.digilab.reviews
Marketplace Catalog API https://marketplace-catalog-api.pr721.preview.fundament.digilab.reviews
Marketplace Registry API https://marketplace-registry-api.pr721.preview.fundament.digilab.reviews
Marketplace Admin API https://marketplace-admin-api.pr721.preview.fundament.digilab.reviews
Marketplace Plugin Developer Portal https://marketplace-registry.pr721.preview.fundament.digilab.reviews
Marketplace Review Backoffice https://marketplace-admin.pr721.preview.fundament.digilab.reviews
Platform Public API https://platform-public-api.pr721.preview.fundament.digilab.reviews
Platform Admin API https://platform-admin-api.pr721.preview.fundament.digilab.reviews

Chart: 0.1.0-pr721.4521
Namespace: tn-fundament-preview-721

flux-operator picks up the flux-preview label within a minute; the install takes a few more.

Test credentials (all passwords: password)

How previews work and how to debug one: preview environments.

…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.

@cubic-dev-ai cubic-dev-ai Bot 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.

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.

@cubic-dev-ai cubic-dev-ai Bot 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.

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.
@GeertJohan

Copy link
Copy Markdown
Member Author

@cubic-dev-ai please review the latest commit.

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@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.

@GeertJohan

Copy link
Copy Markdown
Member Author

@cubic-dev-ai please review the latest commit.

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review the latest commit.

@GeertJohan I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants