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
28 changes: 14 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ jobs:
kubectl -n securecodebox-system get pods
echo "Operator Startup Logs"
kubectl -n securecodebox-system logs deployment/securecodebox-controller-manager
- name: "Create 'demo-apps' namespace"
run: "kubectl create namespace demo-apps"
- name: "Create 'demo-targets' namespace"
run: "kubectl create namespace demo-targets"

# ---- Install Test Dependencies ----

Expand Down Expand Up @@ -640,7 +640,7 @@ jobs:
--set="parser.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/parser-test-scan" \
--set="parser.image.tag=sha-$(git rev-parse --short HEAD)" \
--set="scanner.image.tag=sha-$(git rev-parse --short HEAD)"
helm -n integration-tests install http-webhook ./demo-apps/http-webhook
helm -n integration-tests install http-webhook ./demo-targets/http-webhook
helm -n integration-tests install ro-hook ./hooks/generic-webhook/ \
--set="hook.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/hook-generic-webhook" \
--set="webhookUrl=http://http-webhook/hallo-welt" \
Expand All @@ -654,20 +654,20 @@ jobs:
- name: "Install Demo Apps"
run: |
# Install dummy-ssh app
helm -n demo-apps install dummy-ssh ./demo-apps/dummy-ssh/ --set="fullnameOverride=dummy-ssh" --wait
helm -n demo-targets install dummy-ssh ./demo-targets/dummy-ssh/ --set="fullnameOverride=dummy-ssh" --wait
# Install unsafe-https app
helm -n demo-apps install unsafe-https ./demo-apps/unsafe-https/ --set="fullnameOverride=unsafe-https" --wait
helm -n demo-targets install unsafe-https ./demo-targets/unsafe-https/ --set="fullnameOverride=unsafe-https" --wait
# Install bodgeit app
helm -n demo-apps install bodgeit ./demo-apps/bodgeit/ --set="fullnameOverride=bodgeit" --wait
helm -n demo-targets install bodgeit ./demo-targets/bodgeit/ --set="fullnameOverride=bodgeit" --wait
# Install bodgeit app
helm -n demo-apps install petstore ./demo-apps/swagger-petstore/ --set="fullnameOverride=petstore" --wait
helm -n demo-targets install petstore ./demo-targets/swagger-petstore/ --set="fullnameOverride=petstore" --wait
# Install old-wordpress app
helm -n demo-apps install old-wordpress ./demo-apps/old-wordpress/ --set="fullnameOverride=old-wordpress" --wait
helm -n demo-targets install old-wordpress ./demo-targets/old-wordpress/ --set="fullnameOverride=old-wordpress" --wait
# Install juiceshop app
helm -n demo-apps install juiceshop ./demo-apps/juice-shop/ --set="fullnameOverride=juiceshop" --wait
helm -n demo-targets install juiceshop ./demo-targets/juice-shop/ --set="fullnameOverride=juiceshop" --wait
# Install plain nginx server
kubectl create deployment --image nginx:alpine nginx --namespace demo-apps
kubectl expose deployment nginx --port 80 --namespace demo-apps
kubectl create deployment --image nginx:alpine nginx --namespace demo-targets
kubectl expose deployment nginx --port 80 --namespace demo-targets

# ---- OWASP Amass Integration Tests ----

Expand Down Expand Up @@ -710,7 +710,7 @@ jobs:
- name: "kubeaudit Integration Tests"
run: |
kubectl create namespace kubeaudit-tests
helm -n kubeaudit-tests install juice-shop ./demo-apps/juice-shop/ --wait
helm -n kubeaudit-tests install juice-shop ./demo-targets/juice-shop/ --wait
helm -n integration-tests install kubeaudit ./scanners/kubeaudit/ \
--set="scanner.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/scanner-kubeaudit" \
--set="scanner.image.tag=sha-$(git rev-parse --short HEAD)" \
Expand Down Expand Up @@ -769,7 +769,7 @@ jobs:
--set="parser.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/parser-test-scan" \
--set="parser.image.tag=sha-$(git rev-parse --short HEAD)" \
--set="scanner.image.tag=sha-$(git rev-parse --short HEAD)"
helm -n integration-tests install http-webhook ./demo-apps/http-webhook --wait
helm -n integration-tests install http-webhook ./demo-targets/http-webhook --wait

