Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Github Action to run Checkmarx scan #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/reapsaw-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Reapsaw Scan
on:
push:
branches: [master]
workflow_dispatch:
branches: [master]

jobs:
scan:
runs-on: ubuntu-latest
steps:

- name: Install python
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Get token
id: get_token
uses: machine-learning-apps/actions-app-token@master
with:
APP_ID: ${{ secrets.REAPSAW_APP_ID }}
APP_PEM: ${{ secrets.REAPSAW_APP_PEM }}

- name: Checkout Reapsaw
uses: actions/checkout@v2
with:
repository: newscorp-ghfb/cso-reapsaw2
token: ${{ steps.get_token.outputs.app_token }}

- name: Checkout
uses: actions/checkout@v2
with:
ref: master
path: target-repo

- name: Install reapsaw client
run: python setup.py install

- name: Create service account file
run: |
mkdir $HOME/secrets
echo "$SA_SECRET"| base64 --decode > $HOME/secrets/sa_keyfile.json
env:
SA_SECRET: ${{ secrets.REAPSAW_SA_SECRET }}

- name: Run Reapsaw scan
run: |
export SA_KEYFILE=$HOME/secrets/sa_keyfile.json
reapsaw scan $PROJECT_ID ${GITHUB_WORKSPACE}/target-repo $LANGUAGE --repo https://github.com/${GITHUB_REPOSITORY} --branch master
env:
PROJECT_ID: ${{ secrets.REAPSAW_PROJECT_ID }}
REAPSAW_BASE_URL: ${{ secrets.REAPSAW_BASE_URL }}
LANGUAGE: js