Security testing has historically been a luxury only well-funded companies could afford. A traditional penetration test runs $15,000–$50,000, takes 2–4 weeks to schedule and execute, and produces a report that's outdated by the time it arrives. For an indie developer or early-stage startup, that's simply not viable.
Automated penetration testing changes this entirely. Instead of hiring a consulting firm to manually probe your application, AI agents do it continuously, rapidly, and at a fraction of the cost. Here's how to do it.
Before You Start: What You Need
To run a meaningful penetration test, you need a live application accessible over the internet (or at least accessible to the scanning infrastructure). The test needs to interact with your actual running application — not your source code — because many vulnerabilities only exist at runtime.
- A publicly accessible URL for your application
- Proof that you own or are authorized to test the domain
- A test account you can provide for authenticated scanning (optional but recommended)
- About 30 minutes for the scan to complete
Important
Only run penetration tests on applications you own or have explicit written permission to test. Unauthorized testing is illegal under computer fraud laws in most jurisdictions.
Step 1: Add and Verify Your Domain
The first step is proving ownership of the target domain. This is a critical safeguard that prevents the tool from being used to attack domains you don't own. Verification typically works by adding a DNS TXT record or placing a verification file at a specific URL on your domain.
Once verification is complete, the scanner knows it has permission to probe the target. Domain verification also scopes the test — ensuring the AI agents don't accidentally follow links to external services or third-party APIs.
Step 2: Choose Your Scan Configuration
Different testing goals call for different scan configurations. The main choices are:
- Black-box: The scanner has no credentials and tests only what an anonymous attacker could reach. Good for a quick surface-level assessment.
- Gray-box: You provide test credentials, and the scanner tests as an authenticated user. This is the most valuable configuration for finding IDOR and authorization issues.
- White-box: You provide credentials, API keys, and sometimes source code context. The most comprehensive option.
For most vibe-coded apps, gray-box testing gives you the best signal-to-noise ratio. The scanner can log in, access all the features your users can access, and attempt to escalate privileges or access other users' data.
Step 3: What Happens During the Scan
Once you kick off the scan, automated agents begin mapping your application's attack surface. They crawl every page, API endpoint, and form, then systematically attempt exploitation techniques:
- Endpoint discovery: finding hidden routes, API versions, and admin panels
- Parameter analysis: identifying every parameter that accepts user input
- Authorization testing: attempting to access resources belonging to other users
- Input fuzzing: sending malformed input to find injection vulnerabilities
- Authentication testing: probing login flows for brute force and bypass vulnerabilities
- Configuration checks: looking for exposed credentials, verbose errors, and misconfigurations
- Business logic testing: attempting to exploit application-specific logic flaws
The scan typically completes in 20–40 minutes depending on application complexity. Unlike a vulnerability scanner, the AI agents don't just flag potential issues — they confirm exploitability by actually executing the attack. This means the findings list contains only real vulnerabilities, not false positives.
Step 4: Reviewing Your Findings
After the scan, you get a prioritized list of findings with severity ratings (critical, high, medium, low). Each finding includes:
- A description of the vulnerability and what it means
- The exact request(s) used to exploit it
- The response that proves exploitability
- The CVSS score and OWASP category
- A step-by-step fix with code examples in your tech stack
Step 5: Applying the Fixes
The fix recommendations are designed to be copy-pasteable. For an IDOR vulnerability in a Next.js API route, you'll get the corrected version of the route with the authorization check added. For an injection vulnerability in a Supabase query, you'll get the parameterized version.
After applying fixes, you can re-run the affected scan checks to verify the vulnerability has been resolved. This gives you a tight feedback loop: scan, fix, verify, repeat until the critical and high findings are resolved.
What to Prioritize When You Have Limited Time
If you have a launch deadline and can't fix everything before shipping, prioritize in this order:
- Critical findings that expose other users' data (IDOR, broken authorization) — these create liability
- Authentication bypass vulnerabilities — these allow attackers to operate as any user
- Injection vulnerabilities that could corrupt or exfiltrate your database
- High-severity configuration issues (exposed admin panels, wide-open CORS)
- Everything else at your own pace
Ready to check your app?
Find your vulnerabilities before attackers do.
Pentrust runs AI agents that chain real exploits against your application and provides copy-paste fixes for every finding. Full pentest in under 30 minutes.
Run a free pentest