Port browser security without changing reference API #56
No reviewers
Labels
No labels
activitypub
actor
admin
ai-safety
article
articles
atproto
bug
cli
configuration
content
dev-environment
docker
enhancement
feature
federation
fediverse
forgejo
garage
health
how-to
logging
markdown
mastodon
media
navigation
opengraph
passkeys
preview
priority:medium
production
release
rendering
s3
settings
setup
status:active
status:done
status:inprogress
technical
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit.com!56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-b5bdccf3-browser-security"
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
Port browser security from the current Slugkit template while retaining slugkit.com's reference-host API behavior.
/cli/authas a read-only GET/HEAD confirmation page; issue keys only via authenticated, CSRF-protected POST. GET logout no longer mutates sessions.Task: task-b5bdccf3
Verification
./scripts/pre-pr.sh: PASS (formatting, typecheck, CSS/build reproducibility, all 446 tests across 48 files).npm exec tsx -- scripts/security-browser-fixture.ts; never add browser/container/federation tests to CI/release workflows.Operational boundary
No release tag, image publication, production deployment, homelab mutation, database migration or identity/key rotation. Before a separately approved deployment, verify/configure the canonical browser origin and review proxy-header ownership. HSTS remains opt-in. Existing sessions/data/keys are preserved; ephemeral CSRF signing means open forms must reload after application restart unless an operator supplies a persistent/shared signing key.
Independent review —
fafdebe76cA fresh, read-only Pi reviewer inspected the full diff and relevant surrounding code with only read/grep/find/ls tools. Result: No actionable defects found. Review checked CSRF/session/origin binding, nonce/cache isolation, CLI POST issuance and read-only GET/HEAD, retained API/schema/archive behavior, and opt-in HSTS.
Optional suggestion: exact-version/SRI pinning of Swagger CDN assets for reproducibility. Deferred as non-blocking follow-up; this port follows the reviewed template's stable-major Swagger assets and explicitly nonces trusted scripts.
Review limits: static independent review; reviewer did not independently rerun tests or browser checks. The implementation session separately verified
./scripts/pre-pr.sh(446 tests/48 files), isolated browser journeys, and successful Forgejo CI run #53 for this exact commit. Real OS/personal passkeys were not exercised.The initial Claude Code reviewer was unavailable due to expired authentication; the successful independent review used a separate Pi context, not a self-review substitution. No credentials were changed.
Pipeline gates: local checks PASS; PR CI PASS (verified through
fj actions tasks, becausefj pr statushas a response-parsing bug); independent review PASS. No release tag, image publication, or production deployment is authorized or performed.