- Provider keys (
ANTHROPIC_API_KEY,FLOWPILOT_OPENAI_API_KEY) exist only as environment variables ofapps/api, never in the extension (everything that is packaged is readable by the user).apps/api/.envis ignored by git;apps/api/.env.exampledocuments the variables without values. FLOWPILOT_API_TOKEN(24+ random characters,python -m flowpilot_api token) is the bearer token between the extension and the backend. The user pastes it in the Side Panel; it is stored inchrome.storage.localand sent only to the configured loopback endpoint.- Claude.ai credentials or session tokens are never read, stored or used (ADR 0004).
- Keys are never logged or sent back to the client.
- Recovery backend: loopback only by default (refuses a non-loopback host without
FLOWPILOT_ALLOW_REMOTE=1); every route except/healthzrequires the bearer token (constant-time comparison); CORS closed unlessFLOWPILOT_ALLOWED_ORIGINSis set, never with credentials; request body size limit; at most 2 concurrent recoveries;/docsand/openapi.jsondisabled. - The extension accepts only a loopback endpoint (
isLoopbackEndpoint), requests host access to it with Chrome's prompt, and calls it withcredentials: 'omit'andredirect: 'error'. - The backend has no browser privilege: it returns a proposal (a ref among observed elements) that the extension validates, may submit to the user, and executes with the recorded action.
- Internal boundaries of the extension:
- Only extension pages (
sender.urlunderchrome-extension://<id>/) can send commands to the service worker. Messages from content scripts, hence from web pages, and from other extensions are ignored. - The content script only accepts messages from its own extension and never executes received code.
chrome.storage.session(session state) is inaccessible to content scripts (default access level).
- Only extension pages (
- Site access: none by default, optional permission granted domain by domain with Chrome's native confirmation, revocable from the Side Panel.
- Never captured:
input[type=password], paymentautocompletefields (cc-*) or credential fields (current-password,new-password,one-time-code), fields whose name, id, label or placeholder suggests a password, a card, an IBAN, a verification code or a token, and any subtree markeddata-flowpilot-sensitive/data-private/data-sensitive. Filtering happens in the content script (recorder/classify.ts), before anything is sent: the value is not even read, and the step becomesmanualInput. Cookies, tokens and headers are never accessible (no corresponding permission). - The values of other fields (search text, name, e-mail…) are recorded: that is the point of replay. The elements themselves are described by their role, accessible name and stable attributes, never by their value (except checkboxes, radios and buttons, whose value is a label).
- Workflows and run history stay local (
chrome.storage.local). With AI recovery enabled, the only data sent (to the local backend) is the failed step without its value, and a bounded observation: role, accessible name, short text and context, a few safe attributes of visible non-sensitive elements (linkhrefs with query values replaced by digests), and the URL with the same masking. Text inside a subtree marked sensitive is never sent. No field value, no full-page HTML. - The backend stores verified corrections (element descriptors, no value, no ref) and recovery telemetry in a local SQLite file; both are inspectable and deletable (
GET/DELETE /v1/memory, Side Panel). - Only real gestures (
isTrusted) are captured; capture events are accepted only from the main frame of the recorded tab, then revalidated. - Page content = untrusted data: never interpreted as an instruction. Prompt injection defense does not rely on the prompt: the model can only pick an observed same-origin ref, cannot change the action or the value, and cannot skip the confirmation of an irreversible element (adversarial tests in
apps/api/tests/test_agent.pyandtests/e2e/recovery.spec.ts).
Before any publication on the Chrome Web Store:
- The shipped build does not contain
host_permissions(verified byapps/extension/src/manifest.test.tsand the e2e tests; only the tests' temporary copy adds them). - Permissions =
sidePanel,storage,scripting+ optional per-domain ones. Any other is justified. - No source map or debug
console.logindist/. - No
eval,new Functionor remote code (default MV3 CSP respected). - Privacy policy published, even if no data leaves the browser.
- Backend: loopback by default, bearer token, CORS closed by default,
/docsdisabled, body limit and concurrency cap, strict Pydantic validation (extra="forbid"). - Backend exposed beyond loopback (
FLOWPILOT_ALLOW_REMOTE): not supported for production; would need TLS, per-user tokens and rate limiting.