diff --git a/entrypoint.sh b/entrypoint.sh index 84cfec0..b41271e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,6 +17,14 @@ cmd="bandit" # cmd+=" -r ${INPUT_PATH}" # fi +# Check for the confidence input and set the confidence level +if [ -n "${INPUT_CONFIDENCE}" ]; then + case "${INPUT_CONFIDENCE}" in + "low") cmd+=" -i" ;; + "medium") cmd+=" -ii" ;; + "high") cmd+=" -iii" ;; + esac +fi [ "$INPUT_PATH" = "true" ] && cmd+=" -r ${INPUT_PATH}" [ "$INPUT_VERBOSE" = "true" ] && cmd+=" -v" @@ -31,7 +39,7 @@ cmd="bandit" [ -n "$INPUT_TESTS" ] && cmd+=" -t $INPUT_TESTS" [ -n "$INPUT_SKIPS" ] && cmd+=" -s $INPUT_SKIPS" [ -n "$INPUT_SEVERITY_LEVEL" ] && cmd+=" --severity-level $INPUT_SEVERITY_LEVEL" -[ -n "$INPUT_CONFIDENCE_LEVEL]" ] && cmd+=" --confidence-level $INPUT_CONFIDENCE_LEVEL" +# [ -n "$INPUT_CONFIDENCE_LEVEL]" ] && cmd+=" --confidence-level $INPUT_CONFIDENCE_LEVEL" [ -n "$INPUT_EXCLUDE_PATHS" ] && cmd+=" -x $INPUT_EXCLUDE_PATHS" [ -n "$INPUT_BASELINE" ] && cmd+=" -b $INPUT_BASELINE" [ -n "$INPUT_INI_PATH" ] && cmd+=" --ini $INPUT_INI_PATH"