From 411815e640f461a38c89a82175daa671969e2676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Thu, 16 May 2024 17:38:05 +0200 Subject: [PATCH] Address S113 @ `oidc-exchange.py` --- oidc-exchange.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oidc-exchange.py b/oidc-exchange.py index 6e63a93..cea6cfd 100644 --- a/oidc-exchange.py +++ b/oidc-exchange.py @@ -209,7 +209,7 @@ token_exchange_url = f'https://{repository_domain}/_/oidc/mint-token' # Indices are expected to support `https://{domain}/_/oidc/audience`, # which tells OIDC exchange clients which audience to use. audience_url = f'https://{repository_domain}/_/oidc/audience' -audience_resp = requests.get(audience_url) +audience_resp = requests.get(audience_url, timeout=5) # S113 wants a timeout assert_successful_audience_call(audience_resp, repository_domain) oidc_audience = audience_resp.json()['audience'] @@ -230,6 +230,7 @@ except id.IdentityError as identity_error: mint_token_resp = requests.post( token_exchange_url, json={'token': oidc_token}, + timeout=5, # S113 wants a timeout ) try: