Security Policy - TerminaLLM

Overview

TerminaLLM is a mobile SSH terminal client designed with security as a core principle. This document describes our security model, implemented protections, and guidelines for secure usage.

Security Architecture

Threat Model

TerminaLLM handles sensitive SSH credentials and provides access to remote systems. Our security design addresses:

  1. Credential Theft: Attackers gaining access to stored credentials
  2. Man-in-the-Middle (MITM): Attackers intercepting SSH connections
  3. Device Compromise: Attackers with physical or malware access to the device
  4. Brute Force: Attackers attempting to guess MFA codes
  5. Session Hijacking: Attackers attempting to take over authenticated sessions
  6. Shoulder Surfing: Visual observation of credentials or terminal content

Security Principles

  1. Credentials Not Stored by Default: SSH passwords are entered at connection time and cleared from memory immediately after use. Users may opt in to the Credential Vault, which encrypts credentials locally using AES-256-GCM with HKDF-Expand key derivation and per-credential random nonces, with configurable TTL expiry
  2. Defense in Depth: Multiple layers of security (MFA, biometrics, encryption)
  3. Minimal Privilege: App requests only necessary permissions
  4. Fail Secure: On errors, default to denying access
  5. Transparent Security: Users informed of security events via audit logs

Implemented Security Controls

Authentication

Credential Protection

Connection Security

Device Security

Port Forwarding Security

Jump Host Security

Media Drop Security

Speech-to-Text Security

AI Chatbot Security

iOS Live Activities Security

Audit & Monitoring

Cryptographic Standards

Security Event Types

The following events are logged to the audit trail:

appLaunch - Application started appResumed - Application resumed from background authSuccess - Successful authentication authFailed - Failed authentication attempt biometricReauthSuccess - Biometric re-authentication succeeded biometricReauthFailed - Biometric re-authentication failed termsAccepted - User accepted terms of service connectionAttempt - SSH connection initiated connectionSuccess - SSH connection established connectionFailed - SSH connection failed hostKeyVerified - New host key accepted hostKeyRejected - Host key rejected by user hostKeyChanged - Changed host key detected (potential MITM) hostKeyMismatchAutoReconnect - Host key mismatch during auto-reconnect rateLimitTriggered - Rate limiting activated lockoutTriggered - Account locked out sessionTimeout - Session expired due to inactivity sessionResume - User resumed an authenticated session within grace period sessionClear - User session cleared deviceCompromisedWarning - Jailbreak/root detected profileChanged - Security profile changed vaultCredentialStored - Credential stored in vault vaultCredentialRetrieved - Credential retrieved from vault vaultCredentialExpired - Vault credential expired due to TTL vaultCredentialCleared - Individual vault credential cleared vaultAllCleared - All vault credentials cleared vaultStoreRetry - Vault store operation retried vaultTamperingDetected - Vault integrity check failed (potential tampering) mediaDropUploaded - Photo/file uploaded to remote server via Media Drop sessionResumed - User resumed a stored dtach session inputWaitDetected - AI assistant detected waiting for user input tunnelCreated - Port forwarding tunnel started tunnelStopped - Port forwarding tunnel stopped tunnelError - Port forwarding tunnel failed (bind error, SSH error) jumpHostConnected - Successfully connected through a jump host jumpHostFailed - Jump host connection failed backupCreated - Encrypted backup file created backupRestored - Backup file restored sftpFileDownloaded - File downloaded via SFTP sftpFileUploaded - File uploaded via SFTP sftpFileDeleted - File deleted via SFTP sftpDirectoryCreated - Directory created via SFTP sftpDirectoryDeleted - Directory deleted via SFTP sftpFileRenamed - File renamed via SFTP sftpFileCreated - File created via SFTP developerPatStored - Developer personal access token stored developerPatCleared - Developer personal access token cleared

Secure Usage Guidelines

For Users

  1. Verify Host Keys: Always verify SSH fingerprints match expected values
  2. Secure Your Device: Use device passcode, keep OS updated
  3. Protect MFA Secret: Don't screenshot or share your TOTP QR code
  4. Review Audit Logs: Periodically check for unauthorized access attempts
  5. Avoid Public Networks: Use VPN when on untrusted networks
  6. Report Issues: Contact us immediately if you suspect compromise

For Enterprise Deployment

  1. MDM Integration: Deploy via Mobile Device Management
  2. Compliance Review: Consult compliance team for regulated environments
  3. Network Security: Ensure SSH traffic is monitored/logged at network level
  4. User Training: Educate users on security features and best practices
  5. Incident Response: Include app in security incident procedures

Known Limitations

  1. No End-to-End Encryption Verification: App trusts SSH cipher negotiation
  2. Device Trust: Security depends on device integrity
  3. No Remote Wipe: No capability to remotely disable compromised instances
  4. Single User: No multi-user or role-based access control
  5. Local Audit Only: Audit logs stored locally only
  6. Dart GC Memory Limitation: Dart's garbage collector may retain copies of credential data in heap memory even after explicit zeroing. Platform-level device encryption and sandboxing mitigates this risk

Vulnerability Disclosure

Reporting Security Issues

If you discover a security vulnerability, DO NOT create a public GitHub issue.

Instead, email us with:

security@terminallm.app Send Email

Response Timeline

Recognition

We appreciate responsible disclosure and will:

Security Certifications

Currently, TerminaLLM has not undergone formal security certification (SOC 2, ISO 27001, etc.). The security controls documented here represent our best-effort implementation.

For regulated environments (HIPAA, PCI-DSS, FedRAMP), please conduct your own security assessment before deployment.

Updates & Changelog

Security-relevant changes will be documented in:

Contact

Security Issues:

security@terminallm.app

General Questions:

support@terminallm.app

GitHub: github.com/terminallm-issues/.github/issues

Last Security Review: March 20, 2026