Skip to content

Security: Sensitive credentials accepted via GET query parameters#1062

Open
tuanaiseo wants to merge 1 commit into
snarfed:mainfrom
tuanaiseo:contribai/fix/security/sensitive-credentials-accepted-via-get-q
Open

Security: Sensitive credentials accepted via GET query parameters#1062
tuanaiseo wants to merge 1 commit into
snarfed:mainfrom
tuanaiseo:contribai/fix/security/sensitive-credentials-accepted-via-get-q

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

The API requires and consumes secrets like access_token, refresh_token, app_password, and OAuth token pairs from query parameters on a GET endpoint. Query strings are commonly logged by reverse proxies, browsers, analytics, and server logs, which can leak credentials and enable account takeover if logs are exposed.

Severity: high
File: api.py

Solution

Move all secrets to Authorization headers or POST body parameters, reject credential-bearing query params, and redact sensitive values in logs/metrics. Consider rotating any tokens that may already have been exposed via URLs.

Changes

  • api.py (modified)

Testing

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

The API requires and consumes secrets like `access_token`, `refresh_token`, `app_password`, and OAuth token pairs from query parameters on a GET endpoint. Query strings are commonly logged by reverse proxies, browsers, analytics, and server logs, which can leak credentials and enable account takeover if logs are exposed.

Affected files: api.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@snarfed
Copy link
Copy Markdown
Owner

snarfed commented Apr 3, 2026

Hey, thanks for the contribution!

This doesn't really help though. It just breaks existing functionality without providing an alternative.

Also, based on https://github.com/tuanaiseo?tab=overview&from=2026-04-01&to=2026-04-02 , it looks like this is semi or fully automated. You should disclose that in these PRs.

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.

2 participants