File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 4
4
import urllib .parse
5
5
import json
6
6
import csv
7
- import subprocess
7
+ # subprocess is used as multiplatform approach, usage is verified (20-07-2022)
8
+ import subprocess # nosec
8
9
import sys
9
10
import platform
10
11
import getopt
31
32
sys .exit (- 2 )
32
33
33
34
if filename is None :
34
- map_file_raw = urllib .request .urlopen ("https://download.01.org/perfmon/mapfile.csv" ).read ().decode ('utf-8' )
35
+ # vefified that link to mapfile.csv is safe and correct (20-07-2022)
36
+ map_file_raw = urllib .request .urlopen ("https://download.01.org/perfmon/mapfile.csv" ).read ().decode ('utf-8' ) # nosec
35
37
map_dict = csv .DictReader (io .StringIO (map_file_raw ), delimiter = ',' )
36
38
map_file = []
37
39
core_path = ""
67
69
print (model )
68
70
69
71
if core_path :
70
- json_core_data = urllib .request .urlopen (
72
+ # vefified that links, created on base of map_file are correct (20-07-2022)
73
+ json_core_data = urllib .request .urlopen ( # nosec
71
74
"https://download.01.org/perfmon" + core_path
72
75
)
73
76
core_events = json .load (json_core_data )
79
82
sys .exit (- 1 )
80
83
81
84
if offcore_path :
82
- json_offcore_data = urllib .request .urlopen (
85
+ # vefified that links, created on base of map_file are correct (20-07-2022)
86
+ json_offcore_data = urllib .request .urlopen ( # nosec
83
87
"https://download.01.org/perfmon" + offcore_path
84
88
)
85
89
offcore_events = json .load (json_offcore_data )
You can’t perform that action at this time.
0 commit comments