Skip to content

Commit 10822cc

Browse files
committed
fix(connectors): strip flagged log args to silence CodeQL data-flow alerts
1 parent 58cab4f commit 10822cc

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

src/gaia/connectors/store.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,8 @@ def _set():
168168
keyring.set_password(SERVICE_NAME, username, payload)
169169

170170
_set()
171-
# Log only metadata — never the refresh token value.
172-
id_fp = client_id_hash[:8]
173-
logger.debug(
174-
"store: saved connection provider=%s account=%s scopes=%d id_fp=%s…",
175-
provider,
176-
account_email,
177-
len(scopes),
178-
id_fp,
179-
)
171+
# Log only non-sensitive metadata.
172+
logger.debug("store: saved connection provider=%s scopes=%d", provider, len(scopes))
180173

181174

182175
def load_connection(
@@ -223,14 +216,9 @@ def _get():
223216
# "user never connected". The unit test in test_store.py asserts
224217
# the entry is cleared; the unit test in test_tokens.py asserts
225218
# the right Reason flows to the caller.
226-
stored_fp = (stored_hash or "<missing>")[:8]
227-
cur_fp = current_client_id_hash[:8]
228219
logger.warning(
229-
"store: client_id tripwire fired for provider=%s "
230-
"(stored=%s…, current=%s…); clearing entry",
220+
"store: client_id tripwire fired for provider=%s; clearing entry",
231221
provider,
232-
stored_fp,
233-
cur_fp,
234222
)
235223
delete_connection(provider, account_email=account_email)
236224
raise AuthRequiredError(

0 commit comments

Comments
 (0)