Every engineering team runs a CI/CD pipeline. Most of them run unit tests, integration tests, and maybe a SAST scan. Very few validate against the OWASP Top 10 at runtime — the class of vulnerabilities that static analysis cannot catch.
This guide shows you exactly how to close that gap.
Why OWASP Top 10 Requires Runtime Validation
OWASP's most critical category, Broken Access Control (A01), cannot be detected by reading code. Tools need to exercise the application as a real attacker would — submitting requests, testing authorization boundaries, probing for privilege escalation.
Static analysis misses:
- IDOR (Insecure Direct Object Reference) — requires authenticated session testing
- JWT algorithm confusion — requires crafting malformed tokens
- Mass assignment — requires understanding business object structure
This is exactly what DAST (Dynamic Application Security Testing) is designed for.
The Pipeline Integration Pattern
A security-gated pipeline looks like this:
git push
→ Build & Unit Tests
→ Deploy to staging
→ DAST scan (OWASP Top 10 validation)
→ Gate: fail if CRITICAL or HIGH findings
→ Deploy to production
The key insight: the DAST scan runs against the live staging environment, not against source code.
Step 1: Define Your Target Scope
Before running any scan, define what's in scope:
# pentestcheck.yml
targets:
- url: https://staging.yourapp.com
auth:
type: bearer
token: $SCAN_TOKEN
scope:
include:
- /api/v1/**
- /dashboard/**
exclude:
- /api/v1/webhooks # avoid triggering external calls
Always exclude endpoints that cause side effects (email sends, payment triggers, third-party webhooks).
Step 2: Authentication — The Most Skipped Step
Most teams run unauthenticated scans and wonder why they miss half the vulnerabilities. Authentication is non-negotiable for OWASP A01 (Broken Access Control).
Configure your scanner with a dedicated scan account that has standard user privileges. Run a second pass with an elevated account to test privilege separation.
# GitHub Actions example
- name: PentestCheck DAST Scan
uses: pentestcheck/scan-action@v2
with:
target: ${{ vars.STAGING_URL }}
api_key: ${{ secrets.PENTESTCHECK_API_KEY }}
auth_token: ${{ secrets.SCAN_USER_TOKEN }}
fail_on: critical,high
owasp_top10: true
Step 3: Map OWASP Categories to Scan Rules
| OWASP Category | Scan Technique | Can Automate? |
|---|---|---|
| A01 Broken Access Control | IDOR testing, auth bypass | Partially |
| A02 Cryptographic Failures | TLS audit, header analysis | Yes |
| A03 Injection | SQL, XSS, SSTI active probing | Yes |
| A04 Insecure Design | Threat modeling | No |
| A05 Security Misconfiguration | Header/config audit | Yes |
| A06 Vulnerable Components | SCA scan | Yes |
| A07 Auth & Session Failures | Session fixation, brute-force | Yes |
| A08 Software Integrity | SBOM verification | Yes |
| A09 Logging Failures | Response analysis | Partially |
| A10 SSRF | Blind SSRF probing | Yes |
Categories A04 and A09 require human review. Everything else can be automated.
Step 4: Gate Your Pipeline
Set your pipeline to fail on critical or high findings only — medium and low should create tickets, not block deployments. This prevents alert fatigue while maintaining a meaningful security gate.
# Exit codes: 0 = clean, 1 = medium/low, 2 = high/critical
if pentestcheck_exit_code == 2:
fail_pipeline("CRITICAL/HIGH findings — deployment blocked")
elif pentestcheck_exit_code == 1:
create_jira_ticket(findings)
continue_deployment()
Step 5: Handle False Positives Systematically
Every DAST tool generates some false positives. Build a suppression list in code (not in the tool UI) so it's version-controlled:
# .pentestcheck/suppressions.yml
suppressions:
- rule: "sql-injection"
url: "/api/v1/search"
reason: "Parameterized query confirmed via code review"
expires: "2026-06-01"
approved_by: "security-team"
Never suppress permanently — always set an expiry date and require security team sign-off.
The Result: Security as Code
When OWASP validation runs in your pipeline, security stops being a gate that happens once a quarter. It becomes a continuous signal — every feature branch, every PR, every deployment.
The teams that ship the fewest vulnerabilities don't have the best security team. They have security embedded in the feedback loop that engineers already use every day.
PentestCheck integrates directly with GitHub Actions, GitLab CI, and Jenkins. Scan your staging environment in under 5 minutes.