Skip to content

Providers API accepts API key in request body without redaction #159

Description

@hariew

Providers API accepts API key in request body without redaction

Severity: Medium
File: backend/app/modules/platform/providers_api.py:50

The SetKeyRequest model accepts apiKey as a plain string in the request body. While FastAPI doesn't log request bodies by default, if logging is enabled or request tracing is configured, API keys could be written to logs in plaintext.

class SetKeyRequest(BaseModel):
    providerName: str
    apiKey: str

Why it matters

API keys stored in request logs or traces could be exposed to developers, support staff, or through log aggregation systems. The key should be redacted in any logging or tracing.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions