Safety & Secrets
Jevitate is an automation platform that also works as a testing tool: a Journey is a parameterized flow that does real work, and its purpose is to prove that users can meet their objectives. Both uses send real requests, so both need guardrails. Each rule below is enforced in code to the extent it states, and no further, and ships with a test that asserts it refuses. What guards a Journey run differs between MCP and the CLI: see the table.
Opt-in navigation guard (0.14.0)
The allowlist check after each settle runs after the other page has loaded. --block-off-allowlist-navigation (MCP run_exploration.blockOffAllowlistNavigation, suite option of the same name) stops it earlier, for mission runs only (goal, usability, adversarial, coverage, exploratory, --feature):
- A page navigation the page starts itself to an origin outside the allowlist (a link,
location.href, a form GET, a popup) is answered204in the mission's browser before it loads, so the page stays put. - The run treats it as a departure: a goal run stops
blockedwith the URL in the transcript, adversarial lists it inscope.departuresand resets, coverage, exploratory and feature runs record it and never expand it. - Server redirects still pass, so the after-settle check stays the guard. Subresources and fetch/XHR load as usual, and the HTTP cache is off for a guarded run.
- It never applies to login,
journey run,source run,load,recordordemosessions. Without the flag nothing changes.allowedOriginsis the session's authorized origins (it scopes the geolocation grant), not a network guard.
What guards a Journey run
A Journey does real work in your app, so a run can send real writes. Which guards apply depends on who starts it. These are the ones in code today:
| Guard | MCP (run_journey, chain_journeys, run_check, load run and the other run tools) | CLI (journey run, regression run) |
|---|---|---|
| Only a promoted Journey with a current approval runs | Yes, refused before any browser opens: E_JOURNEY_NOT_PROMOTED, E_JOURNEY_APPROVAL_STALE, E_JOURNEY_APPROVAL_UNKNOWN | No. It runs and prints a warning: line with the same code |
| No click on a session-ending, destructive or paid control | Yes: E_RUN_REFUSED_DESTRUCTIVE. Lifted by mcpRun.allowDestructive | No |
| No write to an origin outside the run's allowlist | Yes, at the browser context: E_RUN_REFUSED_OFF_ALLOWLIST_WRITE. Lifted by mcpRun.allowOffAllowlistWrites | No. The write is sent and listed in offAllowlistWrites |
No replay on an environment, or write to an origin, flagged production: true | Yes: E_RUN_REFUSED_PRODUCTION. Lifted by mcpRun.allowProduction | No |
| Site policy (pacing, budgets, quiet hours) | Yes | Yes, when a policy is set |
- 0.29.0: an MCP run that a guard stops ends
outcome: refusedwith exit code2. It is not a failed step, is never healed or retried, and names the setting that lifts it. Iftargets.jsonorenvironments.jsoncannot be read, an MCP run refuses withE_RUN_GUARD_CONFIGrather than run unguarded. ThemcpRunsettings live in a target's entry in~/.jevitate/targets.jsonand no MCP tool takes them as arguments. - MCP promotion refusals:
run_journeyandchain_journeysrefuse an unpromoted or stale Journey, andpromote_journeyis refused when the Journey's assertions can't prove its outcome (only the CLI's--accept-weakwaives that). - A CLI run has none of these refusals. The person at the terminal is the guard.
- Nothing asks for approval before a write yet:
queue_actionwrites an inbox item and no run waits for its answer. - An agent can loosen limits that are not in
targets.json: it can set the site policy, promote a mission target and promote a Journey over MCP, recorded as an agent's approval. - A
baseUrlan agent passes can name an origin the configuration doesn't know, and it joins the run's write allowlist without itsproductionflag,safety.denyormcpRun. An authoredallowedOriginsalso widens the allowlist after promotion. - A Journey's approval is a plain hash of its content, with no signature. The MCP and CLI rules are separate.
Hard floors
- Secrets & PII are redacted before any Jev or LLM call. The generative model never picks a real recipient for a real send.
- Prompt-injection guard is always on — page text is untrusted data, never instructions.
- Every autonomous run is bounded by action and decision ceilings, time budgets and a no-progress detector; a page that stops answering is closed by a 60 s watchdog. Never unbounded.
- Secrets are masked in pixels in every video and screenshot, by a display-only layer that never changes the page, including secrets the app reveals mid-run (elements marked
data-jevitate-maskor similar, and credential-shaped values). A capture whose mask can't be proven is not written. Since 0.15.0 the mask uses only the browser's ownrequestAnimationFrame,MutationObserver,getBoundingClientRectandRange.getClientRects, captured before any page script, so a page that replaces them (a polyfill, an animation library, test hooks) cannot make a frame show a secret. If one was already replaced before the mask loaded, it fails closed: the viewport is painted over and screenshots and capture sessions are refused withE_PIXEL_MASK(reasonuntrusted-primitive). - API keys are checked, never shown. A key is verified with its provider by a non-billable auth call; its value is never echoed, logged or sent to a model, and key entry is never offered over MCP.
- Every executed step is recorded and auditable — even a full-autonomous run is replayable and reviewable after the fact.
- Pacing is realism and politeness, never detection-evasion.
The secret invariant
A secret has exactly one permitted path:
external password manager (fetched on demand)
→ the browser input
→ the target site's own auth call It is never placed in a model prompt, never persisted in a Journey, recording, or log, and never in any outbound request except the target's own auth call. It is origin-bound — a secret can never be typed into a different origin or an injected/redirected field. Nothing is stored at rest. Jevitate holds only a manager reference.
How the secret is supplied is configurable via SecretPolicy.secretMode:
| Mode | Behavior |
|---|---|
visible-handback | Headed browser, the human enters it, resume only on a passing postcondition. No surface turns this mode on yet, so a run that reaches a handback step is quarantined today |
vault-autofill | Fetched from an external manager on demand, origin-bound, nothing stored |
fail-closed | Stop rather than proceed without a secret |
The containment and origin-binding above are not tunable — only how the secret is supplied.
Fail-fast invariants
These are permanent, named contracts — each with an "asserts-it-refuses" test:
- No policy → throw. A missing or partial
RunPolicyraises rather than defaulting permissively. - Secret never serialized. Serializing or logging a secret throws. Only a reference may be stored.
- Origin mismatch → refuse. Before any fill, current origin must match the secret's bound origin.
- Unknown journey/param → reject. No inline steps, ever. Over MCP only promoted ids run; the CLI runs an unpromoted one with a warning.
- Resume only on postcondition. Self-heal resume requires a passing check (a handback resume would too, but handback is not turned on yet). A timeout fails closed.
- Writes never auto-heal. Write, irreversible, or real-send steps fail closed for human-approved repair.
Safety boundaries
Jevitate assumes you're testing systems you're authorized to test. Every run is restricted to
the origins you authorize, and session-ending, destructive and paid controls are refused unless
you explicitly allow them. Every write request a run fires is listed in its result
(sideEffects):
# only these origins (the --url's own origin when --allow is omitted)
jevitate explore --url http://localhost:3000/settings --allow http://localhost:3000 ...
# --allow REPLACES the start origin, so list it too. Since 0.13.0 the blocked-write hint prints
# the full list to set (start origin included), and E_UNAUTHORIZED_EXPLORE_TARGET says the start
# URL's origin must be in it. The list itself is exact: no implicit origins once --allow is given.
# sign-out, delete/revoke/rotate and paid controls are refused by default;
# add your own, or lift the default deliberately
jevitate explore ... --deny '/Archive/i' --deny 'role=button;name=Send invite'
jevitate explore ... --allow-destructive - Every refusal names its rule (0.8.0). A refused step's reason ends with the rule it
matched, for example
[rule builtin:may-cost-money, matched "Generate"], and the transcript entry carriessafety: { ruleId, pattern, control, risk, waivable }.jevitate site policy rules(--json) lists every rule and whether it can be waived. -
--allow-control <regex>(0.8.0). Exempts a control whose accessible name matches from the soft built-in "may cost money" heuristic only, for that run (--allow-control "^Generate Your First Key$"). It never lifts--deny,--paid, destructive, sign-out, read-only or origin rules, and never applies to native dialogs. An invalid, empty or match-everything regex is refused before any browser opens. Every click it permits is recorded in the result'ssafetyOverrides. It is available on explore, explore-author-journey, campaign run, sweep targets, suite items and MCP (allowControl). - Find-out goals are read-only. A goal with no
--successrefuses controls that start a write flow and blocks the app's own write requests, unless the goal asks for a change or you pass--allow-writes(--allow-write <glob>exempts one path). A goal with no--successthat asks for a change still never performs a destructive write without--allow-writesor--allow-destructive: the control is refused and its destructive request blocked. - Security resets are destructive. "Reset authenticator", "Disable two-factor",
"Turn off 2FA", "Reset password", "Unlink security key", "End all sessions" and similar controls
are refused without
--allow-destructive(or a goal that asks for that action), like "Delete" and "Revoke". A bare "Reset" or "Reset filters" is unaffected. - Dialogs are dismissed by default and logged. A native
window.confirmorpromptan action raises is recorded on the step.--dialogs acceptconfirms it, but a dialog that names a destructive, session-ending or paid action the run may not take, or matches--deny, is still dismissed. - The usability guard probe is opt-in and fail-safe.
--probe-guardsclicks destructive controls only to see whether they ask first: it aborts every write and destructive-looking request, refuses pages with a WebSocket, EventSource or service worker, and never answers a dialog. Point it at staging. - Extensions widen nothing else.
--extensionallows only the loaded extensions'chrome-extension://<id>origins; other extension origins stay refused. - Resource governance only touches its own. Orphan cleanup signals only browsers jevitate launched (found by an owner marker), never another process.
- Hang replays never re-send a paid or destructive write. Such a hang is
reported
inconclusiveunless you pass--hang-replay-writes.--paid <pattern>declares your app's own paid controls. - Environments bound Journey runs. With
--env, the run's allowlist is the environment'sbaseUrlplusallow; a step on another origin is refused before a browser opens..jevitate/environments.jsonmay not hold a secret or a session. -
demonever runs on production. It needs a named environment and refuses one flagged"production": true, when drafting and again ondemo approve. - MCP can't widen any of this. Raw browser tools are forbidden, missions only
target promoted targets, every path argument must resolve inside the project or
~/.jevitate/, and operator-only settings (shell hooks, the browser binary, which environment variable a secret comes from, log sources) are never MCP arguments. Approving or cancelling an inbox item is human-only.
--fixtures or --before/--after hooks, which also run around
every replay.
measured or modeled and never silently downgraded.