Skip to content

Commit 4bf1676

Browse files
authored
Merge pull request #812 from bcgov/yj
chore: zap api
2 parents 287341d + 8fb2df4 commit 4bf1676

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

.github/workflows/zap-api-scan.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Run ZAP API Scan
33
on:
44
workflow_dispatch:
55
inputs:
6-
api_url:
7-
type: string
8-
description: The base URL of the API to scan
9-
default: https://dev.strdata.gov.bc.ca/api
106
spec_url:
117
type: string
128
description: The URL of the OpenAPI/GraphQL spec
@@ -21,19 +17,17 @@ jobs:
2117
issues: write
2218

2319
steps:
24-
- uses: actions/checkout@v3
25-
26-
- name: ZAP API Scan
27-
uses: zaproxy/action-api-scan@v0.9.0
28-
with:
29-
token: ${{ secrets.GITHUB_TOKEN }}
30-
api_url: ${{ github.event.inputs.api_url }}
31-
openapi: ${{ github.event.inputs.spec_url }}
32-
rules_file_name: '.zap/rules.tsv'
33-
context_file: '.zap/context.context'
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
ref: main
3424

35-
- name: Upload ZAP Scan Report
36-
uses: actions/upload-artifact@v3
37-
with:
38-
name: zap-api-scan-report
39-
path: zap_api_scan_report.html
25+
- name: ZAP API Scan
26+
uses: zaproxy/action-api-scan@v0.9.0
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
30+
format: openapi
31+
target: ${{ github.event.inputs.spec_url }}
32+
rules_file_name: '.zap/rules.tsv'
33+
cmd_options: '-a'

0 commit comments

Comments
 (0)