Skip to content

Commit

Permalink
Resolve some shellcheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Oct 19, 2022
1 parent 57954b6 commit 582933f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if [ "$INPUT_TFSEC_VERSION" != "latest" ]; then
TFSEC_VERSION="/tags/${INPUT_TFSEC_VERSION}"
fi

wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec/releases${TFSEC_VERSION} -O - | grep -m 1 -o -E "https://.+?tfsec-linux-amd64" | head -n1)" > tfsec-linux-amd64
wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec/releases${TFSEC_VERSION} -O - | grep -m 1 -o -E "https://.+?tfsec_checksums.txt" | head -n1)" > tfsec.checksums
wget -O - -q "$(wget -q "https://api.github.com/repos/aquasecurity/tfsec/releases${TFSEC_VERSION}" -O - | grep -m 1 -o -E "https://.+?tfsec-linux-amd64" | head -n1)" > tfsec-linux-amd64
wget -O - -q "$(wget -q "https://api.github.com/repos/aquasecurity/tfsec/releases${TFSEC_VERSION}" -O - | grep -m 1 -o -E "https://.+?tfsec_checksums.txt" | head -n1)" > tfsec.checksums

grep tfsec-linux-amd64 tfsec.checksums > tfsec-linux-amd64.checksum
sha256sum -c tfsec-linux-amd64.checksum
Expand All @@ -19,8 +19,8 @@ if [ "$INPUT_COMMENTER_VERSION" != "latest" ]; then
COMMENTER_VERSION="tags/${INPUT_COMMENTER_VERSION}"
fi

wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec-pr-commenter-action/releases/${COMMENTER_VERSION} -O - | grep -o -E "https://.+?commenter-linux-amd64")" > commenter-linux-amd64
wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec-pr-commenter-action/releases/${COMMENTER_VERSION} -O - | grep -o -E "https://.+?checksums.txt")" > commenter.checksums
wget -O - -q "$(wget -q "https://api.github.com/repos/aquasecurity/tfsec-pr-commenter-action/releases/${COMMENTER_VERSION}" -O - | grep -o -E "https://.+?commenter-linux-amd64")" > commenter-linux-amd64
wget -O - -q "$(wget -q "https://api.github.com/repos/aquasecurity/tfsec-pr-commenter-action/releases/${COMMENTER_VERSION}" -O - | grep -o -E "https://.+?checksums.txt")" > commenter.checksums

grep commenter-linux-amd64 commenter.checksums > commenter-linux-amd64.checksum
sha256sum -c commenter-linux-amd64.checksum
Expand All @@ -41,5 +41,5 @@ if [ -n "${INPUT_TFSEC_FORMATS}" ]; then
TFSEC_OUT_OPTION="${TFSEC_OUT_OPTION%.*}"
fi

tfsec --out=${TFSEC_OUT_OPTION} --format=${TFSEC_FORMAT_OPTION} --soft-fail ${TFSEC_ARGS_OPTION} "${INPUT_WORKING_DIRECTORY}"
tfsec --out=${TFSEC_OUT_OPTION} --format="${TFSEC_FORMAT_OPTION}" --soft-fail "${TFSEC_ARGS_OPTION}" "${INPUT_WORKING_DIRECTORY}"
commenter

0 comments on commit 582933f

Please sign in to comment.