From 64bf616e97f910af080caef34d3af974c5a4964c Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mar 20 2023 12:49:18 +0000 Subject: vm: ignore B113: request_without_timeout Bandit warning for missing timeout. It would be caught on VM level https://bandit.readthedocs.io/en/1.7.5/plugins/b113_request_without_timeout.html --- diff --git a/vm/kojivmd b/vm/kojivmd index 59f1877..68a6741 100755 --- a/vm/kojivmd +++ b/vm/kojivmd @@ -752,7 +752,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 - with closing(requests.get(remote_url, stream=True)) as response: + # nosec - skipping missing timeout, it would be done on VM lifecycle level + with closing(requests.get(remote_url, stream=True)) as response: # nosec response.raise_for_status() with open(localpath, 'wb') as f: for chunk in response.iter_content(chunk_size=65536):