Overview
Genie Helper handles sensitive platform credentials and user data with multiple layers of security, including server-side AES-256-GCM encryption, secure session management, and strict environment variable handling.Credential Encryption
All platform credentials (OnlyFans, Fansly, etc.) are encrypted server-side before storage in Directus.Encryption Method: AES-256-GCM
- Algorithm: AES-256-GCM (Galois/Counter Mode)
- Key size: 256 bits (32 bytes)
- Authentication: Built-in AEAD (Authenticated Encryption with Associated Data)
- Implementation:
server/utils/credentialsCrypto.js
Encryption Format
v1: Version identifier for format migrationiv: Initialization vector (hex encoded)tag: Authentication tag (hex encoded)ciphertext: Encrypted credential data (hex encoded)
Encryption Functions
Legacy Format Support
decryptJSON() handles both:
- New format:
{ enc: "v1:iv:tag:ciphertext" }(object) - Legacy format:
"v1:iv:tag:ciphertext"(raw string)
Environment Variables
Required Security Variables
Generate Encryption Key
CREDENTIALS_ENC_KEY_B64 in your environment.
Security Architecture
No Client-Side Encryption
All encryption happens server-side. Encryption keys never touch the browser.
- Browser environments are fundamentally insecure for key storage
- JavaScript can be inspected and manipulated
- Server-side encryption ensures key material stays protected
Credential Storage Flow
Browser Cookie Security
The browser extension captures platform cookies, but these are encrypted before storage:- Extension captures cookies: From authenticated browser session
- Sent to server: Via HTTPS POST to
/api/credentials/cookies - Server encrypts: Using
encryptJSON(cookiesArray) - Stored encrypted: In
platform_sessions.encrypted_cookies - Decrypted only for Stagehand: When browser automation needs them
Password Policies
Recommended Production Policy
- Minimum 8 characters
- At least one digit
- At least one lowercase letter
- At least one uppercase letter
- At least one special character
- No whitespace
Session Management
JWT Token Security
- Storage:
localStoragefor normal sessions,sessionStoragefor impersonation - Auto-refresh: Tokens refreshed before expiration
- Logout cleanup: Tokens cleared on explicit logout
- Impersonation isolation: Separate storage prevents token collision
Session Endpoints
iframe Security (Production)
AnythingLLM iframe
geniehelper.com/admin.
Directus iframe
Security Best Practices
Before Production Launch
Change default passwords
Update credentials for [email protected] and [email protected]
Configure iframe origins
Set
IFRAME_PARENT_ORIGIN and CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_ANCESTORSOngoing Security
- Audit logs: Review
agent_auditscollection for suspicious activity - Session monitoring: Track unusual login patterns
- Credential rotation: Encourage users to rotate platform credentials regularly
- Update dependencies: Address Dependabot vulnerabilities (108 currently open)
- HTTPS only: Never run production over HTTP
- Rate limiting: Implement on authentication endpoints
CSAM Risk Mitigation
Why Video is Blocked on Free Tier
- CSAM liability: Free tiers attract bad actors
- Bandwidth cost: Video processing is expensive
- Storage overhead: Video files consume significant disk space
- Processing cost: FFmpeg operations are CPU-intensive
Video Access Control
Vulnerability Management
Current status: 108 Dependabot vulnerabilities (3 critical, 59 high)
Address Before Production
- Critical: Immediate fix required
- High: Fix before launch
- Medium/Low: Address during hardening phase
Related Files
- Encryption:
server/utils/credentialsCrypto.js - Credentials API:
server/endpoints/api/credentials.js - RBAC sync:
server/endpoints/api/rbacSync.js - Session management:
server/endpoints/api/impersonate.js - Frontend crypto:
dashboard/src/utils/crypto.js(deprecated, server-side only now)
Security Contacts
For security issues:- DO NOT open public GitHub issues
- Contact server administrator directly
- Include: severity, reproduction steps, potential impact
