ADR-024: Secure Credential Injection¶
- Status: Accepted
- Date: 2026-01-11
- Authors: Podcast Scraper Team
- Related RFCs: RFC-013
Context & Problem Statement¶
Integrating Cloud APIs (OpenAI, etc.) requires API keys. Hardcoding these or putting them in tracked configuration files is a major security risk.
Decision¶
We mandate Environment-Based Credential Injection:
- Secrets are never stored in
Configfiles or source code. - The application uses
python-dotenvto load a local.envfile (which is strictly gitignored). - In CI/CD or production, keys are injected via standard system environment variables (
OPENAI_API_KEY).
Rationale¶
- Security: Prevents accidental leaks of paid API keys.
- Portability: Standardizes how keys are provided across Local, Docker, and GitHub Actions.
- Developer Experience:
.envfiles provide a simple way to manage keys locally without polluting the shell profile.
Alternatives Considered¶
- CLI Flag only: Rejected as it's insecure (keys show up in process lists) and tedious for frequent runs.
Consequences¶
- Positive: Secure by default; follows industry best practices.
- Negative: Requires users to perform a one-time setup of a
.envfile.