Fix bandit "nosec" comments

Related: https://pagure.io/koji/issue/4004
This commit is contained in:
Tomas Kopecek 2024-02-06 11:09:16 +01:00
parent 167ee017f2
commit 77b7e3a0c9
2 changed files with 6 additions and 3 deletions

View file

@ -751,7 +751,8 @@ class VMExecTask(BaseTaskHandler):
raise koji.BuildError('unsupported file type: %s' % type)
koji.ensuredir(os.path.dirname(localpath))
# closing needs to be used for requests < 2.18.0
# nosec - skipping missing timeout, it would be done on VM lifecycle level
# skipping missing timeout, it would be done on VM lifecycle level
# bypass bandit warning
with closing(requests.get(remote_url, stream=True)) as response: # nosec
response.raise_for_status()
with open(localpath, 'wb') as f: