Skip to content

Commit

Permalink
Address S113 @ oidc-exchange.py
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz authored May 16, 2024
1 parent fa6d770 commit 411815e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oidc-exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def event_is_third_party_pr() -> bool:
# 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']
Expand All @@ -230,6 +230,7 @@ def event_is_third_party_pr() -> bool:
mint_token_resp = requests.post(
token_exchange_url,
json={'token': oidc_token},
timeout=5, # S113 wants a timeout
)

try:
Expand Down

0 comments on commit 411815e

Please sign in to comment.