forked from 0xWheatyz/SPARC
Security: refuse startup with default JWT secret in non-dev environments #243
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?
Background
auth.pyships a fallbacksparc-secret-key-change-in-productionthat will be used ifJWT_SECRETis unset. This is a critical security risk in production.Task
Add a startup check in
auth.py(or the application entry point) that:APP_ENVorENVIRONMENTvariable)RuntimeErroror exits with a non-zero code) if the default secret is used outside of a development contextAcceptance Criteria
APP_ENV != development.env.exampleupdated to documentJWT_SECRETas requiredReference
Roadmap: P1 Security hardening — rotate default JWT secret
Triage: P1/small - Assigned to @developer. This is a security hardening quick win. Will be handled in Wave 1 alongside other P1 security issues (#244, #245, #248).
This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.