Skip to content

Security

Security considerations and best practices for Subtide.


Subtide is designed with security in mind. This document covers:

  • How your data is handled
  • API key security
  • Backend security
  • Browser extension security

Subtide processes:

DataPurposeStorage
Video audioTranscription via WhisperTemporary (deleted after processing)
SubtitlesTranslation via LLMCached locally (optional)
API keysAuthenticationLocal browser storage
SettingsUser preferencesLocal browser storage

Subtide does not:

  • Track your viewing history
  • Collect personal information
  • Send analytics to third parties
  • Store video content permanently
  • Share data between users
Video Audio → Backend (local) → Whisper → Transcription
LLM API (your key)
Translation
Browser (display + cache)

All data stays within your control.


Your API keys are stored in Chrome’s chrome.storage.local:

  • Encrypted by Chrome’s storage system
  • Accessible only to the Subtide extension
  • Never transmitted to Subtide servers
  1. Use separate API keys for Subtide (not your primary development key)
  2. Set usage limits in your API provider dashboard
  3. Monitor usage regularly for unexpected charges
  4. Rotate keys periodically
  5. Revoke keys immediately if compromised
TierKey LocationSecurity Level
Tier 1BrowserUser-controlled
Tier 2BrowserUser-controlled
Tier 3ServerAdmin-controlled
Tier 4ServerAdmin-controlled

For Tier 3/4, the server admin is responsible for key security.


By default, the backend runs on localhost:5001:

Terminal window
# Only accessible from local machine
./subtide-backend

This is the most secure configuration for personal use.

If exposing the backend to a network:

  1. Use HTTPS with a valid certificate
  2. Configure CORS to allow only trusted origins:
    Terminal window
    CORS_ORIGINS=https://youtube.com,https://www.youtube.com
  3. Use a reverse proxy (nginx, Traefik) with rate limiting
  4. Enable firewall rules to restrict access

For Docker deployments:

# docker-compose.yml security settings
services:
subtide:
# Don't run as root
user: "1000:1000"
# Read-only filesystem where possible
read_only: true
# Limit resources
deploy:
resources:
limits:
cpus: '2'
memory: 4G
# Don't expose unnecessary ports
ports:
- "127.0.0.1:5001:5001" # Localhost only

Secure your environment:

Terminal window
# Don't commit .env files
echo ".env" >> .gitignore
# Use secrets management in production
# Example: Docker secrets, Kubernetes secrets, Vault

Subtide requests these permissions:

PermissionPurposeRisk Level
storageSave settings and cacheLow
activeTabAccess current video pageLow
scriptingInject subtitle UIMedium
tabCaptureCapture audio for live translationMedium
offscreenAudio processingLow
host_permissionsAccess video sitesMedium

The extension enforces a strict CSP:

"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
}

This prevents:

  • Inline script execution
  • External script loading
  • Plugin-based attacks

Only necessary files are web-accessible:

"web_accessible_resources": [{
"resources": [
"src/content/network_interceptor.js",
"src/content/shorts-interceptor.js",
"src/offscreen/audio-processor.js"
],
"matches": ["<all_urls>"]
}]

ThreatProtection
API key theftLocal storage encryption
Man-in-the-middleHTTPS for API calls
XSS attacksStrict CSP
Data leakageNo external data transmission
RiskMitigation
Malicious API providersUse trusted providers only
Compromised backendRun locally or verify server
Browser extension compromiseInstall from official sources
API key exposureFollow key security best practices

  • Run backend on localhost only
  • Use your own API key
  • Keep extension updated
  • Review extension permissions
  • Deploy backend with HTTPS
  • Configure CORS restrictions
  • Use Tier 3/4 with server-side keys
  • Implement rate limiting
  • Set up monitoring
  • Regular security updates
  • All items from Team/Shared
  • Use secrets management (Vault, etc.)
  • Enable audit logging
  • Implement authentication (if needed)
  • Regular security audits
  • Incident response plan

If you discover a security vulnerability:

  1. Do not open a public GitHub issue
  2. Email security concerns to the maintainer
  3. Provide:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
    • Suggested fix (if any)

We take security seriously and will respond promptly.


When using cloud LLM providers:

ProviderData UsagePrivacy Policy
OpenAIMay use for training (opt-out available)Policy
OpenRouterVaries by modelPolicy
Local LLMNo external transmissionN/A

Recommendation: For sensitive content, use a local LLM.

Whisper transcription happens locally in the backend. Audio is:

  • Never sent to external services (unless using OpenAI API)
  • Processed in memory
  • Deleted after transcription completes

  1. Update regularly - Check for new releases
  2. Review changelogs - Note security fixes
  3. Monitor dependencies - Backend uses many libraries
  4. Follow announcements - Watch the GitHub repository
  • Security patches are prioritized
  • Critical fixes released ASAP
  • Regular updates include security improvements