helm -n integration-tests install notification-hook ./hooks/notification --values tests/integration/hooks/__testFiles__/notification-values.yaml \
--set="hook.image.repository=docker.io/${{env.DOCKER_NAMESPACE }}/hook-notification" \
Expand Down Expand Up @@ -894,7 +894,7 @@ jobs:
--set="hook.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/hook-cascading-scans" \
--set="hook.image.tag=sha-$(git rev-parse --short HEAD)"
# Install unsafe-https
helm upgrade --install unsafe-https ./demo-apps/unsafe-https/ -n cascading-tests --wait
helm upgrade --install unsafe-https ./demo-targets/unsafe-https/ -n cascading-tests --wait
# Install nmap
helm -n cascading-tests install nmap ./scanners/nmap/ --wait \
--set="scanner.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/scanner-nmap" \
Expand Down
20 changes: 10 additions & 10 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
# Official installation script for the secureCodeBox
#
# Creates namespace, securecodebox-system, and installs the operator.
# Then installs all possible resources (scanners, demo-apps, hooks).
# Then installs all possible resources (scanners, demo-targets, hooks).
#
# There exist different modes:
# Call without parameters to install interactively
# Call with --all to install all available resources automatically
# Call with --scanners / --demo-apps / --hooks to only install the wanted resources
# Call with --scanners / --demo-targets / --hooks to only install the wanted resources
# Call with --help for usage information
#
# For more information see https://docs.securecodebox.io/

set -euo pipefail
shopt -s extglob

USAGE="Usage: $(basename "$0") [--all] [--scanners] [--hooks] [--demo-apps] [--help|-h]"
USAGE="Usage: $(basename "$0") [--all] [--scanners] [--hooks] [--demo-targets] [--help|-h]"

COLOR_HIGHLIGHT="\e[35m"
COLOR_OK="\e[32m"
Expand Down Expand Up @@ -59,9 +59,9 @@ The installation is interactive if no arguments are provided.

Options

--all Install scanners, demo-apps and hooks
--all Install scanners, demo-targets and hooks
--scanners Install scanners
--demo-apps Install demo-apps
--demo-targets Install demo-targets
--hooks Install hooks
-h|--help Show help

