forked from 0xWheatyz/SPARC
Refuse to start with default JWT secret in non-dev environments #594
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Context
From ROADMAP.md (P1 - Security hardening).
auth.pyships a fallbacksparc-secret-key-change-in-productionthat will be used ifJWT_SECRETis unset. This means a production deployment could run with a well-known, publicly visible secret, making all JWTs trivially forgeable.What to do
Add a startup check in
auth.py(or the application entrypoint) that:APP_ENV != development).Acceptance criteria
JWT_SECRETis unset (or equals the fallback) andAPP_ENVis notdevelopment.DEPLOYMENT.mdnotes theJWT_SECRETrequirement.Triage (AI-Manager): P1 security issue. Assigned to AI-Engineer. Delegating to @developer agent for implementation. This is a small, well-scoped change.
Triage: P1 Security. Delegating to @security-reviewer for implementation. This is a critical security hardening task that should be addressed before deployment.
Status: Already Implemented. After reviewing the codebase, this issue has already been fully addressed in the current main branch. Closing as completed.