mirror of
https://github.com/storytold/artcraft-services.git
synced 2026-11-19 08:53:03 +01:00
## What was wrong - `email-sender-job.development.env` committed a plaintext SMTP password for the Gmail sending account used by the email worker. - `storyteller-web.development.env` committed the Stripe test-mode secret key (`sk_test_...`) and webhook signing secret (`whsec_...`). Anyone with read access to the repository (or to a Docker build context or image built from it) gets these credentials. ## What changed - Removed `SMTP_PASSWORD`, `STRIPE_SECRET_KEY` and `STRIPE_SECRET_WEBHOOK_SIGNING_KEY` from the tracked development configs, with a comment pointing to the gitignored `<app>.development-secrets.env` file. `bootstrap` already loads that file after `<app>.development.env` (and dotenv keeps earlier values, so the lines had to be removed rather than replaced with placeholders). - Added `*-secrets.env` and `secrets/` to `.dockerignore` so local secret files never enter a build context. ## Required follow-up (cannot be done in code) - **Rotate the SMTP password** for the sending account and the **Stripe test secret key + webhook signing secret**. They remain in git history; removing them from `main` does not revoke them. - Developers running storyteller-web or email-sender-job locally must now put those three values in their `*.development-secrets.env` (or environment); startup fails with a missing-variable error otherwise, since both are read with `get_env_string_required`. ## Blast radius Development configuration only. Production config files are unchanged; production already supplies these from secrets. ## Checks - Run: reviewed bootstrap env-file load order (`crates/lib/bootstrap/src/bootstrap.rs`) to confirm the secrets file is still read in development. - Not run: no build needed (config-only change); no local startup test (needs the real secrets). Addresses CodeRabbit security findings (CWE-798). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Configuration** * Development settings no longer include hard-coded SMTP passwords or Stripe secret keys. These values can be provided through environment variables or local secrets files. * Files matching `*-secrets.env` and the `secrets/` directory are excluded from Docker build contexts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
19 lines
244 B
Plaintext
19 lines
244 B
Plaintext
*secret*sh
|
|
*~
|
|
.dockerignore
|
|
.env
|
|
.env-secrets
|
|
*-secrets.env
|
|
secrets/
|
|
.git
|
|
.idea/
|
|
Dockerfile
|
|
__pycache__/
|
|
_ignored_schema.rs
|
|
models/Wav2Lip/python/
|
|
models/tacotron2/python/
|
|
production_database_secret_connect.sh
|
|
secrets.toml
|
|
secrets.yaml
|
|
target/
|