fix(netlify): Add hardened website headers#1096
Conversation
Signed-off-by: Jonah Kowall <jkowall@kowall.net>
There was a problem hiding this comment.
Pull request overview
This PR hardens the Jaeger documentation site served via Netlify by adding a global header rule that applies security-related response headers (CSP, HSTS, anti-sniffing, clickjacking protection, referrer policy, and permissions policy) across all paths.
Changes:
- Add a global
[[headers]]rule for/*innetlify.toml. - Configure
Content-Security-Policy,Strict-Transport-Security,X-Content-Type-Options,X-Frame-Options,Referrer-Policy, andPermissions-Policy.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jonah Kowall <jkowall@kowall.net>
|
Thanks for adding these hardening headers — the non-CSP ones (HSTS, I'm hesitant about the Two alternatives worth considering:
Given that this is a static docs site with no user-submitted content, I don't think the CSP as written meaningfully reduces our attack surface. |
Signed-off-by: Jonah Kowall <jkowall@kowall.net>
|
Thanks, @yurishkuro agreed. I removed the blocking CSP from this PR and kept the lower-risk hardening headers. I also updated the PR description to make the scope clear: this PR now covers HSTS, |
Summary
OpenSSF
Refs jaegertracing/jaeger#8600
Refs jaegertracing/jaeger#8484
Parent tracker: jaegertracing/jaeger#8481
Validation
nodeTOML parse check for required header fields and no blocking CSPgit diff --checknpm run check:formatnpm run check:filenamesNote: local
npm run buildcurrently fails before rendering pages because Hugo cannot find the Docsy partialdark-mode-config.htmlin this checkout dependency state. The failure is unrelated to thenetlify.tomlheader change.