Describes how to setup a local docker environment to use jenkins & owasp tooling for the talk. Demos below are organized around the tools we're using. Owasp Dependency Check, Owasp ZAP, Owasp O-Saft, and the Jenkins tooling around them.
- Clone the repository.
- Ensure you have maven installed.
- Go to the java directory -
cd java
- execute
mvn dependency-check:check
to just execute the OWASP check or a regular mvn build to see the failure later on. By default in the POM the maven check is running in the verify step.
- Clone the repository.
- You will need dotnet core 3.1 installed
- Go to the dotnet directory -
cd dotnet
& then the project directorycd OwaspDemo
- Compile the project with
dotnet build OwaspDemo.sln
. Owasp Dependency Check will run after the compilation.
- Clone the repository.
cd php
- execute the following command
../cli/bin/dependency-check.sh --project owaspdemo --out . --scan . --enableExperimental --data owaspdata --cveValidForHours 24 --failOnCVSS 4
- Can view the report by opening the dependency-check.html
- Clone the repository.
- Docker-Compose up from the source directory.
- Once it has finished starting, from another tab run
docker container exec -it jenkinsowasp cat /var/jenkins_home/secrets/initialAdminPassword
- Copy/Paste the admin password.
- Login to localhost:8080 using password above and accept defaults.
- Install recommended plugins.
- Setup admin username/password.
- Set to run on port:8080
- You might need to restart jenkins. At which point you'll be able to login to http://localhost:8080
Prereq: Complete Initial Jenkins setup.
docker exec -u root -it jenkinsowasp bash
apt-get update && apt-get install -y maven
- exit out of shell - type
exit
- Go to jenkins in your browser http://localhost:8080
- Select new Item & then freestyle project called owaspmaven
- Under 'source code management' select 'git' and set repository url to https://github.com/BillDinger/ContinuousSecurity
- Check the box under 'build environment' that says delete the workspace before build starts.
- Under 'build' select 'add build step' and then select 'Invoke Top Level Maven Targets'
- Expand the box and enter
clean compile -P analysis
- click 'advanced' and then under 'POM' enter 'java/pom.xml'
- click save & then 'build now' , verify build is succesful.
Prereq: Complete Jenkins Setup & Jenkins Maven Setup
- Go to http://localhost:8080/pluginManager/
- Install OWASP Dependency-Check Plugin & restart jenkins
- Go to your owaspmaven project (http://localhost:8080/job/owaspmaven/configure) and select add a build step and then dependency check
- in the box for directories to scan type in
/*java/*.jar
- Select Add Post Build Options & 'publish dependency-check results'
- In the dependency check results enter
**/dependency-check-report.xml
Prereq: Complete Jenkins Setup & maven setup (the CLI scanner requires a JRE)
- Go to jenkins in your browser http://localhost:8080/
- Select new Item & then freestyle project called owaspphp
- Under 'source code management' select 'git' and set repository url to https://github.com/BillDinger/ContinuousSecurity
- Check the box under 'build environment' that says delete the workspace before build starts.
- Under 'build' select 'add build step' and then select 'Execute Shell'
- Expand the box and enter
${WORKSPACE}/cli/bin/dependency-check.sh --project php --out ${WORKSPACE} --scan ${WORKSPACE}/php -l ${WORKSPACE}/out.log --enableExperimental
This command will scan the directoryphp
, output the log file & report in the root of the jenkins workspace. TheenableExperimental
flag is necessary
Prereq: Complete initial jenkins setup & maven jenkins setup.
docker exec -u root -it jenkins bash
apt-get update && apt-get install -y docker
- Go to jenkins in your browser http://localhost:8080/
docker run -i owasp/zap2docker-stable zap-cli quick-scan --self-contained --start-options "-config api.disablekey=true" http://exampe/url/to/hit
Just a standard drupal site for use in proof of concept testing the OWASP zap scanner.
- Start drupal by doing
docker-compose -f drupal.yml up
- browse to https://localhost:8083
- select English
- Select umami profile
- for Database options enter: Database type: PostgreSQL Database name: postgres Database username: postgres Database password: example ADVANCED OPTIONS; Database host: postgres
- Enter whatever email, username/password you want.
For latest you can check the official website