Skip to content

lreimer/continuous-zapk8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a4564ac · May 11, 2021

History

18 Commits
Nov 22, 2020
May 11, 2021
Nov 24, 2020
Nov 19, 2020
May 4, 2021
Nov 19, 2020
Nov 24, 2020
Mar 2, 2021
Nov 22, 2020
Nov 22, 2020
May 11, 2021
Nov 20, 2020
Nov 20, 2020
Nov 22, 2020
Nov 19, 2020

Repository files navigation

Continuous ZAP on K8s

Continuous ZAP security tests on Kubernetes. We will run the tests continuously in headless mode against a demo HTTP endpoint.

Usage

Basic Setup

This example deploys a simple microservice in the default K8s namespace. It also creates a zap namespace and deploys the ZED Attach Proxy.

$ pulumi up
$ k get all -n zap
$ k get all

Using ZAP Web UI

The easiest way is to use the ZAP UI in a Browser. Issue the following commands to get a Swing UI in your web browser:

$ export PORT=`kubectl get service zap-gui -n zap -o=json | jq -r '.spec.ports[] | select (.name | test("http")) | .nodePort'`
$ open http://localhost:$PORT/zap

Using ZAP via API

Another option is to use the ZAP API to programmatically connect, scan and attack your application targets:

$ ./gradlew test

Continuous API Scan

# https://www.zaproxy.org/docs/docker/api-scan/
$ k describe cronjob.batch/zap-api-scan -n zap

Maintainer

M.-Leander Reimer (@lreimer), [email protected]

License

This software is provided under the MIT open source license, read the LICENSE file for details.