-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (46 loc) · 1.49 KB
/
reapsaw-scan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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: python