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

Commit b647c6e

Browse files
committed
Merged Master into Branch
2 parents 7e4e204 + 6fb826f commit b647c6e

File tree

189 files changed

+136
-319
lines changed

Some content is hidden

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

189 files changed

+136
-319
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.go]
15+
indent_style = tab
16+
17+
[Makefile]
18+
indent_style = tab

.github/workflows/ci.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
run: ls
1111
- name: "Install npm dependencies in all parser sub projects"
1212
run: |
13-
for dir in scanner/*/parser/
13+
for dir in scanners/*/parser/
1414
do
1515
cd $dir
1616
if [ -f package.json ] && [ -f package-lock.json ]; then
@@ -35,7 +35,7 @@ jobs:
3535
- name: "Install npm test dependencies"
3636
run: |
3737
npm ci
38-
cd scanner/
38+
cd scanners/
3939
npm ci
4040
cd -
4141
cd hooks/
@@ -113,7 +113,7 @@ jobs:
113113
username: ${{ secrets.DOCKER_USERNAME }}
114114
password: ${{ secrets.DOCKER_PASSWORD }}
115115
repository: scbexperimental/parser-amass
116-
path: ./scanner/amass/parser/
116+
path: ./scanners/amass/parser/
117117
tag_with_ref: true
118118
tag_with_sha: true
119119
build_args: baseImageTag=ci-local
@@ -123,7 +123,7 @@ jobs:
123123
username: ${{ secrets.DOCKER_USERNAME }}
124124
password: ${{ secrets.DOCKER_PASSWORD }}
125125
repository: scbexperimental/parser-kube-hunter
126-
path: ./scanner/kube-hunter/parser/
126+
path: ./scanners/kube-hunter/parser/
127127
tag_with_ref: true
128128
tag_with_sha: true
129129
build_args: baseImageTag=ci-local
@@ -133,7 +133,7 @@ jobs:
133133
username: ${{ secrets.DOCKER_USERNAME }}
134134
password: ${{ secrets.DOCKER_PASSWORD }}
135135
repository: scbexperimental/parser-nikto
136-
path: ./scanner/nikto/parser/
136+
path: ./scanners/nikto/parser/
137137
tag_with_ref: true
138138
tag_with_sha: true
139139
build_args: baseImageTag=ci-local
@@ -143,7 +143,7 @@ jobs:
143143
username: ${{ secrets.DOCKER_USERNAME }}
144144
password: ${{ secrets.DOCKER_PASSWORD }}
145145
repository: scbexperimental/parser-nmap
146-
path: ./scanner/nmap/parser/
146+
path: ./scanners/nmap/parser/
147147
tag_with_ref: true
148148
tag_with_sha: true
149149
build_args: baseImageTag=ci-local
@@ -153,7 +153,7 @@ jobs:
153153
username: ${{ secrets.DOCKER_USERNAME }}
154154
password: ${{ secrets.DOCKER_PASSWORD }}
155155
repository: scbexperimental/parser-ssh-scan
156-
path: ./scanner/ssh_scan/parser/
156+
path: ./scanners/ssh_scan/parser/
157157
tag_with_ref: true
158158
tag_with_sha: true
159159
build_args: baseImageTag=ci-local
@@ -163,7 +163,7 @@ jobs:
163163
username: ${{ secrets.DOCKER_USERNAME }}
164164
password: ${{ secrets.DOCKER_PASSWORD }}
165165
repository: scbexperimental/parser-sslyze
166-
path: ./scanner/sslyze/parser/
166+
path: ./scanners/sslyze/parser/
167167
tag_with_ref: true
168168
tag_with_sha: true
169169
build_args: baseImageTag=ci-local
@@ -173,7 +173,7 @@ jobs:
173173
username: ${{ secrets.DOCKER_USERNAME }}
174174
password: ${{ secrets.DOCKER_PASSWORD }}
175175
repository: scbexperimental/parser-test-scan
176-
path: ./scanner/test-scan/parser/
176+
path: ./scanners/test-scan/parser/
177177
tag_with_ref: true
178178
tag_with_sha: true
179179
build_args: baseImageTag=ci-local
@@ -183,7 +183,7 @@ jobs:
183183
username: ${{ secrets.DOCKER_USERNAME }}
184184
password: ${{ secrets.DOCKER_PASSWORD }}
185185
repository: scbexperimental/parser-trivy
186-
path: ./scanner/trivy/parser/
186+
path: ./scanners/trivy/parser/
187187
tag_with_ref: true
188188
tag_with_sha: true
189189
build_args: baseImageTag=ci-local
@@ -193,7 +193,7 @@ jobs:
193193
username: ${{ secrets.DOCKER_USERNAME }}
194194
password: ${{ secrets.DOCKER_PASSWORD }}
195195
repository: scbexperimental/parser-zap
196-
path: ./scanner/zap/parser/
196+
path: ./scanners/zap/parser/
197197
tag_with_ref: true
198198
tag_with_sha: true
199199
build_args: baseImageTag=ci-local
@@ -270,7 +270,7 @@ jobs:
270270
username: ${{ secrets.DOCKER_USERNAME }}
271271
password: ${{ secrets.DOCKER_PASSWORD }}
272272
repository: scbexperimental/nmap
273-
path: ./scanner/nmap/scanner/
273+
path: ./scanners/nmap/scanner/
274274
# Note: not prefixed with a "v" as this seems to match nmap versioning standards
275275
tags: "7.80,7.80-1,latest"
276276
- uses: docker/build-push-action@v1
@@ -279,7 +279,7 @@ jobs:
279279
username: ${{ secrets.DOCKER_USERNAME }}
280280
password: ${{ secrets.DOCKER_PASSWORD }}
281281
repository: scbexperimental/kube-hunter
282-
path: ./scanner/kube-hunter/scanner/
282+
path: ./scanners/kube-hunter/scanner/
283283
# Note: not prefixed with a "v" as this matches the aquasec/kube-hunter tags
284284
tags: "0.3.0,latest"
285285
- uses: docker/build-push-action@v1
@@ -288,7 +288,7 @@ jobs:
288288
username: ${{ secrets.DOCKER_USERNAME }}
289289
password: ${{ secrets.DOCKER_PASSWORD }}
290290
repository: scbexperimental/test-scan
291-
path: ./scanner/test-scan/scanner/
291+
path: ./scanners/test-scan/scanner/
292292
# Note: not prefixed with a "v" as this seems to match nmap versioning standards
293293
tags: "latest"
294294
integrationTests:
@@ -319,7 +319,7 @@ jobs:
319319
320320
# Operator Namespace
321321
kubectl create namespace securecodebox-system
322-
# Install Operator using the images of the current commit
322+
# Install Operator using the images of the current commit
323323
helm -n securecodebox-system install securecodebox-operator ./operator/ --wait \
324324
--set="image.tag=sha-$(git rev-parse --short HEAD)" \
325325
--set="image.digest=null" \
@@ -337,7 +337,7 @@ jobs:
337337
run: "kubectl create namespace demo-apps"
338338
- name: "Install Test Dependencies"
339339
run: |
340-
cd tests/integration/
340+
cd tests/integration/
341341
npm ci
342342
# This steps should include Integration tests which are not related to a Specific Scanner
343343
- name: "Throws NoScanDefiniton Error Integration Tests"
@@ -354,23 +354,23 @@ jobs:
354354
--set="image.tag=sha-$(git rev-parse --short HEAD)" \
355355
--set="attribute.name=severity" \
356356
--set="attribute.value=high"
357-
helm -n integration-tests install test-scan ./scanner/test-scan/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
357+
helm -n integration-tests install test-scan ./scanners/test-scan/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
358358
cd tests/integration/
359359
npx jest --ci --color read-write-hook
360360
helm -n integration-tests uninstall test-scan update-category update-severity
361361
- name: "nmap Integration Tests"
362362
run: |
363-
helm -n integration-tests install nmap ./scanner/nmap/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
363+
helm -n integration-tests install nmap ./scanners/nmap/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
364364
cd tests/integration/
365365
npx jest --ci --color nmap
366366
- name: "kube-hunter Integration Tests"
367367
run: |
368-
helm -n integration-tests install kube-hunter ./scanner/kube-hunter/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
368+
helm -n integration-tests install kube-hunter ./scanners/kube-hunter/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
369369
cd tests/integration/
370370
npx jest --ci --color kube-hunter
371371
- name: "ssh-scan Integration Tests"
372372
run: |
373-
helm -n integration-tests install ssh-scan ./scanner/ssh_scan/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
373+
helm -n integration-tests install ssh-scan ./scanners/ssh_scan/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
374374
# Install dummy-ssh app
375375
helm -n demo-apps install dummy-ssh ./demo-apps/dummy-ssh/ --wait
376376
cd tests/integration/

