Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Rosa de Almeida committed Mar 17, 2020
0 parents commit d137d5c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# sast-check
Run SAST checks using GitHub Actions
15 changes: 15 additions & 0 deletions action.yml
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 }}
2 changes: 2 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!sast-check.sh
8 changes: 8 additions & 0 deletions docker/Dockerfile
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" ]
13 changes: 13 additions & 0 deletions docker/sast-check.sh
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}

0 comments on commit d137d5c

Please sign in to comment.