-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.48 KB
/
repo-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
name: NCTL Scan Pipeline Demo
run-name: ${{ github.actor }} has triggered Scan Action 🚀
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
env:
NIRMATA_TOKEN: ${{ secrets.NIRMATA_TOKEN }}
NIRMATA_URL: ${{ secrets.NIRMATA_URL }}
jobs:
NCTL-Scan-Repository:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- name: Checkout PR branch
uses: actions/checkout@v3
with:
# Checks out the repository linked to the PR
repository: ${{ github.event.pull_request.head.repo.full_name }}
# Checks out the branch from the PR
ref: ${{ github.event.pull_request.head.ref }}
# - name: Install nctl
# uses: nirmata/[email protected]
- name: nctl-scan-installer
uses: supplypike/setup-bin@v4
with:
uri: https://dl.nirmata.io/nctl/nctl_4.2.3/nctl_4.2.3_linux_386.zip
name: 'nctl'
version: '4.2.3'
- name: Check nctl version
run: |
nctl version
- name: nctl login
run: nctl login --url $NIRMATA_URL --userid [email protected] --token $NIRMATA_TOKEN
- name: NCTL Scan Repository
run: |
nctl scan repository --policy-sets pss-baseline,pss-restricted,dockerfile-best-practices --publish-token $NIRMATA_TOKEN --details
- run: echo "🍏 This job's status is ${{ job.status }}."