README.md

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# secureCodeBox – v2 ALPHA
2+
13
<p align="center">
24
<img alt="secureCodeBox Logo" src="./docs/resources/securecodebox-logo.svg" width="500px">
35
<img alt="secureCodeBox Logo" src="https://owasp.org/assets/images/logo.png" width="200px">
@@ -15,27 +17,31 @@
1517
<a href="https://snyk.io/test/github/secureCodeBox/secureCodeBox-v2-alpha/"><img alt="Known Vulnerabilities" src="https://snyk.io/test/github/secureCodeBox/secureCodeBox-v2-alpha/badge.svg"></a>
1618
</p>
1719

18-
**NOTE**: This Repository contains a **work in progress** preview of the planned next mayor secureCodeBox Release. You can find the current **stable release** here [https://github.com/secureCodeBox/secureCodeBox](https://github.com/secureCodeBox/secureCodeBox). The release of version 2.0 is still at least some month away but you can already get a sneak peak here 😀. The release will contain a mayor re architecture of the secureCodeBox. More details will follow soon in a series of blog articles.
20+
**NOTE**: This Repository contains a **work in progress** preview of the planned next major secureCodeBox Release. You can find the current **stable release** here [https://github.com/secureCodeBox/secureCodeBox](https://github.com/secureCodeBox/secureCodeBox). The release of version 2.0 is still at least some month away but you can already get a sneak peak here 😀. 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.
1921

2022
> _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.
2123
2224
## Overview
2325

2426
<!-- toc -->
2527

26-
- [Overview](#overview)
27-
- [Purpose of this Project](#purpose-of-this-project)
28-
- [Quickstart](#quickstart)
29-
- [Prerequisites](#prerequisites)
30-
- [Deployment (based on Helm)](#deployment-based-on-helm)
31-
- [Examples](#examples)
32-
- [Access Services](#access-services)
33-
- [How does it work?](#how-does-it-work)
34-
- [Architecture](#architecture)
35-
- [License](#license)
36-
- [Community](#community)
37-
- [Contributing](#contributing)
38-
- [Author Information](#author-information)
28+
- [secureCodeBox – v2 ALPHA](#securecodebox--v2-alpha)
29+
- [Overview](#overview)
30+
- [Purpose of this Project](#purpose-of-this-project)
31+
- [Quickstart](#quickstart)
32+
- [Prerequisites](#prerequisites)
33+
- [Deployment (based on Helm)](#deployment-based-on-helm)
34+
- [Examples](#examples)
35+
- [Local Scan Examples](#local-scan-examples)
36+
- [Public Scan Examples](#public-scan-examples)
37+
- [Then get the current State of the Scan by running:](#then-get-the-current-state-of-the-scan-by-running)
38+
- [Access Services](#access-services)
39+
- [How does it work?](#how-does-it-work)
40+
- [Architecture](#architecture)
41+
- [License](#license)
42+
- [Community](#community)
43+
- [Contributing](#contributing)
44+
- [Author Information](#author-information)
3945

4046
For additional documentation aspects please have a look at our:
4147

@@ -63,16 +69,20 @@ There is a german article about [Security DevOps – Angreifern (immer) einen Sc
6369

6470
### Prerequisites
6571

66-
- kubernetes (last 4 mayor releases supported: `1.15`, `1.16`, `1.17` & `1.18`)
72+
- kubernetes (last 4 major releases supported: `1.15`, `1.16`, `1.17` & `1.18`)
6773

6874
### Deployment (based on Helm)
6975

76+
Deploy the secureCodeBox operator first:
77+
7078
```bash
71-
# Deploy the secureCodeBox Operator first
7279
kubectl create namespace securecodebox-system
7380
helm -n securecodebox-system install securecodebox-operator ./operator/
81+
```
82+
83+
Optionally deploy SCB scanner Charts for each security scanner you want to use:
7484

75-
# Deploy SCB scanner Charts for each security scanner you want to use (all optional)
85+
```bash
7686
helm upgrade --install amass ./scanner/amass/
7787
helm upgrade --install kube-hunter ./scanner/kube-hunter/
7888
helm upgrade --install nikto ./scanner/nikto
@@ -82,45 +92,63 @@ helm upgrade --install sslyze ./scanner/sslyze/
8292
helm upgrade --install trivy ./scanner/trivy/
8393
helm upgrade --install zap ./scanner/zap/
8494
helm upgrade --install wpscan ./scanner/wpscan/
95+
```
96+
97+
Optional deploy some demo apps for scanning:
8598

86-
# Optional Deploy some Demo Apps to test some scanning examples
99+
```bash
87100
helm upgrade --install dummy-ssh ./demo-apps/dummy-ssh/
101+
```
102+
103+
Deploy secureCodeBox Hooks:
88104

89-
# Deploy secureCodeBox Hooks
90-
helm upgrade --install aah ./hooks/add-attributes/
105+
```bash
106+
helm upgrade --install aah ./hooks/update-field/
91107
helm upgrade --install gwh ./hooks/generic-webhook/
92108
helm upgrade --install issh ./hooks/imperative-subsequent-scans/
109+
```
110+
111+
Persistence provider Elasticsearch:
93112

94-
## Persistence Provider: Elasticsearch
113+
```bash
95114
helm upgrade --install elkh ./hooks/persistence-elastic/
96115
```
97116

98117
### Examples
99118

100-
```bash
101-
# Now everything is installed. You can try deploying scans from the `operator/config/samples/` directory
102-
## Local Scan Examples
119+
Now everything is installed. You can try deploying scans from the `scanner/*/examples` directories.
120+
121+
#### Local Scan Examples
122+
123+
E.g. localhost nmap scan:
103124

104-
### E.g. localhost nmap scan
125+
```bash
105126
kubectl apply -f scanner/nmap/examples/localhost/scan.yaml
106-
kubectl apply -f scanner/ssh_scan/examples/localhost/scan.yaml
127+
```
128+
129+
#### Public Scan Examples
107130

108-
# Then get the current State of the Scan by running:
131+
```bash
132+
kubectl apply -f scanner/nmap/examples/scan.nmap.org/scan.yaml
133+
```
134+
135+
#### Then get the current State of the Scan by running:
136+
137+
```bash
109138
kubectl get scans
110139
```
111140

112141
### Access Services
113142

114-
* Minio UI:
115-
* AccessKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.accesskey}' | base64 --decode; echo`
116-
* SecretKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.secretkey}' | base64 --decode; echo`
117-
* Port Forward Minio UI: `kubectl port-forward -n securecodebox-system service/securecodebox-operator-minio 9000:9000`
118-
* Elastic / Kibana UI:
119-
* User: `elastic`
120-
* Password: `kubectl get secret scb-elasticsearch-es-elastic-user -n scb-analytics -o=jsonpath='{.data.elastic}' | base64 --decode; echo`
121-
* Port Forward Kibana: `kubectl port-forward -n default service/persistence-elastic-kibana 5601:5601`
122-
* Port Forward Elasticsearch: `kubectl port-forward -n default service/elasticsearch-master 9200:9200`
123-
143+
- Minio UI:
144+
- AccessKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.accesskey}' | base64 --decode; echo`
145+
- SecretKey: `kubectl get secret securecodebox-operator-minio -n securecodebox-system -o=jsonpath='{.data.secretkey}' | base64 --decode; echo`
146+
- Port Forward Minio UI: `kubectl port-forward -n securecodebox-system service/securecodebox-operator-minio 9000:9000`
147+
- Elastic / Kibana UI:
148+
- User: `elastic`
149+
- Password: `kubectl get secret scb-elasticsearch-es-elastic-user -n scb-analytics -o=jsonpath='{.data.elastic}' | base64 --decode; echo`
150+
- Port Forward Kibana: `kubectl port-forward -n default service/persistence-elastic-kibana 5601:5601`
151+
- Port Forward Elasticsearch: `kubectl port-forward -n default service/elasticsearch-master 9200:9200`
124152

125153
## How does it work?
126154

0 commit comments

Comments
 (0)