|
1 | 1 | name: Check outdated scanners |
2 | 2 | on: |
3 | 3 | push: |
4 | | -# schedule: |
5 | | -# - cron: "0 8 * * *" |
| 4 | + schedule: |
| 5 | + - cron: "15 9 * * *" |
6 | 6 | jobs: |
7 | 7 | version-compare: |
8 | 8 | runs-on: ubuntu-latest |
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | 11 | scanner: |
12 | | - - amass |
13 | | - # - angularjs-csti-scanner |
| 12 | + - amass # Scanner that needs to be updated |
| 13 | + - angularjs-csti-scanner # Scanner that does not need to be updated |
14 | 14 | # - gitleaks |
15 | 15 | # - kube-hunter |
16 | 16 | # - kubeaudit |
@@ -49,16 +49,16 @@ jobs: |
49 | 49 | with: |
50 | 50 | cmd: echo local=$(yq e .appVersion scanners/${{ matrix.scanner }}/Chart.yaml) | tr -d "v" >> $GITHUB_ENV |
51 | 51 |
|
52 | | - - name: Check if outdated and if PR already exists |
| 52 | + - name: Check if scanner is outdated and if PR already exists |
53 | 53 | if: ${{ env.release != env.local }} |
54 | 54 | run: | |
55 | 55 | echo '${{ matrix.scanner }} scanner is outdated. scB version is ${{env.local}} and remote version is ${{env.release}}' |
56 | | - |
| 56 | +
|
57 | 57 | pullRequestTitle="[sCB-Bot] Upgraded ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}" |
58 | 58 | echo pullRequest=$pullRequestTitle >> $GITHUB_ENV |
59 | 59 |
|
60 | 60 | echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token |
61 | | - echo prExists=$(gh pr list --state all --limit 100 | grep "$pullRequestTitle" -c) >> $GITHUB_ENV |
| 61 | + echo prExists=$(gh pr list --state open --limit 100 | grep -F "$pullRequestTitle" -c) >> $GITHUB_ENV |
62 | 62 |
|
63 | 63 | - name : Upgrade Scanner |
64 | 64 | if: ${{ env.release != env.local && env.prExists == 0 }} |
|
75 | 75 | committer: secureCodeBoxBot <securecodebox@iteratec.com> |
76 | 76 | author: secureCodeBoxBot <securecodebox@iteratec.com> |
77 | 77 | title: ${{ env.pullRequest }} |
78 | | - body: "This is an automated Pull Request by the sCB-Bot. It Upgrades ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}" |
| 78 | + body: "This is an automated Pull Request by the sCB-Bot. It upgrades ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}" |
79 | 79 | branch: "dependencies/upgrading-${{ matrix.scanner }}-to-${{env.release}}" |
80 | 80 | labels: dependencies,scanner |
81 | 81 | commit-message: "Upgrading ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}" |
|
0 commit comments