-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Body:
The get_auth_headers function in auth_provider.py uses hmac.new to generate the API signature. Specifically, it decodes the secret key using base64.b64decode(secret_key) every time a request is made. This is inefficient, but more importantly, exposes the secret key in plaintext in memory for a longer duration than necessary, increasing the window for potential compromise through memory dumps or other attacks.
Recommendation:
- Decode the
secret_keyonce in theAuthProviderconstructor and store the decoded value as an attribute. - Use the stored, decoded value directly in
hmac.newcalls. This avoids repeated decoding and minimizes the exposure of the plaintext secret in memory.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels