Skip to content

Commit 8cd1949

Browse files
authored
Merge pull request #792 from secureCodeBox/feature/scb-bot-pat-token
Changed SCB-BOT PR's token to GitHub PAT
2 parents 1c500f8 + 022a7e5 commit 8cd1949

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/scb-bot.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Check outdated scanners
2-
on:
2+
on:
33
schedule:
4-
- cron: "15 9 * * *" # Daily at 9:15 (avoids the beginning of the hour congestion)
4+
- cron: "15 9 * * *" # Daily at 9:15 (avoids the beginning of the hour congestion)
55
jobs:
66
version-compare:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
1010
scanner:
11-
- amass # Scanner that needs to be updated
11+
- amass
1212
- angularjs-csti-scanner
1313
- cmseek
1414
- gitleaks
@@ -23,12 +23,11 @@ jobs:
2323
- whatweb
2424
- wpscan
2525
- zap
26-
- zap-advanced
27-
# These are commented out for the moment to avoid accidental multiple erroneous PRs
26+
- zap-advanced
2827
# missing scanners are : nmap, nikto, typo3scan
2928
steps:
3029
- uses: actions/checkout@v2
31-
30+
3231
- name: Import GPG key
3332
uses: crazy-max/ghaction-import-gpg@v3
3433
with:
@@ -40,11 +39,11 @@ jobs:
4039
- name: Fetch scanner's version API
4140
uses: mikefarah/yq@v4.4.1
4241
with:
43-
cmd: echo versionApi=$(yq e .versionApi scanners/${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV
42+
cmd: echo versionApi=$(yq e .versionApi scanners/${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV
4443

4544
- name: Fetch latest release scanner version
4645
run: echo release=$((curl -sL ${{env.versionApi}} ) | jq -r ".tag_name") | tr -d "v" >> $GITHUB_ENV
47-
46+
4847
- name: Fetch local scanner version
4948
uses: mikefarah/yq@v4.4.1
5049
with:
@@ -59,20 +58,20 @@ jobs:
5958
echo pullRequest=$pullRequestTitle >> $GITHUB_ENV
6059
6160
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
62-
echo prExists=$(gh pr list --state open --limit 100 | grep -F "$pullRequestTitle" -c) >> $GITHUB_ENV
61+
echo prExists=$(gh pr list --state open --limit 100 | grep -F "$pullRequestTitle" -c) >> $GITHUB_ENV
6362
64-
- name : Upgrade Scanner
65-
if: ${{ env.release != env.local && env.prExists == 0 }}
63+
- name: Upgrade Scanner
64+
if: ${{ env.release != env.local && env.prExists == 0 }}
6665
uses: mikefarah/yq@v4.4.1
6766
with:
68-
# appVersion value in chart is replaced with release value. Empty lines are deleted in the process
67+
# appVersion value in chart is replaced with release value. Empty lines are deleted in the process
6968
cmd: yq e --inplace '.appVersion = "v${{env.release}}"' ./scanners/${{ matrix.scanner }}/Chart.yaml
7069

71-
- name : Create Pull Request
72-
if: ${{ env.release != env.local && env.prExists == 0 }}
70+
- name: Create Pull Request
71+
if: ${{ env.release != env.local && env.prExists == 0 }}
7372
uses: peter-evans/create-pull-request@v3
7473
with:
75-
token: ${{ secrets.GITHUB_TOKEN }}
74+
token: ${{ secrets.SCB_BOT_USER_TOKEN }}
7675
committer: secureCodeBoxBot <securecodebox@iteratec.com>
7776
author: secureCodeBoxBot <securecodebox@iteratec.com>
7877
title: ${{ env.pullRequest }}

0 commit comments

Comments
 (0)