-
Notifications
You must be signed in to change notification settings - Fork 0
Security Model
Dispatch handles authentication and file operations without storing or transmitting passwords, API keys, or secrets in cleartext.
Dispatch uses RFC 8628 — OAuth 2.0 Device Authorization Grant, the same flow used by the GitHub CLI and AWS CLI.
- Dispatch requests a short-lived device code from Telex.
- The user opens a URL and enters the code — on any device, any browser.
- Dispatch polls for the resulting access token.
- Once authorized, the token is encrypted and stored locally.
There is no password field, no API key to copy, and no secret in any environment variable.
OAuth access tokens are encrypted before being written to wp_options:
- A random 12-byte initialization vector (IV) is generated for every write.
- The token is encrypted with AES-256-GCM using a key derived from
wp_salt('auth'). - The ciphertext, IV, and authentication tag are base64-encoded and stored with a
v2:prefix. - The plaintext token is never written to disk, never logged, and never appears in error output.
The encryption key is derived from your site's own secret salts and never leaves your server.
Every build file downloaded from Telex is validated before installation:
- The build manifest includes a SHA-256 checksum for each file.
- Dispatch downloads the file and recomputes the checksum.
- If checksums don't match — even by a single byte — the install is aborted and nothing is written to disk.
Before extracting any file, every path in the zip is validated:
-
ZipSlip prevention: No path may contain
..or resolve outside the target directory. - Extension blocklist: Files with dangerous extensions are blocked before extraction.
If any file fails validation, the entire install is aborted.
The auto-deploy endpoint (POST /telex/v1/deploy) is open (no capability check) but protected by:
| Protection | Detail |
|---|---|
| HMAC-SHA256 signature | Every request must include a valid X-Telex-Signature header. |
| Replay prevention | Requests older than 5 minutes (via X-Telex-Timestamp) are rejected. |
| Rate limiting | Excessive requests from the same IP are throttled. |
Every REST endpoint and admin action checks current_user_can('manage_options') before executing. Unauthenticated or unauthorized requests return 403 immediately.
Every install, update, removal, disconnect, and connection event is recorded in a custom database table with a timestamp, acting user ID, action type, project ID, and IP address. The log is registered with WordPress Privacy Tools for GDPR compliance — export or erase a user's history from Tools → Personal Data.
Please read SECURITY.md before reporting a security issue. Do not open a public GitHub issue for vulnerabilities.