Skip to content

Commit

Permalink
Making user to define either a framework, control or an image
Browse files Browse the repository at this point in the history
  • Loading branch information
slashben committed Jan 9, 2024
1 parent ec64e8d commit abb1d5d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ set -e
export KS_CLIENT="github_actions"

if [ -n "${INPUT_FRAMEWORKS}" ] && [ -n "${INPUT_CONTROLS}" ]; then
echo "Framework and Control are specified. Please specify either one of them or neither"
echo "Framework and Control are specified. Please specify either one of them"
exit 1
fi

if [ -z "${INPUT_FRAMEWORKS}" ] && [ -z "${INPUT_CONTROLS}" ] && [ -z "${INPUT_IMAGE}" ]; then
echo "Neither Framework, Control nor image are specified. Please specify one of them"
exit 1
fi


if [ -n "${INPUT_FRAMEWORKS}" ] && [ -n "${INPUT_IMAGE}" ] || [ -n "${INPUT_CONTROLS}" ] && [ -n "${INPUT_IMAGE}" ] ; then
errmsg="Image and Framework / Control are specified. Kubescape does not support scanning both at the moment."
errmsg="${errmsg} Please specify either one of them or neither."
Expand Down

0 comments on commit abb1d5d

Please sign in to comment.