Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ jobs:
- sslyze
- trivy
- trivy-sbom
- typo3scan
- whatweb
- wpscan
- zap
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ jobs:
- test-scan
- trivy
- trivy-sbom
- typo3scan
- whatweb
- wpscan
- zap
Expand Down Expand Up @@ -422,7 +421,6 @@ jobs:
- nikto
- ssh-audit
- sslyze
- typo3scan
- whatweb
- wpscan

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/scb-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- sslyze
- trivy
- trivy-sbom
- typo3scan
- whatweb
- wpscan
- zap
Expand Down
18 changes: 8 additions & 10 deletions documentation/docs/api/crds/scan-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ When specified, as with the `ttlSecondsAfterFinished` parameter, the values from
apiVersion: "execution.securecodebox.io/v1"
kind: ScanType
metadata:
name: "typo3scan"
name: "nmap"
spec:
extractResults:
type: typo3scan-json
location: "/home/securecodebox/typo3scan.json"
type: nmap-xml
location: "/home/securecodebox/nmap-results.json"
jobTemplate:
spec:
{{- if .Values.scanner.ttlSecondsAfterFinished }}
Expand All @@ -58,15 +58,13 @@ spec:
spec:
restartPolicy: Never
containers:
- name: typo3scan
- name: nmap
image: "{{ .Values.scanner.image.repository }}:{{ .Values.scanner.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.scanner.image.pullPolicy }}
command:
- "python3"
- "/home/typo3scan/typo3scan.py"
# Remove any user-interation
- "--no-interaction"
# Output in json format
- "--json"
- "nmap"
- "-oX"
- "/home/securecodebox/nmap-results.xml"
resources:
{{- toYaml .Values.scanner.resources | nindent 16 }}
securityContext:
Expand Down
7 changes: 7 additions & 0 deletions documentation/docs/getting-started/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ sidebar_position: 3
---
## From 4.X to 5.X

### Removed / Replaced ScanTypes

