Skip to content

Commit 9d995f4

Browse files
committed
Merge branch 'main' into bugfix/scb-bot-pr-changelog
This is done to get it inline with the #819 PR Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
2 parents 0cbef11 + ab859dd commit 9d995f4

9 files changed

Lines changed: 49 additions & 33 deletions

File tree

.github/workflows/scb-bot.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,37 @@ jobs:
3737
git-user-signingkey: true
3838
git-commit-gpgsign: true
3939

40+
- name: Fetch local scanner version
41+
uses: mikefarah/yq@v4.4.1
42+
with:
43+
cmd: echo local=$(yq e .appVersion scanners/${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV
44+
4045
- name: Fetch scanner's version API
4146
uses: mikefarah/yq@v4.4.1
4247
with:
4348
cmd: echo versionApi=$(yq e .annotations.versionApi scanners/${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV
4449

4550
- name: Fetch latest release scanner version
46-
run: echo release=$((curl -sL ${{env.versionApi}} ) | jq -r ".tag_name") | tr -d "v" >> $GITHUB_ENV
47-
48-
- name: Fetch local scanner version
49-
uses: mikefarah/yq@v4.4.1
50-
with:
51-
cmd: echo local=$(yq e .appVersion scanners/${{ matrix.scanner }}/Chart.yaml) | tr -d "v" >> $GITHUB_ENV
51+
# A hacky way to solve the problem where the docker image is in the "1.0" format and the github release is in the "v1.0" format
52+
# We make sure to add or remove the "v" character when necessary
53+
run: |
54+
local=${{env.local}}
55+
release=$(curl -sL ${{env.versionApi}} | jq -r ".tag_name" )
56+
upgrade=$release
57+
58+
if [[ ${local:0:1} != ${release:0:1} ]] ; then
59+
if [[ ${local:0:1} == "v" ]] ; then
60+
upgrade=v${release};
61+
elif [[ ${release:0:1} == "v" ]] ; then
62+
upgrade=$(echo $release| tr -d "v")
63+
fi
64+
fi
65+
66+
echo $upgrade
67+
echo release=$upgrade >> $GITHUB_ENV
5268
5369
- name: Check if scanner is outdated and if PR already exists
54-
if: ${{ env.release != env.local }}
70+
if: ${{ env.release != env.local && env.release != null }}
5571
run: |
5672
echo 'The ${{ matrix.scanner }} scanner is outdated. Current SCB version is ${{env.local}} and remote version is ${{env.release}}'
5773
@@ -65,14 +81,15 @@ jobs:
6581
if: ${{ env.release != env.local }}
6682
run: |
6783
changelog=$(curl -sL ${{env.versionApi}} | jq -r ".body" | sed -e 's/#[0-9]\+//g')
84+
echo $changelog
6885
echo releaseChangelog=$changelog >> $GITHUB_ENV
6986
7087
- name: Upgrade Scanner Helm Chart
71-
if: ${{ env.release != env.local && env.prExists == 0 }}
88+
if: ${{ env.release != env.local && env.prExists == 0 && env.release != null}}
7289
uses: mikefarah/yq@v4.4.1
7390
with:
7491
# appVersion value in chart is replaced with release value. Empty lines are deleted in the process
75-
cmd: yq e --inplace '.appVersion = "v${{env.release}}"' ./scanners/${{ matrix.scanner }}/Chart.yaml
92+
cmd: yq e --inplace '.appVersion = "${{env.release}}"' ./scanners/${{ matrix.scanner }}/Chart.yaml
7693

7794
# Updating Helm Docs
7895
- name: Download Helm Docs
@@ -114,7 +131,7 @@ jobs:
114131
rm -rf helm-docs
115132
116133
- name: Create Pull Request
117-
if: ${{ env.release != env.local && env.prExists == 0 }}
134+
if: ${{ env.release != env.local && env.prExists == 0 && env.release != null }}
118135
uses: peter-evans/create-pull-request@v3
119136
with:
120137
token: ${{ secrets.SCB_BOT_USER_TOKEN }}

parser-sdk/nodejs/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parser-sdk/nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"ajv": "^8.6.3",
1212
"ajv-draft-04": "^1.0.0",
1313
"ajv-formats": "^2.1.0",
14-
"axios": "^0.21.4",
14+
"axios": "^0.22.0",
1515
"jsonpointer": "^5.0.0",
1616
"uuid": "^8.3.2",
1717
"ws": "^7.5.5"

scanners/semgrep/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ version: "v3.1.0-alpha1"
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: "0.71.0"
21+
appVersion: "0.73.0"
2222
annotations:
2323
versionApi: https://api.github.com/repos/returntocorp/semgrep/releases/latest
2424
kubeVersion: ">=v1.11.0-0"

scanners/semgrep/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Semgrep"
33
category: "scanner"
44
type: "Repository"
55
state: "released"
6-
appVersion: "0.71.0"
6+
appVersion: "0.73.0"
77
usecase: "Static Code Analysis"
88
---
99

scanners/trivy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: A Helm chart for the trivy security scanner that integrates with th
88
type: application
99
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
1010
version: v3.1.0-alpha1
11-
appVersion: "0.20.2"
11+
appVersion: "0.21.0"
1212
kubeVersion: ">=v1.11.0-0"
1313
annotations:
1414
versionApi: https://api.github.com/repos/aquasecurity/trivy/releases/latest

scanners/trivy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Trivy"
33
category: "scanner"
44
type: "Container"
55
state: "released"
6-
appVersion: "0.20.2"
6+
appVersion: "0.21.0"
77
usecase: "Container Vulnerability Scanner"
88
---
99

scanners/wpscan/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
apiVersion: v2
66
name: wpscan
77
description: A Helm chart for the WordPress security scanner that integrates with the secureCodeBox.
8-
98
type: application
109
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
1110
version: v3.1.0-alpha1
12-
appVersion: "v3.8.19"
11+
appVersion: "v3.8.20"
1312
kubeVersion: ">=v1.11.0-0"
1413

1514
annotations:

scanners/wpscan/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'WPScan'
33
category: 'scanner'
44
type: "CMS"
55
state: "released"
6-
appVersion: "v3.8.19"
6+
appVersion: "v3.8.20"
77
usecase: "Wordpress Vulnerability Scanner"
88
---
99

0 commit comments

Comments
 (0)