This GitHub Action runs a VulnZap scan via the VulnZap CLI and streams results in the job logs. The action auto-detects repository URL, branch, and commit from the GitHub context; you only provide the API key.
name: VulnZap Security Scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run VulnZap Scan
- uses: VulnZap/vulnzap-cicd@v1
with:
api-key: ${{ secrets.VULNZAP_API_KEY }}| Name | Description | Required |
|---|---|---|
api-key |
Your VulnZap API Key. | true |
- The action derives the repository URL as
https://github.com/${GITHUB_REPOSITORY}and also passesGITHUB_REF_NAMEandGITHUB_SHAto the CLI when present. - Make sure Docker/network access is available so
npx vulnzap@latestcan install and run.
Add your VulnZap API Key as a secret in your repository:
- Go to your repository's Settings → Secrets and variables → Actions
- Click New repository secret
- Name it
VULNZAP_API_KEY - Paste your API key value and save