Skip to content

Commit

Permalink
Basic Sobelow action with sarif file output
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinMB committed Jan 4, 2021
1 parent cfd3564 commit 1afd6d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ FROM elixir:1.11.2

COPY sobelow.sh /sobelow.sh

ENV DIR=GITHUB_WORKSPACE

WORKDIR ${DIR}

ENTRYPOINT ["/sobelow.sh"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Sobelow Action

...

7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ author: Griffin Byatt
description: Security-focused static analysis for the Phoenix Framework

inputs:
report:
required: true
description: "Output a results.sarif file for GitHub Security integration"
default: true
flags:
description: "Flags (https://github.com/nccgroup/sobelow#options)"

runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.flags }}
- ${{ inputs.flags }}
- ${{ inputs.report }}
8 changes: 6 additions & 2 deletions sobelow.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/sh -l

mix local.hex --force
mix escript.install github nccgroup/sobelow --force
mix escript.install hex sobelow --force

~/.mix/escripts/sobelow $1
if [ "$2" = "false" ]; then
~/.mix/escripts/sobelow $1
else
~/.mix/escripts/sobelow $1 --format sarif >> results.sarif
fi

0 comments on commit 1afd6d2

Please sign in to comment.