-
Notifications
You must be signed in to change notification settings - Fork 45
/
static_code_analysis.txt
135 lines (121 loc) · 5.96 KB
/
static_code_analysis.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Run started:2024-12-13 19:36:12.439471
Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/multi_table/multi_single_table.py:187:8
186 """
187 assert cls.min_value == 0.0
188 return super().normalize(raw_score)
--------------------------------------------------
>> Issue: [B403:blacklist] Consider possible security implications associated with pickle module.
Severity: Low Confidence: High
CWE: CWE-502 (https://cwe.mitre.org/data/definitions/502.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/blacklists/blacklist_imports.html#b403-import-pickle
Location: ./sdmetrics/reports/base_report.py:4:0
3 import importlib.metadata
4 import pickle
5 import sys
--------------------------------------------------
>> Issue: [B112:try_except_continue] Try, Except, Continue detected.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b112_try_except_continue.html
Location: ./sdmetrics/reports/base_report.py:116:16
115 real_data[column], synthetic_data[column] = converted_cols
116 except Exception:
117 continue
118
--------------------------------------------------
>> Issue: [B301:blacklist] Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
Severity: Medium Confidence: High
CWE: CWE-502 (https://cwe.mitre.org/data/definitions/502.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/blacklists/blacklist_calls.html#b301-pickle
Location: ./sdmetrics/reports/base_report.py:310:21
309 with open(filepath, 'rb') as f:
310 report = pickle.load(f)
311 if current_version != report._package_version:
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/reports/multi_table/_properties/base.py:67:8
66
67 assert is_dataframe, assert_message
68 if not has_score_column:
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/single_table/multi_column_pairs.py:146:8
145 """
146 assert cls.min_value == 0.0
147 return super().normalize(raw_score)
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/single_table/multi_single_column.py:163:8
162 """
163 assert cls.min_value == 0.0
164 return super().normalize(raw_score)
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/single_table/privacy/loss.py:80:8
79 """
80 assert len(pred) == len(real)
81
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/single_table/privacy/util.py:72:4
71 dist = 0
72 assert len(target) == len(test), (
73 'Tuples must have the same length in thecalculation of hamming distance!'
74 )
75
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b101_assert_used.html
Location: ./sdmetrics/timeseries/detection.py:104:8
103 """
104 assert cls.min_value == 0.0
105 return super().normalize(raw_score)
--------------------------------------------------
>> Issue: [B110:try_except_pass] Try, Except, Pass detected.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b110_try_except_pass.html
Location: ./sdmetrics/visualization.py:37:8
36
37 except Exception:
38 pass
39
--------------------------------------------------
Code scanned:
Total lines of code: 10154
Total lines skipped (#nosec): 0
Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0
Run metrics:
Total issues (by severity):
Undefined: 0
Low: 10
Medium: 1
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 11
Files skipped (0):