Safety
AssistX reads your mail, knows where you are and can act for you. A small slip can leak a life. So safety comes first in every change.
The full rules live in Safety rules. Why they exist is in Threat model. This page is the short list to keep in your head.
The rules
- Safety lives in code. A prompt may remind the model. Only the core can stop it.
- Outside content is data, never orders. Mail, web pages, files and tool output stay wrapped in
<outside>. - Risky acts ask first. A tool that sends, spends, deletes or shares gets the right tag, at least
ask. - A yes is bound to the real call. The approval card is built from the call, not from the model's words.
- Secrets never reach the model, logs or reports. Pass text through
util::scrubbefore you store it. - Every route has a token and a scope. Only
/v1/healthis open. Check the guard insrc/api.rs. - Outbound calls are fenced. Use
src/proxy.rs, or one fixed host per service. Local services must be loopback. - Each account is its own world. Never read or write another account's data. Test it.
- SQL uses bound params. Never build SQL with
format!. - No
unwrapon input. Bad input gets a clear error, not a crash.
In the app
- The page holds the token. No
innerHTMLwith data, noeval, no outside scripts, no iframes. - Bridge methods check every argument.
- Tokens live in
Vault(the Android Keystore). - No images from model text. No
localStoragefor the token.
Before you say done
Run the 10-line checklist in Safety rules. Each kind of change needs its own test: see Every change ships with a test.
When you are not sure
Stop and ask. A missed feature can wait. A leak cannot be undone.
Found a hole? Use Reporting a problem, not a public issue.