File tree 3 files changed +31
-2
lines changed
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Runs bandit security checker for code written in Python.
2
+ name : Bandit
3
+
4
+ on : [push, pull_request, workflow_dispatch]
5
+
6
+ jobs :
7
+ linux :
8
+ name : Bandit
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - name : Clone the git repo
13
+ uses : actions/checkout@v3
14
+
15
+ - name : Install apt packages
16
+ run : |
17
+ sudo apt-get update
18
+ sudo apt-get install -y doxygen
19
+
20
+ - name : Install pip packages
21
+ run : pip install -r third_party/requirements.txt
22
+
23
+ # Scan is run only for the 'tools' folder.
24
+ - name : Run Bandit
25
+ run : |
26
+ bandit -r tools
Original file line number Diff line number Diff line change 1
1
alabaster == 0.7.12
2
2
Babel == 2.7.0
3
+ bandit == 1.6.2
3
4
beautifulsoup4 == 4.11.1
4
5
breathe == 4.33.1
5
6
bs4 == 0.0.1
Original file line number Diff line number Diff line change 5
5
# See LICENSE.TXT
6
6
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
7
import argparse
8
- import subprocess
8
+ import subprocess # nosec B404
9
9
import os
10
10
import sys
11
11
@@ -134,7 +134,9 @@ def get_dynamic_library_name(name):
134
134
print (env )
135
135
136
136
if config ['command' ]:
137
- result = subprocess .run (config ['command' ], env = env )
137
+ # The core functionality is to pass the user's command,
138
+ # and it is the user's responsibility to pass secure parameters.
139
+ result = subprocess .run (config ['command' ], env = env ) # nosec B603
138
140
if args .debug :
139
141
print (result )
140
142
exit (result .returncode )
You can’t perform that action at this time.
0 commit comments