-
Notifications
You must be signed in to change notification settings - Fork 292
/
static_code_analysis.txt
113 lines (100 loc) · 4.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
Run started:2024-10-22 16:18:16.010383
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: ./ctgan/__main__.py:122:8
121 if args.sample_condition_column is not None:
122 assert args.sample_condition_column_value is not None
123
--------------------------------------------------
>> 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: ./ctgan/data.py:48:12
47 else:
48 assert item[0] == 'D'
49 discrete.append(idx)
--------------------------------------------------
>> 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: ./ctgan/data.py:69:16
68 else:
69 assert idx in discrete
70 row.append(column_info[idx].index(col))
--------------------------------------------------
>> 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: ./ctgan/data.py:85:20
84 else:
85 assert idx in meta['discrete_columns']
86 print(meta['column_info'][idx][int(col)], end=' ', file=f)
--------------------------------------------------
>> 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: ./ctgan/data_sampler.py:40:8
39 st += sum([span_info.dim for span_info in column_info])
40 assert st == data.shape[1]
41
--------------------------------------------------
>> 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: ./ctgan/synthesizers/ctgan.py:59:8
58 """Apply the Discriminator to the `input_`."""
59 assert input_.size()[0] % self.pac == 0
60 return self.seq(input_.view(-1, self.pacdim))
--------------------------------------------------
>> 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: ./ctgan/synthesizers/ctgan.py:163:8
162 ):
163 assert batch_size % 2 == 0
164
--------------------------------------------------
>> 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: ./ctgan/synthesizers/tvae.py:100:4
99
100 assert st == recon_x.size()[1]
101 KLD = -0.5 * torch.sum(1 + logvar - mu**2 - logvar.exp())
--------------------------------------------------
>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: '# History
'
Severity: Low Confidence: Medium
CWE: CWE-259 (https://cwe.mitre.org/data/definitions/259.html)
More Info: https://bandit.readthedocs.io/en/1.7.7/plugins/b105_hardcoded_password_string.html
Location: ./scripts/release_notes_generator.py:134:12
133
134 token = '# History\n\n'
135 split_index = history.find(token) + len(token) + 1
--------------------------------------------------
Code scanned:
Total lines of code: 1508
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: 9
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 1
High: 8
Files skipped (0):