Skip to content

Security: Default API key in local model configuration#263

Open
tuanaiseo wants to merge 1 commit into
huggingface:mainfrom
tuanaiseo:contribai/fix/security/default-api-key-in-local-model-configura
Open

Security: Default API key in local model configuration#263
tuanaiseo wants to merge 1 commit into
huggingface:mainfrom
tuanaiseo:contribai/fix/security/default-api-key-in-local-model-configura

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

In agent/core/local_models.py, the default API key is set to 'sk-local-no-key-required' which provides a non-empty fallback rather than requiring explicit configuration. This could lead to unintended connections to local LLM servers without proper authentication.

Severity: medium
File: agent/core/local_models.py

Solution

Consider using None as default and requiring explicit configuration, or at minimum document this behavior clearly and ensure it's only used in development contexts.

Changes

  • agent/core/local_models.py (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

In agent/core/local_models.py, the default API key is set to 'sk-local-no-key-required' which provides a non-empty fallback rather than requiring explicit configuration. This could lead to unintended connections to local LLM servers without proper authentication.

Affected files: local_models.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
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