-
Notifications
You must be signed in to change notification settings - Fork 328
Expand file tree
/
Copy pathstatic_code_analysis.txt
More file actions
111 lines (99 loc) · 4.97 KB
/
static_code_analysis.txt
File metadata and controls
111 lines (99 loc) · 4.97 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
Run started:2026-02-12 22:24:35.767908+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: ./ctgan/__main__.py:121:8
120 if args.sample_condition_column is not None:
121 assert args.sample_condition_column_value is not None
122
--------------------------------------------------
>> 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: ./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.9.2/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.9.2/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.9.2/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: [B614:pytorch_load] Use of unsafe PyTorch load
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/plugins/b614_pytorch_load.html
Location: ./ctgan/synthesizers/base.py:124:16
123 device = _set_device(enable_gpu=True)
124 model = torch.load(path, weights_only=False)
125 model.set_device(device)
--------------------------------------------------
>> 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: ./ctgan/synthesizers/ctgan.py:61:8
60 """Apply the Discriminator to the `input_`."""
61 assert input_.size()[0] % self.pac == 0
62 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.9.2/plugins/b101_assert_used.html
Location: ./ctgan/synthesizers/ctgan.py:169:8
168 ):
169 assert batch_size % 2 == 0
170
--------------------------------------------------
>> 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: ./ctgan/synthesizers/tvae.py:101:4
100
101 assert st == recon_x.size()[1]
102 KLD = -0.5 * torch.sum(1 + logvar - mu**2 - logvar.exp())
--------------------------------------------------
Code scanned:
Total lines of code: 1479
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: 8
Medium: 1
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 9
Files skipped (0):