-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor primary Github Action - Support writing the output to a file - Add a test for uploading sarif to GH code scanning * Updated action readme example
- Loading branch information
Kevin Formsma
authored
Nov 4, 2021
1 parent
f4b78de
commit 0de7906
Showing
5 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
FROM stelligent/cfn_nag:latest | ||
|
||
ARG INPUT_EXTRA_ARGS='' | ||
ENV INPUT_EXTRA_ARGS="${INPUT_EXTRA_ARGS}" | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ARG INPUT_INPUT_PATH='' | ||
ENV INPUT_INPUT_PATH="${INPUT_INPUT_PATH}" | ||
|
||
ENTRYPOINT ["sh", "-c", "cfn_nag_scan $INPUT_EXTRA_ARGS --input-path $INPUT_INPUT_PATH"] | ||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
echo "::debug::Using input path: ${INPUT_INPUT_PATH}" | ||
echo "::debug::Using output path: ${INPUT_OUTPUT_PATH}" | ||
|
||
if [ -n "${INPUT_EXTRA_ARGS}" ]; then | ||
echo "::debug::Using specified extra args: ${INPUT_EXTRA_ARGS}" | ||
EXTRA_ARGS="${INPUT_EXTRA_ARGS}" | ||
fi | ||
|
||
cfn_nag_scan ${EXTRA_ARGS} --input-path "${INPUT_INPUT_PATH}" | tee "${INPUT_OUTPUT_PATH}" |