Docs
Safety
Simulating a real user means the agent really clicks, submits and pays. Safety is built in from the first step, so a run never charges a real card, deletes real data or emails your customers.
The short version
- Free audits only read. No form is sent and no request but a read leaves the browser. See Read-only audits.
- Staging first. Each environment is labelled staging or production. Staging is recommended.
- Production safe mode. On production, delete, pay, invite and send are blocked by default.
- Live payment guard. The agent checks for live payment keys before it types a card, and stops if it finds one.
- Official test cards only. See Test cards.
- Tagged traffic. Agent visits can be excluded from your analytics.
- Confirmed sites only. Before the first audit of a site in your project you confirm it is yours to test. Audits of a confirmed site use a stealth browser, so bot protection shows the agent your site. See Bot protection.
- No code access. WitnessQA reads issues and uses your app. It never reads your repository.
Read-only audits
A free audit, and any run without a test account, uses your site like a visitor who only looks. It is enforced in code, not left to the agent:
- Only
GET,HEADandOPTIONSrequests. Forms are never sent. -
Nothing is sent as a page is left or closed either: no analytics beacons, no
keepaliverequests, no link pings. Browsers send these after the page is gone, so they are refused before it goes. - Public addresses only. Every request the browser makes leaves through a proxy in WitnessQA that looks up the address itself, refuses private and internal networks, and connects to the address it checked.
Staging first
Label every environment when you add it. The label decides what the agent is allowed to do. Staging should use your payment provider's test mode and a copy of data you do not mind changing.
-
Label the environment
When you add an environment, pick Staging or Production. You can change it later in the environment settings.
Each environment shows its label. Production is marked in red.
Production safe mode
On production, the agent can browse, search, fill forms and check pages, but it does not finish actions that change real data or reach real people. Before each click, it checks the button and the request it is about to send. A blocked step is shown as skipped for safety, never as a pass or a fail.
| Blocked on production | Examples |
|---|---|
| Delete | Delete, remove, cancel subscription, close account |
| Pay | Submit a payment form or confirm a purchase |
| Invite | Invite a teammate or share access by email |
| Send | Send a message, email, SMS or notification to someone else |
-
Review what is allowed
Open the production environment and go to Safe mode. Everything is blocked by default. Allow an action only if the run cannot cause harm, for example sending messages to an internal test inbox.
Safe mode on production. Each action is blocked until you allow it. -
See skipped steps in the report
The run continues after a skipped step when it can, so the rest of the flow is still checked.
A delete step skipped for safety on production.
Live payment guard
Before the agent types a card, on any environment, it inspects the page for signals that the payment form is live. If it finds one, or cannot tell, it stops and marks the step skipped for safety. Examples of what it checks:
| Provider | Test | Live |
|---|---|---|
| Stripe | pk_test_ key | pk_live_ key |
| Paddle | Paddle.Environment.set('sandbox'), test_ token | live_ token |
| PayPal | SDK from sandbox.paypal.com or client-id=sb | Anything else |
| Braintree | sandbox_ key | production_ key |
| Adyen | test_ client key | live_ client key |
| Checkout.com | pk_sbox_ key | Any other pk_ key |
-
The guard stops on a live key
Nothing is typed into the card field. The rest of the run goes on, and the report says exactly why the payment was skipped.
A live Stripe key was found, so the payment step was skipped.
Exclude agent traffic from analytics
The agent says who it is. Its user agent ends with WitnessQA/1.0, and every request to your site carries an
X-WitnessQA-Run header with the run ID. The header is sent to your site only, not to analytics or other
third parties, so it never breaks their CORS.
User-Agent: Mozilla/5.0 (...) Chrome/... WitnessQA/1.0 (+https://witnessqa.com/docs/safety/#traffic)
X-WitnessQA-Run: 7d1f0c2e-... -
Plausible
Nothing to do. The agent's browser sets
plausible_ignore, the same switch Plausible gives site owners to leave out their own visits. -
Google Analytics 4
GA4 cannot filter by user agent. Do not load the tag for the agent: in Google Tag Manager, add a trigger exception on a JavaScript variable
navigator.userAgentthat containsWitnessQA. With gtag.js on the page, wrap it:if (!navigator.userAgent.includes('WitnessQA')) { gtag('config', 'G-XXXXXXX'); } -
PostHog
In Project settings, under Filter out internal and test users, add a filter:
$raw_user_agentdoes not containWitnessQA. Or skip capturing in code:posthog.init('phc_...', { before_send: (e) => (navigator.userAgent.includes('WitnessQA') ? null : e), }); -
Your server or CDN
Drop or tag requests that have the
X-WitnessQA-Runheader, for example in your logs or server-side analytics. Sign-ups from the agent inbox use@inbox.witnessqa.comaddresses: leave them out of your sign-up numbers.
Bot protection
If your site uses Cloudflare, Vercel Firewall or another bot protection, it may stop the agent with a "verify you are
human" page. By default WitnessQA never tries to get around it. Instead, let the agent through with one rule: in the project, click
Access on the environment and Create agent key. The agent sends the key in an
x-witnessqa-key header, to your site only.
-
Cloudflare
Security, WAF, Custom rules, Create rule. Edit the expression and paste it with your key:
(http.request.headers["x-witnessqa-key"][0] eq "wq_agent_...")Action: Skip. Tick All Super Bot Fight Mode rules, All managed rules, All rate limiting rules and All remaining custom rules. On the Free plan, rules cannot skip Bot Fight Mode: turn it off for this site, or test a staging site without it.
-
Vercel Firewall
Firewall, Configure, New rule. If Request Header
x-witnessqa-keyEquals your key, then Bypass. -
Other firewalls
Allow requests whose
x-witnessqa-keyheader equals your key. The agent also names itself in its user agent:WitnessQA/1.0.
Stealth browser
Audits of an environment in your project open your site in a stealth browser: bot protection sees it as a person's browser, so the agent reaches protected pages and forms and the test is correct. Before the first audit of an environment, in onboarding or on Environments, a project member confirms once:
I confirm this site is mine or I have permission to test it. The stealth browser is automated, verified use for testing this site only, and is not used for any other reason.
- The confirmation is mandatory and saved per environment. WitnessQA records who confirmed and when.
- It is never used for a free audit of an address that is not in a project.
-
Its user agent is the browser's own, without
WitnessQA/1.0. Requests to your site still carry theX-WitnessQA-Runheader, so you can leave them out of your analytics. - Safe mode, the live payment guard and the private network guard apply as on every run.
- Speed is measured in the normal browser. It does not solve puzzles or click "I am human" boxes.
Your data
- Credentials, TOTP secrets and bypass tokens are stored encrypted and never appear in screenshots, videos or logs.
- Evidence is kept for 7, 30 or 90 days depending on your plan, then deleted.
- Findings the agent is not sure about are marked as such, never shown as confirmed issues. During early access the team also checks reports and removes false alarms.