config.py: ForgejoConfig __repr__ leaks token in plaintext #132

Closed
opened 2026-07-06 04:59:44 +00:00 by the.auditor · 0 comments
Owner

src/hottea/config.py uses @dataclass(frozen=True) on ForgejoConfig, which includes the token field in default __repr__. If the config is ever logged, printed, or included in error messages, the API token is exposed.

Fix: Add repr=False to the token field:

token: str = field(repr=False)

Ref: PR #131

`src/hottea/config.py` uses `@dataclass(frozen=True)` on `ForgejoConfig`, which includes the `token` field in default `__repr__`. If the config is ever logged, printed, or included in error messages, the API token is exposed. Fix: Add `repr=False` to the token field: ```python token: str = field(repr=False) ``` Ref: PR #131
fuzzy closed this issue 2026-07-06 08:46:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea#132
No description provided.