Skip to content

Commit

Permalink
Merge pull request #812 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: zap api
  • Loading branch information
ychung-mot authored Nov 25, 2024
2 parents 287341d + 8fb2df4 commit 4bf1676
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/zap-api-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Run ZAP API Scan
on:
workflow_dispatch:
inputs:
api_url:
type: string
description: The base URL of the API to scan
default: https://dev.strdata.gov.bc.ca/api
spec_url:
type: string
description: The URL of the OpenAPI/GraphQL spec
Expand All @@ -21,19 +17,17 @@ jobs:
issues: write

steps:
- uses: actions/checkout@v3

- name: ZAP API Scan
uses: zaproxy/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
api_url: ${{ github.event.inputs.api_url }}
openapi: ${{ github.event.inputs.spec_url }}
rules_file_name: '.zap/rules.tsv'
context_file: '.zap/context.context'
- name: Checkout
uses: actions/checkout@v4
with:
ref: main

- name: Upload ZAP Scan Report
uses: actions/upload-artifact@v3
with:
name: zap-api-scan-report
path: zap_api_scan_report.html
- name: ZAP API Scan
uses: zaproxy/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
format: openapi
target: ${{ github.event.inputs.spec_url }}
rules_file_name: '.zap/rules.tsv'
cmd_options: '-a'

0 comments on commit 4bf1676

Please sign in to comment.