Skip to content

Commit 80a1a3d

Browse files
authored
Merge branch 'main' into kubeaudit
2 parents 4d1c91b + 6727caa commit 80a1a3d

169 files changed

Lines changed: 1003 additions & 7151 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.

‎.github/ISSUE_TEMPLATE/new_hook.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Before opening a new issue, please make sure that we do not have any duplicates
2626

2727
## Steps to implement a new Hook
2828
<!--
29-
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/docs/developer-guide)
29+
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox/tree/master/docs/developer-guide)
3030
-->
3131

32-
- [ ] Create a new folder with the name of the [hook here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/hooks)
32+
- [ ] Create a new folder with the name of the [hook here](https://github.com/secureCodeBox/secureCodeBox/tree/master/hooks)
3333
- [ ] Add a README and give a brief overview of the scanner and its configuration options.
3434
- [ ] Add (optional) a Dockerfile for the scanner if there is no existing one publicly available on dockerHub
35-
- [ ] Use the [Hook-SDK](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/hook-sdk) to implement a new hook (currently based on NodeJS)
35+
- [ ] Use the [Hook-SDK](https://github.com/secureCodeBox/secureCodeBox/tree/master/hook-sdk) to implement a new hook (currently based on NodeJS)
3636
- [ ] Add unit tests with at minimum 80% test coverage
3737
- [ ] Add some example scan.yaml and finding.yaml files in the example folder
38-
- [ ] Implement a new integration test for the hook [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/tests/integration)
38+
- [ ] Implement a new integration test for the hook [here](https://github.com/secureCodeBox/secureCodeBox/tree/master/tests/integration)

‎.github/ISSUE_TEMPLATE/new_security_scanner.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Before opening a new issue, please make sure that we do not have any duplicates
2626

2727
## Steps to implement a new scanner
2828
<!--
29-
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/docs/developer-guide)
29+
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox/tree/master/docs/developer-guide)
3030
-->
3131

32-
- [ ] Create a new folder with the name of the [scanner here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/scanners)
32+
- [ ] Create a new folder with the name of the [scanner here](https://github.com/secureCodeBox/secureCodeBox/tree/master/scanners)
3333
- [ ] Add a README.md and give a brief overview of the scanner and its configuration options.
3434
- [ ] Implement a new scanner specific scan-type.yaml
3535
- [ ] Implement a new scanner specific parse-definition.yaml
3636
- [ ] Add (optional) some cascading-rules.yaml
3737
- [ ] Add (optional) a Dockerfile for the scanner if there is no existing one publicly available on dockerHub
38-
- [ ] Use the [parser-SDK](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/parser-sdk) to implement a new findings parser (currently based on NodeJS)
38+
- [ ] Use the [parser-SDK](https://github.com/secureCodeBox/secureCodeBox/tree/master/parser-sdk) to implement a new findings parser (currently based on NodeJS)
3939
- [ ] Add unit tests with at minimum 80% test coverage

‎.github/workflows/ci.yaml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,22 @@ jobs:
122122
tag_with_sha: true
123123
build_args: baseImageTag=ci-local
124124
- uses: docker/build-push-action@v1
125-
name: "Build & Push kubeaudit Parser Image"
125+
name: "Build & Push Gitleaks Parser Image"
126126
with:
127127
username: ${{ secrets.DOCKER_USERNAME }}
128128
password: ${{ secrets.DOCKER_PASSWORD }}
129-
repository: securecodebox/parser-kubeaudit
130-
path: ./scanners/kubeaudit/parser/
129+
repository: securecodebox/parser-gitleaks
130+
path: ./scanners/gitleaks/parser/
131131
tag_with_ref: true
132132
tag_with_sha: true
133133
build_args: baseImageTag=ci-local
134134
- uses: docker/build-push-action@v1
135-
name: "Build & Push Gitleaks Parser Image"
135+
name: "Build & Push kubeaudit Parser Image"
136136
with:
137137
username: ${{ secrets.DOCKER_USERNAME }}
138138
password: ${{ secrets.DOCKER_PASSWORD }}
139-
repository: securecodebox/parser-gitleaks
140-
path: ./scanners/gitleaks/parser/
139+
repository: securecodebox/parser-kubeaudit
140+
path: ./scanners/kubeaudit/parser/
141141
tag_with_ref: true
142142
tag_with_sha: true
143143
build_args: baseImageTag=ci-local

‎README.md‎

Lines changed: 18 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# secureCodeBox – v2 Beta
1+
# OWASP secureCodeBox
22

33
<p align="center">
44
<img alt="secureCodeBox Logo" src="./docs/resources/securecodebox-logo.svg" width="500px">
@@ -7,21 +7,18 @@
77

88
<p align="center">
99
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License Apache-2.0" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
10-
<a href="https://github.com/secureCodeBox/secureCodeBox-v2/releases/tag/v2.0.0-rc.1"><img alt="Preview GitHub Release" src="https://img.shields.io/badge/release-v2.0.0%7Erc.1-blue.svg"></a>
10+
<a href="https://github.com/secureCodeBox/secureCodeBox/releases/latest"><img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/secureCodeBox/secureCodeBox?sort=semver"></a>
1111
<a href="https://owasp.org/www-project-securecodebox/"><img alt="OWASP Incubator Project" src="https://img.shields.io/badge/OWASP-Incubator%20Project-365EAA"></a>
1212
<a href="https://twitter.com/securecodebox"><img alt="Twitter Follower" src="https://img.shields.io/twitter/follow/securecodebox?style=flat&color=blue&logo=twitter"></a>
1313
</p>
1414
<p align="center">
15-
<a href="https://github.com/secureCodeBox/secureCodeBox-v2/actions?query=workflow%3ACI"><img alt="Build" src="https://github.com/secureCodeBox/secureCodeBox-v2/workflows/CI/badge.svg"></a>
16-
<a href="https://codeclimate.com/github/secureCodeBox/secureCodeBox-v2-alpha/maintainability"><img alt="Maintainability" src="https://api.codeclimate.com/v1/badges/b6bf3af707671b5e5251/maintainability" /></a>
17-
<a href="https://codeclimate.com/github/secureCodeBox/secureCodeBox-v2-alpha/test_coverage"><img alt="Test Coverage" src="https://api.codeclimate.com/v1/badges/b6bf3af707671b5e5251/test_coverage" /></a>
18-
<a href="https://snyk.io/test/github/secureCodeBox/secureCodeBox-v2/"><img alt="Known Vulnerabilities" src="https://snyk.io/test/github/secureCodeBox/secureCodeBox-v2/badge.svg"></a>
19-
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FsecureCodeBox%2FsecureCodeBox-v2?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FsecureCodeBox%2FsecureCodeBox-v2.svg?type=shield"/></a>
15+
<a href="https://github.com/secureCodeBox/secureCodeBox/actions?query=workflow%3ACI"><img alt="Build" src="https://github.com/secureCodeBox/secureCodeBox/workflows/CI/badge.svg"></a>
16+
<a href="https://codeclimate.com/github/secureCodeBox/secureCodeBox/maintainability"><img alt="Maintainability" src="https://api.codeclimate.com/v1/badges/0c41659fde992429bfed/maintainability" /></a>
17+
<a href="https://codeclimate.com/github/secureCodeBox/secureCodeBox/test_coverage"><img alt="Test Coverage" src="https://api.codeclimate.com/v1/badges/0c41659fde992429bfed/test_coverage" /></a>
18+
<a href="https://snyk.io/test/github/secureCodeBox/secureCodeBox/"><img alt="Known Vulnerabilities" src="https://snyk.io/test/github/secureCodeBox/secureCodeBox/badge.svg"></a>
19+
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FsecureCodeBox%2FsecureCodeBox?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FsecureCodeBox%2FsecureCodeBox.svg?type=shield"/></a>
2020
</p>
2121

22-
**NOTE**: This Repository contains the stable beta preview of the next major secureCodeBox (SCB) Release v2.
23-
You can find the current **stable release** here [https://github.com/secureCodeBox/secureCodeBox](https://github.com/secureCodeBox/secureCodeBox).
24-
2522
_The major release of SCB version 2.0 will be available in the next weeks._ The release will contain a major architecture change which will not be backward compatible. More details will follow soon in a series of blog articles.
2623

2724
> _secureCodeBox_ is a kubernetes based, modularized toolchain for continuous security scans of your software project. Its goal is to orchestrate and easily automate a bunch of security-testing tools out of the box.
@@ -30,29 +27,15 @@ _The major release of SCB version 2.0 will be available in the next weeks._ The
3027

3128
<!-- toc -->
3229

33-
- [secureCodeBox – v2 Beta](#securecodebox--v2-beta)
34-
- [Overview](#overview)
35-
- [Purpose of this Project](#purpose-of-this-project)
36-
- [Quickstart](#quickstart)
37-
- [Prerequisites](#prerequisites)
38-
- [Deployment (based on Helm)](#deployment-based-on-helm)
39-
- [Examples](#examples)
40-
- [Local Scan Examples](#local-scan-examples)
41-
- [Public Scan Examples](#public-scan-examples)
42-
- [Then get the current State of the Scan by running:](#then-get-the-current-state-of-the-scan-by-running)
43-
- [To delete a scan, use `kubectl delete`, e.g. for localhost nmap scan:](#to-delete-a-scan-use-kubectl-delete-eg-for-localhost-nmap-scan)
44-
- [Access Services](#access-services)
45-
- [How does it work?](#how-does-it-work)
46-
- [Architecture](#architecture)
47-
- [License](#license)
48-
- [Community](#community)
49-
- [Contributing](#contributing)
50-
- [Author Information](#author-information)
51-
52-
For additional documentation aspects please have a look at our:
53-
54-
- [User Guide](docs/user-guide/README.md)
55-
- [Developer Guide](docs/developer-guide/README.md)
30+
- [Purpose of this Project](#purpose-of-this-project)
31+
- [Quickstart](#quickstart)
32+
- [Architecture Overview](#architecture-overview)
33+
- [License](#license)
34+
- [Community](#community)
35+
- [Contributing](#contributing)
36+
- [Author Information](#author-information)
37+
38+
For additional documentation aspects please have a look at our [documentation website](https://docs.securecodebox.io):
5639

5740
<!-- tocstop -->
5841

@@ -75,104 +58,9 @@ There is a German article about [Security DevOps – Angreifern (immer) einen Sc
7558

7659
## Quickstart
7760

78-
### Prerequisites
79-
80-
- kubernetes (last 4 major releases supported: `1.16`, `1.17`, `1.18` & `1.19`)
81-
82-
### Deployment (based on Helm)
83-
84-
> The install instructions require you to have the repository cloned and to have your terminal located in the folder of repository.
85-
> There are shorthand scripts to un-/install everything in the `bin` directory.
86-
87-
Deploy the secureCodeBox operator first:
88-
89-
```bash
90-
kubectl create namespace securecodebox-system
91-
helm -n securecodebox-system upgrade --install securecodebox-operator ./operator/
92-
```
93-
94-
Optionally deploy SCB scanner charts for each security scanner you want to use. They should not be installed into the `securecodebox-system` like the operator so that different teams can use different kinds of scanners.
95-
96-
```bash
97-
helm upgrade --install amass ./scanners/amass/
98-
helm upgrade --install kube-hunter ./scanners/kube-hunter/
99-
helm upgrade --install nikto ./scanners/nikto
100-
helm upgrade --install nmap ./scanners/nmap/
101-
helm upgrade --install ssh-scan ./scanners/ssh_scan/
102-
helm upgrade --install sslyze ./scanners/sslyze/
103-
helm upgrade --install trivy ./scanners/trivy/
104-
helm upgrade --install zap ./scanners/zap/
105-
helm upgrade --install wpscan ./scanners/wpscan/
106-
```
107-
108-
Optional deploy some demo apps for scanning:
109-
110-
```bash
111-
helm upgrade --install dummy-ssh ./demo-apps/dummy-ssh/
112-
helm upgrade --install bodgeit ./demo-apps/bodgeit/
113-
helm upgrade --install juice-shop ./demo-apps/juice-shop/
114-
helm upgrade --install old-wordpress ./demo-apps/old-wordpress/
115-
helm upgrade --install swagger-petstore ./demo-apps/swagger-petstore/
116-
```
117-
118-
Deploy secureCodeBox Hooks:
119-
120-
```bash
121-
helm upgrade --install ufh ./hooks/update-field/
122-
helm upgrade --install gwh ./hooks/generic-webhook/
123-
helm upgrade --install issh ./hooks/imperative-subsequent-scans/
124-
helm upgrade --install dssh ./hooks/declarative-subsequent-scans/
125-
```
126-
127-
Persistence provider Elasticsearch:
128-
129-
```bash
130-
helm upgrade --install elkh ./hooks/persistence-elastic/
131-
```
132-
133-
### Examples
134-
135-
Now everything is installed. You can try deploying scans from the `scanners/*/examples` directories.
136-
137-
#### Local Scan Examples
138-
139-
E.g. localhost nmap scan:
140-
141-
```bash
142-
kubectl apply -f scanners/nmap/examples/localhost/scan.yaml
143-
```
144-
145-
#### Public Scan Examples
146-
147-
```bash
148-
kubectl apply -f scanners/nmap/examples/scan.nmap.org/scan.yaml
149-
```
150-
151-
#### Then get the current State of the Scan by running:
152-
153-
```bash
154-
kubectl get scans
155-
```
156-
157-
#### To delete a scan, use `kubectl delete`, e.g. for localhost nmap scan:
158-
159-
```
160-
kubectl delete -f scanners/nmap/examples/localhost/scan.yaml
161-
```
162-
163-
### Access Services
164-
165-
- Minio UI:
166-
- Port Forward Minio UI: `kubectl port-forward -n securecodebox-system service/securecodebox-operator-minio 9000:9000`
167-
- AccessKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.accesskey}' | base64 --decode; echo`
168-
- SecretKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.secretkey}' | base64 --decode; echo`
169-
- Elastic / Kibana UI:
170-
- Port Forward Kibana: `kubectl port-forward -n default service/elkh-kibana 5601:5601`
171-
- Port Forward Elasticsearch: `kubectl port-forward -n default service/elasticsearch-master 9200:9200`
172-
173-
## How does it work?
61+
You can find resources to help you get started on our [documentation website](https://docs.securecodebox.io) including instruction on how to [install the secureCodeBox](https://docs.securecodebox.io/docs/getting-started/installation) and guides to help you [run your first scans](https://docs.securecodebox.io/docs/getting-started/first-scans) with it.
17462

175-
## Architecture
63+
## Architecture Overview
17664

17765
![secureCodeBox Architecture](./docs/resources/scb-architecture.svg)
17866

‎bin/install-all.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ helm upgrade --install http-webhook ./demo-apps/http-webhook/
2424

2525
helm upgrade --install aah ./hooks/update-field/
2626
helm upgrade --install gwh ./hooks/generic-webhook/
27-
helm upgrade --install issh ./hooks/imperative-subsequent-scans/
2827

2928
helm upgrade --install elkh ./hooks/persistence-elastic/

‎bin/uninstall-all.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ helm uninstall swagger-petstore
2323

2424
helm uninstall aah
2525
helm uninstall gwh
26-
helm uninstall issh
2726

2827
helm uninstall elkh
2928

‎demo-apps/dummy-ssh/Chart.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ type: application
44
appVersion: "v1.0.0"
55
name: dummy-ssh
66
description: "SSH Server for scan testing."
7-
home: https://wordpress.org
8-
icon: https://www.securecodebox.io/integrationIcons/SSH.svg
7+
home: https://docs.securecodebox.io
8+
icon: https://docs.securecodebox.io/img/integrationIcons/SSH.svg
99
keywords:
1010
- vulnerable
1111
- ssh

‎demo-apps/dummy-ssh/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
SSH Server for scan testing.
66

7-
**Homepage:** <https://wordpress.org>
7+
**Homepage:** <https://docs.securecodebox.io>
88

99
## Maintainers
1010

‎demo-apps/dummy-ssh/helm2.Chart.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ type: application
44
appVersion: "v1.0.0"
55
name: dummy-ssh
66
description: "SSH Server for scan testing."
7-
home: https://wordpress.org
8-
icon: https://www.securecodebox.io/integrationIcons/SSH.svg
7+
home: https://docs.securecodebox.io
8+
icon: https://docs.securecodebox.io/img/integrationIcons/SSH.svg
99
keywords:
1010
- vulnerable
1111
- ssh

‎docs/adr/adr_0006.adoc‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[[ADR-0001]]
2+
= ADR-0001: How We Want to Handle Versions in Our Documentation
3+
4+
[cols="h,d",grid=rows,frame=none,stripes=none,caption="Status",%autowidth]
5+
|====
6+
// Use one of the ADR status parameter based on status
7+
// Please add a cross reference link to the new ADR on 'superseded' ADR.
8+
// e.g.: {adr_suposed_by} <<ADR-0000>>
9+
| Status
10+
| PROPOSED
11+
12+
| Date
13+
| 2020-10-12
14+
15+
| Author(s)
16+
| Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
17+
// ...
18+
|====
19+
20+
== Context
21+
22+
We want to introduce versioning to be able to provide dokumentation for multiple versions of the SecureCodeBox.
23+
The tool that we are currently using for documentation is https://v2.docusaurus.io/[Docusaurus].
24+
Docusaurus provides the possibility to maintain multiple versions out of the box (https://v2.docusaurus.io/docs/versioning/[]).
25+
26+
We will need to specify how many versions of the documentation we want to maintain to avoid inconsistencies and overhead.
27+
Furthermore, we need to decide which version increments need to have their own branch of documentation.
28+
29+
== Decision
30+
31+
* We introduce a new documentation version for every minor version (https://semver.org/[]) to ensure that the documentation is up to date
32+
* We maintain the latest 3 major versions (previous, current, next)
33+
* We maintain the latest minor version for each major version
34+
* We *do not* maintain patch versions nor multiple minor versions for each major version!
35+
* *Example:* For SecureCodeBox versions `1.9.9`, `2.3.2`, `2.3.3` and `3.0.0` the documentation versions would be `1.9.x`, `2.3.x` and `3.0.x`
36+
* *TL;DR* We maintain 3 versions of the documentation
37+
38+
== Consequences
39+
40+
* We need to update the documentation version everytime we increment minor or major versions of the SecureCodeBox (manually or with action)
41+
* Maintaining the documentation could be more difficult due to now increased number of documentation files
42+
* Documentation has to be maintained in two repositories because when creating a new version Docusaurus creates a copy of all files in this respository (see https://v2.docusaurus.io/docs/versioning/#directory-structure[])
43+

0 commit comments

Comments
 (0)