TorusGuard Web Validate — Bounded HTTP Probing & Session Capture
Objective
Safely probe live web applications within authorized scope, injecting transparent audit headers, verifying security headers and cookies, redacting sensitive tokens, and recording deterministic replay traces.
Authorization Gate Check
Before dispatching any HTTP request:
- Verify
.torusguard/config/scope.jsonexists and contains target URL. - Confirm current timestamp is prior to
expires_atTTL. - Assert target is local or non-production staging.
Safety Gate
All requests pass through .torusguard/scripts/safety_gate.py:
Auto-Allowed: Read-onlyGET,HEAD,OPTIONSon non-sensitive paths.Approval Required: Requests touching auth, sessions, or parameters.Manual Only: Any destructive method (DELETE,DROP) is strictly blocked.
Execution Steps
- Gate Check: Validate scope in
scope.jsonand querysafety_gate.py. - Handle Automation Failure: If automated web validation scripts fail, YOU must manually construct the HTTP requests (using
curlorfetch) and inspect the responses. - Inject Audit Header: Attach
X-TorusGuard-AuthID: <auth_id>to all outbound requests. - Dispatch Bounded Probe: Send single non-destructive HTTP request.
- Validate Security Headers: Check for CSP, HSTS, X-Content-Type-Options, and CORS configurations.
- Audit Cookie Flags: Verify
HttpOnly,Secure, andSameSiteon session cookies. - Capture Replay Trace: Save sanitized trace in
.torusguard/runs/<run_id>/requests.json.
Credential Redaction
All Bearer tokens, cookies, passwords, and API keys are redacted prior to disk serialization (Bearer [REDACTED]).
Safety Constraints
- Max 50 requests per validation session.
- Never test unauthorized domains or third-party APIs.
- Zero state-changing destructive operations.
Output Format
🌐 [TorusGuard] Web Validation Completed (AI Assisted)
- Target: <Host URL> | Endpoints Tested: <Count>
- Header Posture: <CSP/HSTS Status> | Cookies: <Flags Status>
- Replay Trace: `.torusguard/runs/<run_id>/requests.json`
Next: Run `/torusguard exploit-check` to confirm exploitability of candidate flaws.