Skip to content

hardening: boot secret validation + req.user.chain + shared csvCell util (#129, #130, #134)#164

Merged
sacha-l merged 1 commit into
developfrom
hardening/release-quick-wins
May 22, 2026
Merged

hardening: boot secret validation + req.user.chain + shared csvCell util (#129, #130, #134)#164
sacha-l merged 1 commit into
developfrom
hardening/release-quick-wins

Conversation

@sacha-l
Copy link
Copy Markdown
Collaborator

@sacha-l sacha-l commented May 22, 2026

Summary

Three quick hardening wins for the first official release.

Test plan

  • npm test (server) — 293 pass (new: csv util formula-injection/quoting, assertSessionSecret missing/short/ok, middleware req.user.chain assertions)
  • node --check server.js
  • cd client && npm run build — clean
  • cd client && npm run lint — clean (0 warnings)

Closes #129
Closes #130
Closes #134

Draft, targeting develop, not merging (per CLAUDE.md §6).

Three release-hardening fixes:

- #129: validate ADMIN_SESSION_SECRET at boot via assertSessionSecret(), called
  in server.js startup, instead of lazily on the first admin sign-in.
- #130: requireAdmin and requireTeamMemberOrAdmin now set req.user.chain on
  every grant path (admin + team-member), so audit logging has the chain.
- #134: factor csvCell + formula-injection defense into a shared api/utils/csv.js
  (csvCell + csvRow); program-inbox CSV export now imports it so future exports
  inherit the same RFC-4180 quoting + injection guard.

Tests: csv util (formula injection + quoting), assertSessionSecret (missing /
short / ok), and middleware req.user.chain assertions. Full suite 293 pass.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment May 22, 2026 5:55pm

@sacha-l sacha-l marked this pull request as ready for review May 22, 2026 17:57
@sacha-l sacha-l merged commit 6fe5a2f into develop May 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant