diff --git a/ci/bitbucket/changed_files.py b/ci/bitbucket/changed_files.py index 5fed7f0..3345a99 100644 --- a/ci/bitbucket/changed_files.py +++ b/ci/bitbucket/changed_files.py @@ -1,5 +1,5 @@ import os -import requests +from security import safe_requests BITBUCKET_ACCESS_TOKEN = os.environ.get("BITBUCKET_ACCESS_TOKEN_PIXEE") BITBUCKET_REPO_SLUG = os.environ.get("BITBUCKET_REPO_SLUG") @@ -16,12 +16,12 @@ } # Make the first API call to get the diffstat URL -response = requests.get(url, headers=headers, timeout=10) +response = safe_requests.get(url, headers=headers, timeout=10) data = response.json() diffstat_url = data["links"]["diffstat"]["href"] # Make the second API call using the diffstat URL -diffstat_response = requests.get( +diffstat_response = safe_requests.get( f"{diffstat_url}&fields=values.new.path", headers=headers, timeout=10 ) diffstat_data = diffstat_response.json() diff --git a/ci/requirements.txt b/ci/requirements.txt index f4e10cb..9bc08f6 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -1,2 +1,3 @@ python-gitlab whatthepatch +security==1.3.1