hsa-app/internal/web
Jean-Michel Tremblay 866bc175fb
All checks were successful
Build and Test / build-and-test (push) Successful in 38s
Security hardening: server-side session expiry + nosniff on files
1. Enforce the 12h session lifetime server-side in requireAuth (reject a
   session older than the TTL even if the sealed cookie is intact), so a
   leaked cookie value can't be replayed indefinitely. Shared sessionTTL
   const drives both the cookie MaxAge and the check.
2. Send X-Content-Type-Options: nosniff when serving user-uploaded
   receipt/attachment bytes, so the browser won't sniff past the declared
   (upload-time allowlisted) MIME type.

Update SPEC §2 and §6 accordingly; tests cover stale-session rejection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:56:38 -04:00
..
static AI tab: full-width auto-growing note editors 2026-06-20 20:17:37 -04:00
templates AI tab: full-width auto-growing note editors 2026-06-20 20:17:37 -04:00
ai.go AI classifier correction notes + misread review (AI tab) 2026-06-20 16:04:30 -04:00
ai_test.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00
export.go Initial commit: HSA receipt tracker 2026-06-17 21:40:12 -04:00
manage.go Initial commit: HSA receipt tracker 2026-06-17 21:40:12 -04:00
manage_test.go Initial commit: HSA receipt tracker 2026-06-17 21:40:12 -04:00
middleware.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00
orientation.go Normalize receipt image orientation from EXIF; add changelog (0.0.1) 2026-06-19 20:26:03 -04:00
orientation_test.go Normalize receipt image orientation from EXIF; add changelog (0.0.1) 2026-06-19 20:26:03 -04:00
scan.go AI classifier correction notes + misread review (AI tab) 2026-06-20 16:04:30 -04:00
templates.go AI classifier correction notes + misread review (AI tab) 2026-06-20 16:04:30 -04:00
upload.go AI classifier correction notes + misread review (AI tab) 2026-06-20 16:04:30 -04:00
upload_test.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00
views.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00
views_test.go Recent list: full first-name initials for hyphenated names 2026-06-19 09:04:11 -04:00
web.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00
web_test.go Security hardening: server-side session expiry + nosniff on files 2026-06-20 20:56:38 -04:00