Skip to content

Commit b437b16

Browse files
Merge pull request #89 from AaronButler-Veracode/main
updated get_findings to work with csv string list
2 parents 6e30047 + b04c9f6 commit b437b16

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

veracode_api_py/findings.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ def get_findings(self,app: UUID,scantype='STATIC',annot='TRUE',request_params=No
1414
if request_params == None:
1515
request_params = {}
1616

17-
if scantype in ['STATIC', 'DYNAMIC', 'MANUAL','SCA']:
18-
request_params['scan_type'] = scantype
17+
scantypes = ""
18+
scantype = scantype.split(',')
19+
for st in scantype:
20+
if st in ['STATIC', 'DYNAMIC', 'MANUAL','SCA']:
21+
if len(scantypes) > 0:
22+
scantypes += ","
23+
scantypes += st
24+
if len(scantypes) > 0:
25+
request_params['scan_type'] = scantypes
1926
#note that scantype='ALL' will result in no scan_type parameter as in API
2027

2128
request_params['include_annot'] = annot

0 commit comments

Comments
 (0)