Expand Down Expand Up @@ -185,7 +185,7 @@ function interactiveInstall() {
installResources "$BASE_DIR/scanners" "default" False

print
print "Starting to install demo-apps..."
print "Starting to install demo-targets..."
print "Do you want to install the demo apps in a separate namespace? Otherwise they will be installed into the [default] namespace [y/N]"
read -r line
NAMESPACE="default"
Expand All @@ -195,7 +195,7 @@ function interactiveInstall() {
kubectl create namespace "$NAMESPACE" || print "Namespace already exists or could not be created.. "
fi

installResources "$BASE_DIR/demo-apps" "$NAMESPACE" False
installResources "$BASE_DIR/demo-targets" "$NAMESPACE" False

print
print "Starting to install hooks..."
Expand All @@ -220,8 +220,8 @@ function unattendedInstall() {
fi

if [[ -n "${INSTALL_DEMO_APPS}" ]]; then
print "Starting to install demo-apps..."
installResources "$BASE_DIR/demo-apps" "default" True
print "Starting to install demo-targets..."
installResources "$BASE_DIR/demo-targets" "default" True
fi

if [[ -n "${INSTALL_HOOKS}" ]]; then
Expand All @@ -244,7 +244,7 @@ function parseArguments() {
INSTALL_SCANNERS='true'
shift # Pop current argument from array
;;
--demo-apps)
--demo-targets)
INSTALL_DEMO_APPS='true'
shift
;;
Expand Down
4 changes: 2 additions & 2 deletions bin/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Official uninstall script for the secureCodeBox
#
# Removes all available resources (scanners, demo-apps, hooks, operator) and namespaces
# Removes all available resources (scanners, demo-targets, hooks, operator) and namespaces
#
# For more information see https://docs.securecodebox.io/

Expand Down Expand Up @@ -39,7 +39,7 @@ function uninstallResources() {
helm -n securecodebox-system uninstall securecodebox-operator || true

uninstallResources "$BASE_DIR/scanners"
uninstallResources "$BASE_DIR/demo-apps"
uninstallResources "$BASE_DIR/demo-targets"
uninstallResources "$BASE_DIR/hooks"

kubectl delete namespaces securecodebox-system || true
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BodgeIt Store is a serverside rendering based html website without any heavy jav

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/bodgeit>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/bodgeit>
* <https://github.com/psiinon/bodgeit>

## Chart Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BodgeIt Store is a serverside rendering based html website without any heavy jav

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/bodgeit>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/bodgeit>
* <https://github.com/psiinon/bodgeit>

## Chart Configuration
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:
- vulnerable
- ssh
sources:
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/dummy-ssh
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/dummy-ssh
maintainers:
- name: iteratec GmbH
email: securecodebox@iteratec.com
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Port 22: Username root, Password: THEPASSWORDYOUCREATED

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/dummy-ssh>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/dummy-ssh>

## Chart Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Port 22: Username root, Password: THEPASSWORDYOUCREATED

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/dummy-ssh>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/dummy-ssh>

## Chart Configuration

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A Dummy webserver to echo HTTP requests in log
## Source Code

* <https://github.com/mendhak/docker-http-https-echo>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/http-webhook>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/http-webhook>

## Chart Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A Dummy webserver to echo HTTP requests in log
## Source Code

* <https://github.com/mendhak/docker-http-https-echo>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/http-webhook>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/http-webhook>

## Chart Configuration

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ keywords:
- appsec
- ctf
sources:
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/juice-shop
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/juice-shop
- https://github.com/bkimminich/juice-shop
maintainers:
- name: iteratec GmbH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OWASP Juice Shop: Probably the most modern and sophisticated insecure web applic

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/juice-shop>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/juice-shop>
* <https://github.com/bkimminich/juice-shop>

## Chart Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OWASP Juice Shop: Probably the most modern and sophisticated insecure web applic

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/juice-shop>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/juice-shop>
* <https://github.com/bkimminich/juice-shop>

## Chart Configuration
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:
- vulnerable
- wordpress
sources:
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/old-wordpress
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/old-wordpress
maintainers:
- name: iteratec GmbH
email: securecodebox@iteratec.com
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Insecure & Outdated WordPress Instance: Never expose it to the internet!

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/old-wordpress>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/old-wordpress>

## Chart Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Insecure & Outdated WordPress Instance: Never expose it to the internet!

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/old-wordpress>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/old-wordpress>

## Chart Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:
- swagger
- openapi
sources:
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/swagger-petstore
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/swagger-petstore
- https://github.com/swagger-api/swagger-petstore
maintainers:
- name: iteratec GmbH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is the sample petstore application with a restful API.

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/swagger-petstore>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/swagger-petstore>
* <https://github.com/swagger-api/swagger-petstore>

## Chart Configuration
Expand Down Expand Up @@ -42,5 +42,5 @@ This is the sample petstore application with a restful API.
| securityContext | object | `{}` | |
| service.port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
| swaggerHostOverride | string | `"http://swagger-petstore.demo-apps.svc"` | |
| swaggerHostOverride | string | `"http://swagger-petstore.demo-targets.svc"` | |
| tolerations | list | `[]` | |
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the sample petstore application with a restful API.

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/swagger-petstore>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/swagger-petstore>
* <https://github.com/swagger-api/swagger-petstore>

## Chart Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ image:

# If you want to expose the petstore under a url different to the default service name address use the override to specify a the full host with protocol
#swaggerHostOverride: "https://petstore.example.com"
swaggerHostOverride: "http://swagger-petstore.demo-apps.svc"
swaggerHostOverride: "http://swagger-petstore.demo-targets.svc"

imagePullSecrets: []
nameOverride: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:
- unsafe
- https
sources:
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/unsafe-https
- https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/unsafe-https
maintainers:
- name: iteratec GmbH
email: securecodebox@iteratec.com
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ which contains both private and public key and is not authorized by a third part

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/unsafe-https>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/unsafe-https>

## Chart Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ which contains both private and public key and is not authorized by a third part

## Source Code

* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-apps/unsafe-https>
* <https://github.com/secureCodeBox/secureCodeBox/tree/master/demo-targets/unsafe-https>

## Chart Configuration

Expand Down
4 changes: 2 additions & 2 deletions hooks/persistence-defectdojo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
scanType: "zap-full-scan"
parameters:
- "-t"
- "http://juice-shop.demo-apps.svc:3000"
- "http://juice-shop.demo-targets.svc:3000"
```

### Complete Example Scan
Expand Down Expand Up @@ -110,7 +110,7 @@ spec:
scanType: "zap-full-scan"
parameters:
- "-t"
- "http://juice-shop.demo-apps.svc:3000"
- "http://juice-shop.demo-targets.svc:3000"
```

## Deployment
Expand Down
4 changes: 2 additions & 2 deletions hooks/persistence-defectdojo/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
scanType: "zap-full-scan"
parameters:
- "-t"
- "http://juice-shop.demo-apps.svc:3000"
- "http://juice-shop.demo-targets.svc:3000"
```

### Complete Example Scan
Expand Down Expand Up @@ -115,7 +115,7 @@ spec:
scanType: "zap-full-scan"
parameters:
- "-t"
- "http://juice-shop.demo-apps.svc:3000"
- "http://juice-shop.demo-targets.svc:3000"
```

## Deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void setup() throws Exception {
scan.getMetadata().setNamespace("default");
scan.setSpec(new V1ScanSpec());
scan.getSpec().setScanType("zap-baseline-scan");
scan.getSpec().setParameters(List.of("-t","http://juice-shop.demo-apps.svc:3000", "-j"));
scan.getSpec().setParameters(List.of("-t","http://juice-shop.demo-targets.svc:3000", "-j"));
scan.setStatus(new V1ScanStatus());
}

Expand Down
Loading