Skip to content

Commit

Permalink
chore: zap-api-scan
Browse files Browse the repository at this point in the history
  • Loading branch information
ychung-mot committed Nov 25, 2024
1 parent dbb3303 commit 4695718
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/zap-api-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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
default: https://dev.strdata.gov.bc.ca/api/swagger/strdata/swagger.json

jobs:
zap-api-scan:
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
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: Upload ZAP Scan Report
uses: actions/upload-artifact@v3
with:
name: zap-api-scan-report
path: zap_api_scan_report.html
2 changes: 1 addition & 1 deletion server/StrDss.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public static class ListingExportFileNames

public static class ApiTags
{
public const string Default = "stadata";
public const string Default = "strdata";
public const string Aps = "aps";
public static readonly string[] ApsTagList = { "aps" };
}
Expand Down

0 comments on commit 4695718

Please sign in to comment.