-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.82 KB
/
Copy pathmain.yml
File metadata and controls
51 lines (49 loc) · 1.82 KB
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: CI
on:
push:
branches:
- master
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * THU"
jobs:
start_and_wait_scan:
runs-on: ubuntu-18.04
name: A job to run a Nexploit scan
steps:
- uses: actions/checkout@v2
- run: |
sudo apt update
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo apt-get install nodejs-dev node-gyp libssl1.0-dev
sudo apt-get install nodejs npm
sudo npm install -g @neuralegion/nexploit-cli --unsafe-perm=true
- name: Save environment variables
run: |
printf "NEXPLOIT_TOKEN=${{ secrets.BRIGHT_TOKEN }}\nREPEATER=${{ secrets.REPEATER }}\n" > .env
cat .env
- run: sleep 30s
- name: Start Nexploit Scan 🏁
id: start
run: |
SCAN_ID=$(nexploit-cli scan:run \
--name "BROKEN NAME" \
--crawler https://brokencrystals.com \
--token ${{ secrets.BRIGHT_TOKEN }})
echo "SCAN_ID=$SCAN_ID" >> $GITHUB_ENV
- name: Get the output scan url 🔗
run: |
printf "Scan was started with ID https://nexploit.app/scans/$SCAN_ID"
- name: Wait for issues ⏳
run: |
nexploit-cli scan:polling \
--interval 30s \
--timeout 10m \
--token ${{ secrets.BRIGHT_TOKEN }} \
--breakpoint high_issue $SCAN_ID
- name: Stop Scan 🛑
continue-on-error: true
if: ${{ always() }}
run: nexploit-cli scan:stop --token ${{ secrets.BRIGHT_TOKEN }} $SCAN_ID