DEV Community

Eng Soon Cheah
Eng Soon Cheah

Posted on • Edited on

5 2

Security Testing with ZAP and GitHub Actions

Dynamic Application Security Testing (DAST) with OWASP Zap Scanner

PREREQUISITE

For this demo, I decided to use OWASP ZAP Full Scan.
You can find this at GitHub Marketplace.

Let Start the Demo

  1. Go to Actions tab at your GitHub Repo. Alt Text
  2. Select set up a workflow yourself ->
  3. Go to Marketplace, search for OWASP and Select OWASP ZAP Full Scan, and you will see the sample workflow snippet. Alt Text
  4. Modify the workflow snippet as below and replace with sample website URL. After modified, select Start commit. ```

name: zapfull-security-scan
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: OWASP ZAP Full Scan
uses: zaproxy/action-full-scan@v0.1.0
with:
target: "https://techconnectweb.azurewebsites.net/"

5.Go back to **Actions** tab, you will see the workflow In progress.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wllu15r7m5dsxzdqt2l0.png)
6.Select the **build**. The workflow in progress setup and scanning.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4oiiguov4c43n40j4vqg.png)
7.After complete scanning through OWASP ZAP, the report will generated in **Issues** tab.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1wucdpskc91iwypvby1u.png)
8.For more details for OWASP ZAP Full Scan report, you can go back to the **Actions** tab, select the Artifacts **zap_scan**. After downloaded, you will see the OWASP Report as below.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vlwmjganc8zfg46ljabp.png)

References:
https://www.zaproxy.org/blog/2020-05-15-dynamic-application-security-testing-with-zap-and-github-actions/
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay