VulnAPI is an Open-Source DAST designed to help you scan your APIs for common security vulnerabilities and weaknesses.
By using this tool, you can detect and mitigate security vulnerabilities in your APIs before they are exploited by attackers.
Use this action to scan your project for vulnerabilities with VulnAPI.
All the vulnerabilities detected by the project are listed at this URL: API Vulnerabilities Detected.
More vulnerabilities and best practices will be added in future releases. If you have any suggestions or requests for additional vulnerabilities or best practices to be included, please feel free to open an issue or submit a pull request.
name: Scan for API vulnerabilities
on: [push]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: VulnAPI
uses: cerberauth/vulnapi-action@v2
with:
openapi: 'openapi.yaml'name: Scan for API vulnerabilities
on: [push]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: VulnAPI
uses: cerberauth/vulnapi-action@v2
with:
curl: 'curl http://localhost:8080 -H "Authorization: Bearer
eyJhbGci..."' # gitleaks:allowOn pull requests, the action posts a comment summarizing every finding (one row per finding, with full details in a collapsed section) and updates it on later runs. The step still fails when findings reach the severity threshold.
name: Scan for API vulnerabilities
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: VulnAPI
uses: cerberauth/vulnapi-action@v2
with:
curl: 'curl http://localhost:8080'
severityThreshold: 7
# Also keep a SARIF report, e.g. for upload-sarif or as an artifact
output-format: sarif| Name | Required | Description | Default |
|---|---|---|---|
| version | false | The version of the file to scan. | latest |
| Name | Required | Description | Default |
|---|
| curl | false | The cURL command to scan. | |
| Name | Required | Description | Default |
|---|
| openapi | false | The OpenAPI file location (path or URL) | |
| Name | Required | Description | Default |
|---|---|---|---|
| scans | false | The scans performed. | all |
| excludeScans | false | The scans to exclude. | |
| rateLimit | false | The rate limit used to run API vulnerability scans. | 10/s |
| proxy | false | The proxy server used during the scan. | |
| severityThreshold | false | The severity threshold to trigger a failure. | 0 |
| Name | Required | Description | Default |
|---|---|---|---|
| comment | false | Post (or update) a PR comment summarizing every finding. Needs pull-requests: write. |
true |
| scan-id | false | Keeps a separate PR comment per scan when several scans run on the same PR. | |
| output-format | false | Write the report to a file: json, yaml, jsonl, sarif, markdown, html or terminal. |
|
| output-path | false | File path for output-format. |
under RUNNER_TEMP |
| report-url | false | HTTP endpoint to POST the full report to. | |
| report-format | false | Format for report-url. |
json |
| report-headers | false | Extra headers for report-url, one Key: Value per line. |
|
| show-all-findings | false | Show every finding in the terminal output. | false |
| no-color | false | Disable ANSI colors in terminal output. | false |
| quiet | false | Suppress the terminal display of the report. | false |
Scan results are output to the console and, on pull requests, as a PR comment.
| Name | Description |
|---|---|
| report-path | Path of the report file written for output-format/output-path, if any. |
This scanner is provided for informational purposes only. It should not be used for malicious purposes or to attack any system without proper authorization. Always respect the security and privacy of others.
VulnAPI collects fully anonymized usage data to help improve the tool. This data
is not shared with third parties. You can opt-out of telemetry by setting the
telemetry option to false.
This repository is licensed under the MIT License @ CerberAuth.
