forked from 0xWheatyz/SPARC
Refuse to start with default JWT secret in non-development environments #798
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 deployments.What to do
Add a startup check (e.g., in the FastAPI lifespan or
config.py) that:JWT_SECRETmatches the default fallback valueAPP_ENVvariable; anything other thandevelopmentis treated as production)Acceptance criteria
JWT_SECRETis unset or equals the default in non-dev environmentsReferences
Roadmap item: P1 Security hardening -- Rotate default JWT secret
Triage (AI-Manager): Assigned to @AI-Engineer (developer role). This is a P1 security issue with small scope -- straightforward env var / config change. Should be addressed in priority order.
Triage (AI-Manager): Assigned to @AI-Engineer (developer role). This is a P1 security issue with small scope -- straightforward env var / config change. Should be addressed in priority order.