-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathstatic_code_analysis.txt
More file actions
135 lines (121 loc) · 5.99 KB
/
static_code_analysis.txt
File metadata and controls
135 lines (121 loc) · 5.99 KB
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:2026-03-18 21:23:39.494040+00:00
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.9.2/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.9.2/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.9.2/plugins/b112_try_except_continue.html
Location: ./sdmetrics/reports/base_report.py:107:16
106 synthetic_data[column] = _convert_datetime_column(column, synth_col, col_meta)
107 except Exception:
108 continue
109
--------------------------------------------------
>> 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.9.2/blacklists/blacklist_calls.html#b301-pickle
Location: ./sdmetrics/reports/base_report.py:305:21
304 with open(filepath, 'rb') as f:
305 report = pickle.load(f)
306 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.9.2/plugins/b101_assert_used.html
Location: ./sdmetrics/reports/multi_table/_properties/base.py:74:8
73
74 assert is_dataframe, assert_message
75 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.9.2/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.9.2/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.9.2/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.9.2/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 the calculation 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.9.2/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.9.2/plugins/b110_try_except_pass.html
Location: ./sdmetrics/visualization.py:41:8
40
41 except Exception:
42 pass
43
--------------------------------------------------
Code scanned:
Total lines of code: 12257
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):