File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ inputs:
32
32
description : ' path to a .bandit file that supplies command line arguments'
33
33
required : false
34
34
default : ' DEFAULT'
35
+ config_path :
36
+ description : ' path to a YAML or TOML file that supplies command line arguments'
37
+ required : false
38
+ default : ' DEFAULT'
35
39
GITHUB_TOKEN :
36
40
description : ' Github token of the repository (automatically created by Github)'
37
41
required : true
@@ -102,15 +106,22 @@ runs:
102
106
else
103
107
INI_PATH="--ini $INPUT_INI_PATH"
104
108
fi
105
- bandit -f sarif -o results.sarif -r $INPUT_PATH $LEVEL $CONFIDENCE $EXCLUDED_PATHS $EXIT_ZERO $SKIPS $INI_PATH
109
+
110
+ if [ "$INPUT_CONFIG_PATH" == "DEFAULT" ]; then
111
+ CONFIG_PATH=""
112
+ else
113
+ CONFIG_PATH="-c $INPUT_CONFIG_PATH"
114
+ fi
115
+ bandit -f sarif -o results.sarif -r $INPUT_PATH $LEVEL $CONFIDENCE $EXCLUDED_PATHS $EXIT_ZERO $SKIPS $INI_PATH $CONFIG_PATH
106
116
env :
107
117
INPUT_PATH : ${{ inputs.path }}
108
118
INPUT_LEVEL : ${{ inputs.level }}
109
119
INPUT_CONFIDENCE : ${{ inputs.confidence }}
110
120
INPUT_EXCLUDED_PATHS : ${{ inputs.excluded_paths }}
111
121
INPUT_EXIT_ZERO : ${{ inputs.exit_zero }}
112
122
INPUT_SKIPS : ${{ inputs.skips }}
113
- INPUT_INI_PATH : ${{ inputs.ini_path }}
123
+ INPUT_INI_PATH : ${{ inputs.ini_path }}
124
+ INPUT_CONFIG_PATH : ${{ inputs.config_path }}
114
125
115
126
- name : Upload artifact
116
127
uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments