Skip to content

fix(security): load translator key from environment (#601) - #986

Open
gHashTag wants to merge 1 commit into
mainfrom
feat/issue-601
Open

gHashTag wants to merge 1 commit into
mainfrom
feat/issue-601

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

The Coptic translator contained a hardcoded DeepSeek credential. It now reads DEEPSEEK_API_KEY from the environment and fails with a clear configuration error when the value is missing, empty, or whitespace, before creating output or making network requests.

References #601. The security incident remains open: removing a credential from the current source does not establish that it was revoked or remove it from Git history. This PR does not test the exposed credential or change account credentials.

Validation:

  • Python syntax compilation passed.
  • Offline runtime checks passed for missing, empty, and whitespace environment values; each fails before any output or network request.
  • With a dummy environment value, the request reaches a mocked urlopen with the expected Authorization header and response handling. No actual API call was made.
  • Targeted review confirmed only the credential configuration changed; the exposed credential pattern is absent from the updated file. git diff --check passed.
  • zig build and zig build test were attempted but cannot pass with the locally installed Zig 0.16.0 (CI pins 0.15.2): build-script/dependency API errors include linkLibC, trimLeft, and getEnvVarOwned. No Zig source changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant