Skip to content

Commit c15b9ea

Browse files
committed
Merge branch 'main' into auto-discovery
2 parents 9e31165 + fdea021 commit c15b9ea

620 files changed

Lines changed: 65389 additions & 49124 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.codeclimate.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ exclude_patterns:
4848
- "**/*.test.ts"
4949
- "**/*.d.ts"
5050
# Generated
51-
- "**/hooks/declarative-subsequent-scans/scan-helpers.js"
52-
- "**/hooks/declarative-subsequent-scans/hook.js"
51+
- "**/hooks/cascading-scans/scan-helpers.js"
52+
- "**/hooks/cascading-scans/hook.js"
5353
# Auto Generated by kubernetes java client
5454
- "**/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/"

‎.eslintignore‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
**/node_modules
66
**/coverage
7-
hooks/declarative-subsequent-scans/hook.js
8-
hooks/declarative-subsequent-scans/scan-helpers.js
9-
hooks/declarative-subsequent-scans/kubernetes-label-selector.js
7+
hooks/cascading-scans/hook.js
8+
hooks/cascading-scans/scan-helpers.js
9+
hooks/cascading-scans/kubernetes-label-selector.js
1010
scanners/zap-advanced/scanner/scripts/*
1111
**/build/reports/*

‎.github/workflows/ci.yaml‎

Lines changed: 155 additions & 106 deletions
Large diffs are not rendered by default.

.github/workflows/helm-charts.yaml renamed to .github/workflows/helm-charts-release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ jobs:
3333
echo "Processing Helm Chart in $dir"
3434
helm package --version $RELEASE_VERSION .
3535
NAME=$(yq eval '.name' - < Chart.yaml)
36-
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
36+
if [ -d "docs" ]; then
37+
echo "Docs Folder found at: ${dir}/docs"
38+
# Use prepared ArtifactHub specific README instead of the general existing one
39+
cp docs/README.ArtifactHub.md README.md
40+
else
41+
echo "Ignoring Docs process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
42+
fi
43+
44+
curl --silent --show-error --http1.1 --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
3745
sleep 5s
3846
)
3947
done

‎.github/workflows/helm-docs.yaml‎

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,101 @@ jobs:
3131
3232
curl --output helm-docs.tar.gz --location https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Linux_x86_64.tar.gz
3333
tar -xvf helm-docs.tar.gz
34-
# Verify install
34+
# Verify installation
3535
./helm-docs --version
3636
3737
- name: Generate Helm Docs
3838
run: |
39-
./helm-docs/helm-docs
39+
# Generate README.md based on Chart.yaml and template
40+
./helm-docs/helm-docs --template-files=./.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./.helm-docs/README.md.gotmpl
41+
42+
- name: Generate Demo-Apps Docs
43+
run: |
44+
# Start in the hooks folder
45+
cd demo-targets
46+
# https://github.com/koalaman/shellcheck/wiki/SC2044
47+
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
48+
(
49+
dir="$(dirname "${chart}")"
50+
echo "Processing Helm Chart in $dir"
51+
cd "${dir}" || exit
52+
if [ -d "docs" ]; then
53+
echo "Docs Folder found at: ${dir}/docs"
54+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Target.md.gotmpl --output-file=docs/README.DockerHub-Target.md
55+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
56+
else
57+
echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
58+
fi
59+
)
60+
done
61+
62+
- name: Generate Docker Hooks Docs
63+
run: |
64+
# Start in the hooks folder
65+
cd hooks
66+
# https://github.com/koalaman/shellcheck/wiki/SC2044
67+
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
68+
(
69+
dir="$(dirname "${chart}")"
70+
echo "Processing Helm Chart in $dir"
71+
cd "${dir}" || exit
72+
if [ -d "docs" ]; then
73+
echo "Docs Folder found at: ${dir}/docs"
74+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Hook.md.gotmpl --output-file=docs/README.DockerHub-Hook.md
75+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
76+
else
77+
echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
78+
fi
79+
)
80+
done
81+
82+
- name: Generate Docker Scanner Docs
83+
run: |
84+
# Start in the scanners folder
85+
cd scanners
86+
# https://github.com/koalaman/shellcheck/wiki/SC2044
87+
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
88+
(
89+
dir="$(dirname "${chart}")"
90+
echo "Processing Helm Chart in $dir"
91+
cd "${dir}" || exit
92+
if [ -d "docs" ]; then
93+
echo "Docs Folder found at: ${dir}/docs"
94+
if [ -d "parser" ]; then
95+
echo "Parser found at: ${dir}/parser"
96+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Parser.md.gotmpl --output-file=docs/README.DockerHub-Parser.md
97+
fi
98+
if [ -d "scanner" ]; then
99+
echo "Scanner found at: ${dir}/parser"
100+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.DockerHub-Scanner.md.gotmpl --output-file=docs/README.DockerHub-Scanner.md
101+
fi
102+
./../../helm-docs/helm-docs --template-files=./../../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
103+
else
104+
echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: ${dir}/docs"
105+
fi
106+
)
107+
done
108+
109+
- name: Generate Core Docs
110+
run: |
111+
# Start in the operator folder
112+
cd operator
113+
if [ -d "docs" ]; then
114+
echo "Docs Folder found at: operator/docs"
115+
./../helm-docs/helm-docs --template-files=./../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../.helm-docs/README.DockerHub-Core.md.gotmpl --output-file=docs/README.DockerHub-Core.md
116+
./../helm-docs/helm-docs --template-files=./../.helm-docs/templates.gotmpl --template-files=.helm-docs.gotmpl --template-files=./../.helm-docs/README.ArtifactHub.md.gotmpl --output-file=docs/README.ArtifactHub.md
117+
else
118+
echo "Ignoring Docs creation process for Chart $dir, because no `docs` folder found at: operator/docs"
119+
fi
120+
121+
- name: Remove Helm Docs Files
122+
run: |
40123
# Remove helm-docs download to ensure they don't get commited back
41124
rm -rf helm-docs
42125
- uses: stefanzweifel/git-auto-commit-action@v4.11.0
43126
with:
44127
commit_message: Updating Helm Docs
45128
commit_user_email: securecodebox@iteratec.com
129+
# Optional. Used by `git-commit`.
130+
# See https://git-scm.com/docs/git-commit#_options
131+
commit_options: '--signoff'
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{{- /*
2+
SPDX-FileCopyrightText: 2020 iteratec GmbH
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/ -}}
6+
{{ template "extra.hintSection" . }}
7+
8+
{{ template "extra.badgesSection" . }}
9+
10+
{{ template "extra.secureCodeBoxAboutSection" . }}
11+
12+
{{ template "extra.chartAboutSection" . }}
13+
14+
{{ template "extra.chartDeploymentSection" . }}
15+
16+
{{ template "extra.scannerConfigurationSection" . }}
17+
18+
{{ template "chart.requirementsSection" . }}
19+
20+
{{ template "extra.chartConfigurationSection" . }}
21+
22+
{{ template "chart.valuesSection" . }}
23+
24+
{{ template "extra.contributionSection" . }}
25+
26+
{{ template "extra.communitySection" . }}
27+
28+
{{ template "extra.licenseSection" . }}
29+
30+
{{ template "extra.generalLinksSection" . }}
31+
{{ template "extra.scannerLinksSection" . }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- /*
2+
SPDX-FileCopyrightText: 2020 iteratec GmbH
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/ -}}
6+
{{ template "extra.hintSection" . }}
7+
8+
{{ template "extra.badgesSection" . }}
9+
10+
{{ template "extra.secureCodeBoxAboutSection" . }}
11+
12+
{{ template "extra.dockerDeploymentSection" . }}
13+
14+
## How to use this image
15+
This `core` image is intended to work in combination with the OWASP secureCodeBox. For more informations details please take a look at the documentation page: {{ template "chart.homepage" . }}.
16+
17+
```bash
18+
docker pull securecodebox/{{ template "chart.name" . }}
19+
```
20+
21+
{{ template "extra.chartAboutSection" . }}
22+
23+
{{ template "extra.communitySection" . }}
24+
25+
{{ template "extra.dockerLicenseSection" . }}
26+
27+
{{ template "extra.generalLinksSection" . }}
28+
{{ template "extra.scannerLinksSection" . }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- /*
2+
SPDX-FileCopyrightText: 2020 iteratec GmbH
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/ -}}
6+
{{ template "extra.hintSection" . }}
7+
8+
{{ template "extra.badgesSection" . }}
9+
10+
{{ template "extra.secureCodeBoxAboutSection" . }}
11+
12+
{{ template "extra.dockerDeploymentSection" . }}
13+
14+
## How to use this image
15+
This `hook` image is intended to work in combination with other `parser` images to read or manipulate `findings` results. For more informations details please take a look at the [project page][scb-docs] or [documentation page][{{ template "chart.homepage" . }}].
16+
17+
```bash
18+
docker pull securecodebox/hook-{{ template "chart.name" . }}
19+
```
20+
21+
{{ template "extra.chartAboutSection" . }}
22+
23+
{{ template "extra.communitySection" . }}
24+
25+
{{ template "extra.dockerLicenseSection" . }}
26+
27+
{{ template "extra.generalLinksSection" . }}
28+
{{ template "extra.scannerLinksSection" . }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- /*
2+
SPDX-FileCopyrightText: 2020 iteratec GmbH
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/ -}}
6+
{{ template "extra.hintSection" . }}
7+
8+
{{ template "extra.badgesSection" . }}
9+
10+
{{ template "extra.secureCodeBoxAboutSection" . }}
11+
12+
{{ template "extra.dockerDeploymentSection" . }}
13+
14+
## How to use this image
15+
This `parser` image is intended to work in combination with the corresponding security scanner docker image to parse the `findings` results. For more informations details please take a look at the documentation page: {{ template "chart.homepage" . }}.
16+
17+
```bash
18+
docker pull securecodebox/parser-{{ template "chart.name" . }}
19+
```
20+
21+
{{ template "extra.chartAboutSection" . }}
22+
23+
{{ template "extra.communitySection" . }}
24+
25+
{{ template "extra.dockerLicenseSection" . }}
26+
27+
{{ template "extra.generalLinksSection" . }}
28+
{{ template "extra.scannerLinksSection" . }}

0 commit comments

Comments
 (0)