Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit d59daec

Browse files
authored
Merge pull request #113 from secureCodeBox/feature/helm2-support
Trying to support helm2 in parallel to helm3 (WIP).
2 parents 5621c34 + 5a14380 commit d59daec

File tree

22 files changed

+342
-3
lines changed

22 files changed

+342
-3
lines changed

.github/workflows/helm-charts.yaml

+30-3
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,46 @@ jobs:
1313
sudo snap install yq
1414
- name: Parse Tag
1515
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
16-
- name: "Publish Helm Chart"
16+
- name: "Publish Helm3 Charts"
1717
env:
1818
HELM_REGISTRY: https://charts.securecodebox.io
1919
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
2020
PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }}
2121
run: |
22-
# Publish charts in all folders containing a `Chart.yaml` file
22+
# Publish all helm3 charts in all folders containing a `Chart.yaml` file
2323
# https://github.com/koalaman/shellcheck/wiki/SC2044
2424
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
2525
(
2626
dir="$(dirname "${chart}")"
2727
cd "${dir}" || exit
28-
echo "Processing Chart in $dir"
28+
echo "Processing Helm3 Chart in $dir"
29+
helm package --version $RELEASE_VERSION .
30+
NAME=$(yq read - name < Chart.yaml)
31+
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
32+
)
33+
done
34+
- name: "Publish Helm2 Charts"
35+
env:
36+
HELM_REGISTRY: https://charts-helm2.securecodebox.io
37+
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
38+
PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }}
39+
run: |
40+
# Publish all helm2 charts in all folders containing a `helm2.Chart.yaml` file
41+
# https://github.com/koalaman/shellcheck/wiki/SC2044
42+
find . -type f -name helm2.Chart.yaml -print0 | while IFS= read -r -d '' chart; do
43+
(
44+
dir="$(dirname "${chart}")"
45+
cd "${dir}" || exit
46+
mv Chart.yaml helm3.Chart.yaml
47+
mv helm2.Chart.yaml Chart.yaml
48+
if [ ${dir} = "operator" ]
49+
then
50+
cp -R crds templates/crds
51+
fi
52+
echo "Restoring Helm2 Chart and replace Helm3 Chart temporary"
53+
[ ! -f helm2.requirements.lock ] || mv helm2.requirements.lock requirements.lock
54+
[ ! -f helm2.requirements.yaml ] || mv helm2.requirements.yaml requirements.yaml
55+
echo "Processing Helm2 Chart in $dir"
2956
helm package --version $RELEASE_VERSION .
3057
NAME=$(yq read - name < Chart.yaml)
3158
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: declarative-subsequent-scans
3+
description: Starts possible subsequent security scans based on findings (e.g. open ports found by NMAP or subdomains found by AMASS).
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: generic-webhook
3+
description: Lets you send http webhooks after scans are completed
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: imperative-subsequent-scans
3+
description: Starts possible subsequent security scans based on findings (e.g. open ports found by NMAP or subdomains found by AMASS).
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
name: persistence-elastic
3+
description: The elastic persistence provider persists secureCodeBox findings into the elastic stack.
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest
9+
10+
appVersion: 7.6.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: elasticsearch
3+
repository: https://helm.elastic.co
4+
version: 7.6.1
5+
- name: kibana
6+
repository: https://helm.elastic.co
7+
version: 7.6.1
8+
digest: sha256:7d3461d986f620421f775f9ecaf73af2565ace9d909a8134c4259c5206f1f89c
9+
generated: "2020-03-17T15:09:24.838784+01:00"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: elasticsearch
3+
version: 7.6.1
4+
repository: https://helm.elastic.co
5+
condition: elasticsearch.enabled
6+
- name: kibana
7+
version: 7.6.1
8+
repository: https://helm.elastic.co
9+
condition: kibana.enabled

hooks/update-field/helm2.Chart.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: update-field-hook
3+
description: Lets you add or override a field to every finding
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest

operator/helm2.Chart.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: operator
3+
description: secureCodeBox Operator to automate the execution of security scans on kubernetes
4+
5+
type: application
6+
7+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
8+
version: latest

operator/helm2.requirements.lock

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: minio
3+
repository: https://kubernetes-charts.storage.googleapis.com/
4+
version: 5.0.19
5+
digest: sha256:13a3a902e7ac7dcc7124ab858344b5bebe9ab623d06ee9c8d5a1cc3f467a36bb
6+
generated: "2020-08-10T13:09:59.053995+02:00"

operator/helm2.requirements.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dependencies:
2+
- name: minio
3+
version: 5.0.19
4+
repository: https://kubernetes-charts.storage.googleapis.com/
5+
condition: minio.enabled

scanners/amass/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: amass
3+
description: A Helm chart for the Amass security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: 3.10.3
9+
10+
keywords:
11+
- security
12+
- amass
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/amass
16+
icon: https://www.securecodebox.io/scannerIcons/Amass.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/kube-hunter/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: kube-hunter
3+
description: A Helm chart for the kube-hunter security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: v0.3.0
9+
10+
keywords:
11+
- security
12+
- kube-hunter
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/kube-hunter
16+
icon: https://www.securecodebox.io/scannerIcons/kube-hunter.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/ncrack/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: ncrack
3+
description: A Helm chart for the NCRACK security Scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: 0.7
9+
10+
keywords:
11+
- security
12+
- ncrack
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/ncrack
16+
icon: https://www.securecodebox.io/scannerIcons/Ncrack.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/nikto/helm2.Chart.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
name: nikto
3+
description: A Helm chart for the Nikto security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
# appVersion - Nikto doesn't really version its releases
9+
appVersion: latest
10+
11+
keywords:
12+
- security
13+
- nikto
14+
- scanner
15+
- secureCodeBox
16+
home: https://www.securecodebox.io/scanners/nikto
17+
icon: https://www.securecodebox.io/scannerIcons/Nikto.svg
18+
sources:
19+
- https://github.com/secureCodeBox/secureCodeBox
20+
maintainers:
21+
- name: iteratec GmbH
22+

scanners/nmap/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: nmap
3+
description: A Helm chart for the NMAP security Scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: 7.80-r2
9+
10+
keywords:
11+
- security
12+
- nmap
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/nmap
16+
icon: https://www.securecodebox.io/scannerIcons/Nmap.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/ssh_scan/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: ssh-scan
3+
description: A Helm chart for the SSH_Scan security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: "0.0.43"
9+
10+
keywords:
11+
- security
12+
- ssh
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/ssh
16+
icon: https://www.securecodebox.io/scannerIcons/SSH.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/sslyze/helm2.Chart.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: sslyze
3+
description: A Helm chart for the SSLyze security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: v3.0.6
9+
10+
keywords:
11+
- security
12+
- ssl
13+
- scanner
14+
- secureCodeBox
15+
home: https://www.securecodebox.io/scanners/sslyze
16+
icon: https://www.securecodebox.io/scannerIcons/SSLyze.svg
17+
sources:
18+
- https://github.com/secureCodeBox/secureCodeBox
19+
maintainers:
20+
- name: iteratec GmbH
21+

scanners/test-scan/helm2.Chart.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
name: test-scan
3+
description: A Helm chart to test the secureCodeBox operator
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
9+
keywords:
10+
- security
11+
- scanner
12+
- secureCodeBox
13+
- integrationTest
14+
- test
15+
sources:
16+
- https://github.com/secureCodeBox/secureCodeBox
17+
maintainers:
18+
- name: iteratec GmbH
19+

scanners/trivy/helm2.Chart.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
name: trivy
3+
description: A Helm chart for the trivy security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: v0.6.0
9+
10+
keywords:
11+
- security
12+
- trivy
13+
- image-scanning
14+
- scanner
15+
- secureCodeBox
16+
home: https://www.securecodebox.io/scanners/trivy
17+
icon: https://github.com/aquasecurity/trivy/blob/master/imgs/logo.png
18+
sources:
19+
- https://github.com/secureCodeBox/secureCodeBox
20+
maintainers:
21+
- name: iteratec GmbH
22+

scanners/wpscan/helm2.Chart.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
name: wpscan
3+
description: A Helm chart for the WordPress security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: latest
9+
10+
keywords:
11+
- security
12+
- wpscan
13+
- wordpress
14+
- scanner
15+
- secureCodeBox
16+
home: https://www.securecodebox.io/scanners/wpscan
17+
icon: https://www.securecodebox.io/scannerIcons/WPScan.svg
18+
sources:
19+
- https://github.com/secureCodeBox/scanner-infrastructure-wpscan
20+
maintainers:
21+
- name: iteratec GmbH
22+

scanners/zap/helm2.Chart.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
name: zap
3+
description: A Helm chart for the OWASP ZAP security scanner that integrates with the secureCodeBox.
4+
5+
type: application
6+
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
7+
version: latest
8+
appVersion: v2.9.0
9+
10+
keywords:
11+
- security
12+
- Zap
13+
- OWASP
14+
- scanner
15+
- secureCodeBox
16+
home: https://www.securecodebox.io/scanners/zap
17+
icon: https://www.securecodebox.io/scannerIcons/ZAP.svg
18+
sources:
19+
- https://github.com/secureCodeBox/secureCodeBox
20+
maintainers:
21+
- name: iteratec GmbH
22+

0 commit comments

Comments
 (0)