feat: add baseline browser security headers #296
No reviewers
Labels
No labels
activitypub
admin
api
architecture
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
content
database
deployment
design
dev-env
diagnostics
docs
documentation
email
enhancement
feature
federation
feed
health
homepage
implementation
integration
logging
mastodon
media
navigation
npm-packages
openapi
opengraph
packages
passkeys
preview
priority:high
priority:low
priority:medium
production
proof
proxy
public-routes
public-ui
release
safety
slug-api
slug-auth
slug-core
slug-federation
slug-media
slug-template
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-03ba3b00-browser-security-headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Verification
No dependencies, workflow changes, runtime provisioning in CI, or deployed-site rollout. NEVER browser/container/federation integration tests in CI or release workflows.
Task: #task-03ba3b00
Deployment follow-ups: erikvancraddock.com task-dae6192b; mustang-news task-91db9c08.
Awaiting CI, independent review and explicit human merge approval.
Review update
bca4012ee0) is open againstmain; reviewed the Forgejo diff, tasktask-03ba3b00, and the provided verification artifacts.Summary
The PR implements a global browser security header baseline in
template/site/src/security/headers.ts, wires per-request trusted nonces into existing template/script/style entry points, keeps Swagger/API docs working with a narrow docs-only exception, and documents HSTS/proxy customization for generated sites. The changes align with the task scope and avoid CI workflow/runtime provisioning changes.Acceptance criteria
default-src 'none', requires nonces for scripts, blocks frame/object/base/worker/style/script attributes, and the local browser evidence covers blocked inline handlers/scripts/styles, foreign script/style/connect, and frame embedding.max-age, with invalid max-age/origin cases covered.npm run test:ci, and local visual tests passed without adding integration/browser/container tests to CI..env.example, packaged-file regression, andsrc/security/README.mddocument CSP allowances, nonce wiring, media exceptions, HSTS/proxy assumptions, and upgrade guidance.Blocking issues
Warnings
Final verdict
Approved. Merge remains gated on explicit human approval.