Skip to content

Commit 91eea91

Browse files
authored
Merge pull request #126 from Venafi/cryptography-dependency
fix(dependencies): Upgrade dependencies
2 parents f473011 + 228b4cd commit 91eea91

6 files changed

Lines changed: 17 additions & 16 deletions

File tree

docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -o pipefail
77
bandit -r vcert/
88

99
# ID 40291 is pip, ignore so we can still test python 2.7
10-
safety check -i 40291
10+
#Ignoring false-positive issue with pytest. ref: https://github.com/pytest-dev/py/issues/287
11+
safety check -i 40291 -i 51457
1112

1213
pytest -v --junit-xml=junit.xml --junit-prefix=`python -V | tr ' ' '_'` --cov=vcert --cov=vcert.parser --cov=vcert.policy --cov-report term --cov-report xml

requirements-build.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest==6.2.5
2-
pytest-cov==3.0.0
3-
safety==1.10.3
4-
bandit==1.7.1
1+
pytest==7.3.1
2+
pytest-cov==4.1.0
3+
safety==2.3.5
4+
bandit==1.7.5

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
requests==2.27.1
1+
requests==2.31.0
22
python-dateutil==2.8.2
3-
cryptography==36.0.1
3+
cryptography==40.0.2
44
six==1.16.0
5-
ruamel.yaml==0.17.20
5+
ruamel.yaml==0.17.31
66
pynacl==1.5.0

vcert/connection_cloud.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def _get(self, url, params=None):
169169
'accept': MIME_ANY,
170170
'cache-control': "no-cache"
171171
}
172-
r = requests.get(self._base_url + url, params=params, headers=headers, **self._http_request_kwargs)
172+
r = requests.get(self._base_url + url, params=params, headers=headers, **self._http_request_kwargs) # nosec B113
173173
return self.process_server_response(r)
174174

175175
def _post(self, url, data=None):
@@ -185,7 +185,7 @@ def _post(self, url, data=None):
185185
'cache-control': "no-cache"
186186
}
187187
if isinstance(data, dict):
188-
r = requests.post(self._base_url + url, json=data, headers=headers, **self._http_request_kwargs)
188+
r = requests.post(self._base_url + url, json=data, headers=headers, **self._http_request_kwargs) # nosec B113
189189
else:
190190
log.error(f"Unexpected client data type: {type(data)} for {url}")
191191
raise ClientBadData
@@ -204,7 +204,7 @@ def _put(self, url, data=None):
204204
'accept': MIME_JSON
205205
}
206206
if isinstance(data, dict):
207-
r = requests.put(self._base_url + url, json=data, headers=headers, **self._http_request_kwargs)
207+
r = requests.put(self._base_url + url, json=data, headers=headers, **self._http_request_kwargs) # nosec B113
208208
else:
209209
log.error(f"Unexpected client data type: {type(data)} for {url}")
210210
raise ClientBadData

vcert/connection_tpp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _get(self, url="", params=None):
8686
'content-type': MIME_JSON,
8787
'cache-control': 'no-cache'},
8888
params=params,
89-
**self._http_request_kwargs)
89+
**self._http_request_kwargs) # nosec B113
9090
return self.process_server_response(r)
9191

9292
def _post(self, url, data=None):
@@ -100,7 +100,7 @@ def _post(self, url, data=None):
100100
'content-type': MIME_JSON,
101101
'cache-control': "no-cache"},
102102
json=data,
103-
**self._http_request_kwargs)
103+
**self._http_request_kwargs) # nosec B113
104104
else:
105105
log.error(f"Unexpected client data type: {type(data)} for {url}")
106106
raise ClientBadData
@@ -126,7 +126,7 @@ def auth(self):
126126
json=data,
127127
headers={'content-type': MIME_JSON,
128128
'cache-control': "no-cache"},
129-
**self._http_request_kwargs)
129+
**self._http_request_kwargs) # nosec B113
130130

131131
status, user = self.process_server_response(r)
132132
if status == HTTPStatus.OK:

vcert/connection_tpp_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get(self, url=None, params=None, check_token=True, include_token_header=Tru
9898
token = self._get_auth_header_value(self._auth.access_token)
9999
headers[HEADER_AUTHORIZATION] = token
100100

101-
r = requests.get(self._base_url + url, headers=headers, params=params, **self._http_request_kwargs)
101+
r = requests.get(self._base_url + url, headers=headers, params=params, **self._http_request_kwargs) # nosec B113
102102
return self.process_server_response(r)
103103

104104
def _post(self, url=None, data=None, check_token=True, include_token_header=True):
@@ -115,7 +115,7 @@ def _post(self, url=None, data=None, check_token=True, include_token_header=True
115115

116116
if isinstance(data, dict):
117117
log.debug(f"POST Request\n\tURL: {self._base_url+url}\n\tHeaders:{headers}\n\tBody:{data}\n")
118-
r = requests.post(self._base_url + url, headers=headers, json=data, **self._http_request_kwargs)
118+
r = requests.post(self._base_url + url, headers=headers, json=data, **self._http_request_kwargs) # nosec B113
119119
else:
120120
log.error(f"Unexpected client data type: {type(data)} for {url}")
121121
raise ClientBadData

0 commit comments

Comments
 (0)