generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (34 loc) · 1004 Bytes
/
dast.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: ZAP
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: ZAP API Scan
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: corretto
cache: gradle
- name: ShadowJar
run: ./gradlew clean shadowJar
- name: Run App in Container
run: docker compose up --build -d
- name: Check API Health
run: ./health-check.sh
- name: Run ZAP API Scan
run: docker run -v $(pwd):/zap/wrk/:rw --user root -t owasp/zap2docker-weekly zap-api-scan.py -t http://$(ip -f inet -o addr show docker0 | awk '{print $4}' | cut -d '/' -f 1):8080/openapi -f openapi -r api-scan-report.html
- name: Upload Report
uses: actions/upload-artifact@v3
if: always()
with:
name: zap-scan-report
path: api-scan-report.html