* `typo3scan` was removed as the scanner itself [isn't maintaned anymore](https://github.com/whoot/Typo3Scan?tab=readme-ov-file#unsupported). Most security aspects of typo3 are now hard to verify from the outside as it requires authentication (which is really good). Some typo3 security aspects (e.g. a incomplete installation) can be verified by [nuclei](https://www.securecodebox.io/docs/scanners/nuclei).

➡️ [Reference: #2670](https://github.com/secureCodeBox/secureCodeBox/issues/2670)

### Renamed ClusterRole and ClusterRoleBinding

To avoid naming collisions with other cluster‑scoped resources, the operator's ClusterRole formerly called `manager-role` has been renamed to `securecodebox‑manager-role`, and the corresponding ClusterRoleBinding `manager-rolebinding` is now `securecodebox‑manager-rolebinding`. The official Helm chart will automatically create and reference these new names when you update the operator.

If you maintain a custom deployment that directly references `manager-role` or `manager-rolebinding`, be sure to update those references to `securecodebox‑manager-role` and `securecodebox‑manager-rolebinding` respectively.
Expand Down
51 changes: 22 additions & 29 deletions documentation/docs/how-tos/automatically-repeating-scans.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ sidebar_position: 1

## Introduction

In this step-by-step tutorial, we will go through all the required stages to set up a repeating scan with the secureCodeBox. A repeating scan will run automatically each time a time interval is passed. This time interval is set by the user. In this example, we are going to run a repeating typo3scan scan on the Typo3 local vulnerable demo-target (old-typo3). A repeating scan is useful, as it allows the developer to be aware of any new vulnerabilities that have been introduced in development.
In this step-by-step tutorial, we will go through all the required stages to set up a repeating scan with the secureCodeBox. A repeating scan will run automatically each time a time interval is passed. This time interval is set by the user. In this example, we are going to run a repeating wpscan scan against the local "old-wordpress" vulnerable demo-target. A repeating scan is useful, as it allows the developer to be aware of any new vulnerabilities that have been introduced in development.

## Setup

For the sake of the tutorial, we assume that you have your Kubernetes cluster already up and running and that we can work in your default namespace.
If not, check out the [installation](/docs/getting-started/installation/) for more information.

We will start by installing the typo3 scanner:
We will start by installing the wpscan scanner:

```bash
helm upgrade --install typo3scan oci://ghcr.io/securecodebox/helm/typo3scan
helm upgrade --install wpscan oci://ghcr.io/securecodebox/helm/wpscan
```

And the Typo3 demo-target. This is only required if you don't already have a target you want to scan.
And the Wordpress demo-target. This is only required if you don't already have a target you want to scan.

```bash
helm upgrade --install old-typo3 oci://ghcr.io/securecodebox/helm/old-typo3
helm upgrade --install old-wordpress oci://ghcr.io/securecodebox/helm/old-wordpress
```

## Creating the Repeating Scan
Expand All @@ -38,19 +38,14 @@ We create a **scheduled-scan.yaml** where we define what the scan should do:
apiVersion: "execution.securecodebox.io/v1"
kind: ScheduledScan
metadata:
name: "old-typo3.demo-targets.svc.org-5min"
name: "old-wordpress-scan-every-5min"
spec:
interval: 5m
scanSpec:
scanType: "typo3scan"
scanType: "wpscan"
parameters:
- "-d"
- http://old-typo3.demo-targets.svc
# Only show vulnerable extensions
- "--vuln"
# Set the number of threads to use for enumerating extensions at 10
- "--threads"
- "10"
- "--url"
- old-wordpress
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
```
Expand All @@ -59,7 +54,7 @@ We set the kind to `ScheduledScan`. This tells secureCodeBox to use the [Schedul

The `successfulJobsHistoryLimit` controls how many completed scans are supposed to be kept until the oldest one will be deleted. And the `failedJobsHistoryLimit` controls how many failed scans are supposed to be kept until the oldest one will be deleted.

The rest of the parameters are set according to your scanType. In this case it's `typo3scan`. Its corresponding scanner configuration can be found [here](/docs/scanners/typo3scan).
The rest of the parameters are set according to your scanType. In this case it's `wpscan`. Its corresponding scanner configuration can be found [here](/docs/scanners/wpscan).

Now we can run our scheduled scan via:

Expand All @@ -76,17 +71,15 @@ kubectl get scheduledscans
And you get the following (The findings column might be different):

```bash
NAME TYPE INTERVAL FINDINGS
old-typo3.demo-targets.svc.org-5min typo3scan 5m 53
NAME TYPE INTERVAL FINDINGS
old-wordpress-scan-every-5min wpscan 5m 5
```

_Hint:_ If you want to restart the scan, you must delete it first:
_Hint:_ If you want to restart the scan immediatly without wating, you can delete and recreate it:

```bash
# Delete all scheduled scans:
kubectl delete scheduledscan --all
# Delete our specific scheduled scan:
kubectl delete scheduledscan old-typo3.demo-targets.svc.org-5min
kubectl delete scheduledscan old-wordpress-scan-every-5min
```

We can check on the individual scans that have been done according to this scheduled/repeating scan via:
Expand All @@ -98,10 +91,10 @@ kubectl get scans
After 15 minutes, we see the following:

```bash
NAME TYPE STATE FINDINGS
old-typo3.demo-targets.svc.org-5min-1633093504 typo3scan Done 53
old-typo3.demo-targets.svc.org-5min-1633093805 typo3scan Done 53
old-typo3.demo-targets.svc.org-5min-1633094105 typo3scan Done 53
NAME TYPE STATE FINDINGS
old-wordpress-scan-every-5min-1633093504 wpscan Done 5
old-wordpress-scan-every-5min-1633093805 wpscan Done 5
old-wordpress-scan-every-5min-1633094105 wpscan Done 5
```

We can also make sure that the time interval is being respected by the ScheduledScan by looking at the age of the pods in use via:
Expand All @@ -113,10 +106,10 @@ kubectl get pods
You would see something similar to this. The pod name suffix is not going to be the same.

```bash
NAME READY STATUS RESTARTS AGE
scan-old-typo3.demo-targets.svc.org-5min-1633093504-7h--1-msn8t 0/2 Completed 0 12m
scan-old-typo3.demo-targets.svc.org-5min-1633093805-cm--1-jwgz2 0/2 Completed 0 7m40s
scan-old-typo3.demo-targets.svc.org-5min-1633094105-zb--1-qkxzw 0/2 Completed 0 2m40s
NAME READY STATUS RESTARTS AGE
scan-old-wordpress-scan-every-5min-1633093504-7h--1-msn8t 0/2 Completed 0 12m
scan-old-wordpress-scan-every-5min-1633093805-cm--1-jwgz2 0/2 Completed 0 7m40s
scan-old-wordpress-scan-every-5min-1633094105-zb--1-qkxzw 0/2 Completed 0 2m40s
```

And we're done! The repeating scan now works. Take a look at [cascading scans](/docs/how-tos/scanning-networks) next if you haven't yet. Cascading scans and repeating scans work well together. Have fun!
Loading