Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Both services shipped `api_key = "dev-api-key-change-me"` as the default. That value is the committed env-bootstrap admin key (src/api/auth.py grants admin scope to any caller presenting it), so any staging/production deploy that forgot to override API_KEY accepted a publicly-known admin credential. Add verify_production_secrets(), called first in create_app(), which raises at startup when the environment tier is not `local` and a secret is still the built-in dev default: - team-tracking: guards API_KEY (gated on TT_ENV). - documentation-system: guards API_KEY and the outbound DIRECTORY_API_KEY; adds a DOCS_ENV tier field (mirroring TT_ENV) since it had none. Empty secrets are still allowed — an empty api_key disables the env-bootstrap path entirely, which is a valid DB-keys-only config. Only the known default sentinel trips the guard. Document the tier vars in each .env.example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refuse to boot on default secrets outside local
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote
staging→main(production).What ships
1. Secrets boot-guard (was PR #25)
localwhileAPI_KEY(and doc-system'sDIRECTORY_API_KEY) is still the built-in dev default.DOCS_ENVto documentation-system (mirrorsTT_ENV).2. Discord bot
/docfeaturedocClientHTTP client +docService(team-slug resolution, outcome mapping)./docrenderers and message formatting.config.jsnow requiresDOC_BASE_URL+DOC_API_KEY.Production readiness — already prepped
Railway
productionenv vars are set and verified before this merge:TT_ENV=production, strongAPI_KEY,PORT=8000.DOCS_ENV=production,PORT=8000, strongAPI_KEY,DIRECTORY_API_KEY.DIRECTORY_API_KEY,DOC_BASE_URL→ doc-system:8000, scopedDOC_API_KEY(docs:read/write, prod-specific key id04295b96-…).Bot boot confirmed in both environments (
Bot ready as Misty Staging#1997/Misty#9616).🤖 Generated with Claude Code