A step-by-step guide to setting up automated security scanning on every pull request using GitHub Actions and ZeriFlow.
Anay Pandya
891 words
Anay Pandya
Founder of ZeriFlow · 10 years fullstack engineering · About the author
Key Takeaways
Every line of code you push to production is a potential attack vector. SQL injection, hardcoded API keys, vulnerable dependencies — these issues slip through code reviews more often than anyone likes to admit.
<div class="zf-stat-callout" style="background:#0d1117;border:1px solid rgba(16,185,129,0.25);border-left:3px solid #10b981;border-radius:4px;padding:16px 20px;margin:24px 0"> <p style="margin:0 0 4px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.15em;color:#10b981;font-family:monospace">ZeriFlow Data — 12,400+ sites analyzed</p> <p style="margin:0;font-size:13px;color:#e2e8f0;line-height:1.6;font-family:monospace">Across 12,400+ sites scanned on ZeriFlow, 19% expose sensitive paths such as /.git/, /backup, or /admin without authentication — providing attackers a direct window into application internals.</p> </div>
Is your site actually secure?
Run a free check — 60 seconds
Keep reading
The solution? [Automated security](https://zeriflow.com/blog/automated-security-testing-guide) scanning on every pull request. When security checks run automatically, nothing gets merged without being analyzed first.
This guide walks you through setting up ZeriFlow in your GitHub Actions pipeline. By the end, every PR in your repository will get a security score and actionable findings — automatically.
ZeriFlow runs a two-layer analysis on every pull request:
### Layer 1: Static Analysis (Free) Runs directly in your GitHub Actions runner at zero cost: - Secrets detection — API keys, tokens, passwords, .env files (powered by Gitleaks) - Dependency vulnerabilities — Known CVEs in npm, pip, and other package managers (npm audit) - Code patterns — SQL injection, XSS, command injection, eval usage (Semgrep)
### Layer 2: AI Contextual Analysis Claude Sonnet 4 reviews each finding with full code context: - Authentication & authorization — Missing middleware, JWT misuse, IDOR - Business logic — Race conditions, mass assignment, privilege escalation - Configuration — CORS wildcards, debug mode, stack trace exposure - Rate limiting — Missing brute-force protection, no CAPTCHA - Error handling — Empty try/catch, unhandled promise rejections - Performance — N+1 queries, missing indexes, bundle bloat - Accessibility — Missing alt text, unlabeled form inputs
The AI layer is critical: it filters false positives by understanding your code's context, not just pattern-matching.
my-org/my-app)Important: The API key is shown only once. Copy it immediately and store it safely.
ZERIFLOW_API_KEY.github/workflows/zeriflow.yml:name: ZeriFlow Security
on:
pull_request:
branches: [main, master]
permissions:
contents: read
pull-requests: write
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Fame29/security-scan@v1
with:
api-key: ${{ secrets.ZERIFLOW_API_KEY }}main branch.That's it. 3 minutes of setup.
Create a new branch, make any change, and open a PR. ZeriFlow will:
ZeriFlow posts a comment on your PR that looks like this:
✅ ZeriFlow Security Check — PASSED - Score: 82/100 — Threshold: 60 - Findings: 0 critical, 2 warnings, 1 info
Each finding includes: - Severity (critical / warning / info) - File and line number - Description of the issue - Suggested fix with code example - Confidence level (how sure the AI is)
| Feature | ZeriFlow | Snyk | SonarCloud |
|---|---|---|---|
| Setup time | 3 min | 30+ min | 15+ min |
| AI false-positive filtering | ✅ | ❌ | ❌ |
| Price (solo dev) | $4.99/mo | $25/dev/mo | $30/mo |
| Security + Performance | ✅ | Security only | Quality focus |
| PR comments | ✅ | ✅ | ✅ |
ZeriFlow is purpose-built for small teams and indie developers who want enterprise-grade security scanning without the enterprise price tag.
Adding security scanning to your CI/CD pipeline doesn't have to be complicated or expensive. With ZeriFlow:
[Try ZeriFlow CI/CD →](https://zeriflow.com/ci-cd)
Stop shipping insecure code. Start scanning every PR.
<!-- zf-internal-links -->
Add security scanning to your CI/CD pipeline.
Catch vulnerabilities before they reach production.
Related resources
Website Vulnerability Scanner
Run a broader website security audit across headers, TLS, DNS, cookies, SEO, and disclosure checks.
Security Headers Checker
Check CSP, HSTS, X-Frame-Options, and other response headers.
SSL Checker
Review TLS certificate, HTTPS, and transport security signals.
DMARC Checker
Validate email authentication records for domain spoofing protection.
CSP Checker
Review Content-Security-Policy coverage and common gaps.
Monitor your security score
Schedule recurring scans and catch regressions after deployments.