# Security notes ## OAuth token handling The orchestrator uses Gradio + Hugging Face OAuth. The OAuth token is used in two places: 1. `token=token` when launching/managing the Job. 2. `secrets={"HF_TOKEN": token}` so the Job can act on behalf of the user. Workers must never print or persist the token. ## Scope notes The Space metadata requests: - `read-repos` - `write-repos` - `manage-repos` - `gated-repos` - `inference-api` - `jobs` `jobs` is required for launching HF Jobs. `manage-repos` is currently used for private Space creation. A later hardening pass should test whether a narrower scope can replace it. ## Private by default - Bucket remains private. - Target Spaces are created private. - Existing target Spaces are not overwritten. - Publishing must be added later as an explicit user action only. ## Trace privacy Future Pi traces must be stored as raw/private first. A redacted copy may be generated later, but public sharing should require explicit user confirmation. ## Current limitations The redaction helper is a basic first-pass scanner. It is not a full data-loss prevention system.