-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Felipe Rosa de Almeida
committed
Mar 17, 2020
0 parents
commit d137d5c
Showing
5 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# sast-check | ||
Run SAST checks using GitHub Actions |
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,15 @@ | ||
name: 'SAST Check' | ||
description: 'Run SAST checks in your code' | ||
inputs: | ||
path: | ||
description: 'Path to run SAST checks on' | ||
required: false | ||
default: '.' | ||
outputs: | ||
result: | ||
description: 'Output of SAST checks' | ||
runs: | ||
using: 'docker' | ||
image: 'docker/Dockerfile' | ||
args: | ||
- ${{ inputs.path }} |
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,2 @@ | ||
* | ||
!sast-check.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM python:3.8-alpine | ||
|
||
RUN pip install bandit | ||
|
||
ADD sast-check.sh /bin/sast-check | ||
RUN chmod +x /bin/sast-check | ||
|
||
ENTRYPOINT [ "/bin/sast-check" ] |
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,13 @@ | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
bandit --version | ||
bandit -r -a vuln -ii -ll -x .git,.svn,.mvn,.idea,dist,bin,obj,backup,docs,tests,test,tmp,reports,venv "$@" | ||
# EXITCODE=$? | ||
|
||
# RESULT="${RESULT//'%'/'%25'}" | ||
# RESULT="${RESULT//$'\n'/'%0A'}" | ||
# RESULT="${RESULT//$'\r'/'%0D'}" | ||
# echo "::set-output name=result::${RESULT}" | ||
|
||
# exit ${EXITCODE} |