File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1503,13 +1503,15 @@ def parse_pom(path=None, contents=None):
1503
1503
contents = fixEncoding (contents )
1504
1504
1505
1505
try :
1506
- xml .sax .parseString (contents , handler ) # nosec - trusted data
1506
+ # trusted data, skipping bandit test
1507
+ xml .sax .parseString (contents , handler ) # nosec
1507
1508
except xml .sax .SAXParseException :
1508
1509
# likely an undefined entity reference, so lets try replacing
1509
1510
# any entity refs we can find and see if we get something parseable
1510
1511
handler .reset ()
1511
1512
contents = ENTITY_RE .sub ('?' , contents )
1512
- xml .sax .parseString (contents , handler ) # nosec - trusted data
1513
+ # trusted data, skipping bandit test
1514
+ xml .sax .parseString (contents , handler ) # nosec
1513
1515
1514
1516
for field in fields :
1515
1517
if field not in util .to_list (values .keys ()):
Original file line number Diff line number Diff line change @@ -751,7 +751,8 @@ class VMExecTask(BaseTaskHandler):
751
751
raise koji .BuildError ('unsupported file type: %s' % type )
752
752
koji .ensuredir (os .path .dirname (localpath ))
753
753
# closing needs to be used for requests < 2.18.0
754
- # nosec - skipping missing timeout, it would be done on VM lifecycle level
754
+ # skipping missing timeout, it would be done on VM lifecycle level
755
+ # bypass bandit warning
755
756
with closing (requests .get (remote_url , stream = True )) as response : # nosec
756
757
response .raise_for_status ()
757
758
with open (localpath , 'wb' ) as f :
You can’t perform that action at this time.
0 commit comments