From f5db472154d29c13e522d6061420e6132c176a0e Mon Sep 17 00:00:00 2001 From: Aaron Butler Date: Mon, 21 Oct 2024 10:37:37 -0400 Subject: [PATCH] updated get_findings to work with csv string list --- veracode_api_py/findings.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/veracode_api_py/findings.py b/veracode_api_py/findings.py index f6f7ac0..1d0a43f 100644 --- a/veracode_api_py/findings.py +++ b/veracode_api_py/findings.py @@ -14,8 +14,15 @@ def get_findings(self,app: UUID,scantype='STATIC',annot='TRUE',request_params=No if request_params == None: request_params = {} - if scantype in ['STATIC', 'DYNAMIC', 'MANUAL','SCA']: - request_params['scan_type'] = scantype + scantypes = "" + scantype = scantype.split(',') + for st in scantype: + if st in ['STATIC', 'DYNAMIC', 'MANUAL','SCA']: + if len(scantypes) > 0: + scantypes += "," + scantypes += st + if len(scantypes) > 0: + request_params['scan_type'] = scantypes #note that scantype='ALL' will result in no scan_type parameter as in API request_params['include_annot'] = annot