GitHub Action — PR Scanning
Scan every URL in a pull request against the Phisherman engine and block merging when a malicious link is found.
How it works
When a pull request is opened or updated, the action extracts every URL from the PR body and comments, then checks each one against POST /api/check. Verdicts above the malicious threshold fail the check, which blocks merging when branch protection requires it. Suspicious URLs can be included with one input.
The action is published as phisherman/action@v1 and runs on GitHub's free runners — no server required.
Quick start
Create a workflow file and reference the action directly. Save it as .github/workflows/phisherman-scan.yml.
Then add your API details as repository secrets:
| Secret | Required | Value |
|---|---|---|
| PHISHING_API_URL | Yes | https://phisherman-5r1o.onrender.com/api |
| PHISHING_API_KEY | No | Your ph_ key (higher rate limits) |
Set them under Settings → Secrets and variables → Actions. The next pull request runs the check automatically.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
| phishing_api_url | Yes | — | Phishing detection API URL |
| phishing_api_key | No | — | ph_ API key for higher rate limits |
| block_on_suspicious | No | false | Also fail the check on suspicious URLs |
Block on suspicious URLs
By default only confirmed malicious URLs fail the check. Set block_on_suspicious to true to also block on suspicious verdicts:
Make the check required
Failing the check is only effective if branch protection requires it. Under Settings → Branches → Add branch protection rule, enable Require status checks to pass before merging and select Scan URLs in Pull Request.
Other setup options
Run the scanner directly
For full control, copy tools/github_pr_scanner.py into your repo and use this workflow in place of the action:
Troubleshooting
| Symptom | Fix |
|---|---|
| Check never runs on a PR | Confirm the secret is named exactly PHISHING_API_URL |
| Action not found | Confirm the action is published as phisherman/action@v1 |
| 429 responses in logs | Rate limited — add a ph_ API key |