Remediation
Every finding carries a remediation block tailored to the stack Pentestas fingerprinted. Not generic OWASP advice β specific, paste-ready guidance for the framework you're actually running.
Shape of a remediation
Three parts:
1. One-line fix
The shortest possible action that resolves the finding. E.g. for a missing X-Frame-Options:
Set
X-Frame-Options: DENYon all HTML responses, or use the stricterframe-ancestorsCSP directive.
2. Stack-specific code
The exact change for your framework. Pentestas ships templates for:
- Rails β
config/application.rbmiddleware hints - Django β
MIDDLEWARE+SECURE_*settings - Flask / FastAPI β middleware decorators
- Express / Koa β helmet config
- ASP.NET Core β
app.UseSecurityHeaders()+ middleware registrations - Laravel / Symfony β security.yaml snippets
- Go (std + echo/gin) β middleware
- Cloudflare Workers / nginx / Apache β config snippets for edge-layer enforcement
For CWE-defined vulns (SQLi, XSS, SSRF, etc.), the block shows the vulnerable code pattern + safe rewrite, using the language Pentestas detected.
3. Defence-in-depth
Optional hardening beyond the minimum fix. E.g. for an XSS finding:
- Minimum: escape user input in this template.
- DiD #1: set a strict CSP that rejects inline scripts.
- DiD #2: apply trusted-types at the DOM layer.
- DiD #3: add the fix to your lint config so future regressions fail CI.
AI remediation (Pro+)
Claude re-reads the finding and proposes remediation tuned to your exact codebase. When the app's source is accessible (via GitHub integration), the AI layer can reference specific files and methods; otherwise it works from the HTTP trace.
Output is a markdown block with reasoning + code change + verification command.
Copy-paste workflow
- Open finding β Remediation tab.
- Click Copy fix to grab the code snippet.
- Paste into your PR + link back to the finding for reviewers.
Verification
After deploying the fix, Rerun scan on the same target. The Accuracy Gate re-tests the previously-failing payload; if it now fails cleanly, the finding is marked Resolved with the rescan timestamp. This creates a clean audit trail: Found β Fix β Verified.
When the fix isn't obvious
Some findings (business-logic, authorization model mistakes) don't have a code-level one-liner. For these, the remediation is a design recommendation:
"Refactor the
/api/users/{id}/ordersendpoint to deriveuser_idfrom the session, not from the path. Current implementation trusts the path parameter, which is the root cause of this IDOR."
Enterprise customers can engage Pentestas Professional Services for engineer-led remediation pairing sessions β we walk the fix with your team for one-hour sessions.
See also
- Severity scale
- Validation β re-running after a fix