InstaClip is built around the principle that the creator's raw media and transcripts stay on their own machine:
- Video files, audio proxies, transcripts, and thumbnails are stored under the local
data/directory. - The database is a local SQLite file.
- No analytics, telemetry, or crash reporter is included in this edition.
- No cloud account is required to run the core pipeline.
- The FastAPI backend binds to
127.0.0.1:8765only. It is not reachable from the LAN or the public internet by default. - The backend has no authentication layer: callers are trusted because they must already be on the same machine.
- To change the bind address you must edit the source or pass
--host; this is not recommended without adding authentication.
CORS alone does not fully protect a local API from malicious web pages. The backend therefore layers three defenses:
- CORS allowlist — only Tauri webview origins (
tauri://localhost,https://tauri.localhost,http://tauri.localhost), the Vite dev server (localhost:5173,127.0.0.1:5173), and the Tauri dev server (localhost:1420,127.0.0.1:1420) are allowed. No wildcard (*) origin. - Host allowlist — requests whose
Hostheader is not127.0.0.1,localhost, ortestserverare rejected with403. This blocks DNS-rebinding attacks that repoint a malicious hostname to127.0.0.1. - Foreign-Origin POST guard — CORS blocks reading cross-origin responses, but simple POSTs can still execute server-side. State-changing methods (
POST,PUT,PATCH,DELETE) whoseOriginheader is not in the allowlist are rejected with403.
These behaviors are verified in tests/test_local_api_guard.py and tests/test_security_hardening.py.
- No API keys, tokens, or certificates are committed to this repository.
.env.examplecontains only placeholder comments and example values..gitignoreexcludes.env,*.env.*, credential files (*credential*), certificates (*.pem,*.key,*.p12,*.pfx), and model weights (models/).- The clipper edition explicitly does not read local API keys (verified in
tests/test_security_hardening.py).
The /tester route can export a redacted support bundle. The redaction pass removes:
- Google API keys
- OpenAI / Anthropic-style keys
- Meta (Facebook/Instagram) tokens
- Discord-shaped tokens
- TikTok tokens
- Cloudflare tokens
- Cloudflare tunnel URLs
- Generic passwords
Tests in tests/test_security_hardening.py assert these patterns are removed.
A cloud LLM-judge gateway is opt-in and disabled by default:
- No requests are made unless
CLIPPER_GATEWAY_URLis explicitly configured. - When configured, the
tester_gatewaymodule routes a subset of selection/review calls to the gateway. - When not configured, the app falls back to local engines and mocked paths; it never crashes due to a missing gateway.
The private commercial edition adds authenticated cloud surfaces:
- Discord Clip Room bot and delivery integration.
- Cloud gateway with user auth, refresh tokens, and quota accounting.
- Publishing integrations with third-party platforms (Instagram, TikTok, YouTube).
- Creator OS chat and memory sync.
These surfaces require tokens, service accounts, and external infrastructure, so they are excluded from the public edition.