Fifth full codebase audit across all five modules (lib-ssh, lib-terminal-view,
lib-terminal-keyboard, lib-vault-crypto, app).
Security:
- Added cppFlags to lib-vault-crypto build — vault_crypto.cpp JNI bridge was
missing all compiler hardening flags (-fstack-protector-strong, -D_FORTIFY_SOURCE=2)
Bugs fixed:
- SessionNotifier crash: first{} → firstOrNull to prevent NoSuchElementException
- Keyboard modifiers not consumed on SwitchPage/ToggleNumBlock — armed CTRL/ALT
would persist and incorrectly modify the next key press
- KeyManagerViewModel silent exception swallow — now logs errors via FileLogger
- TelnetSession.sendTerminalType() variable shadowing fix
Dead code removed:
- Vt100Parser empty class (Vt220Parser now extends BaseTermParser directly)
- XtermParser.sendPrimaryDA() redundant override (identical to parent)
- TerminalKeyboard dead fields: menuPopupActive, menuPopupItems, miniContainer
- SpecialAction.SETTINGS_OPENED never emitted
- Deprecated 3-arg saveHostKeyFingerprint overload (no callers)
Code quality:
- Color(0xFF6E7979) → AppColors.Muted in ConnectionListScreen
- Hardcoded "v1.0.0" → BuildConfig.VERSION_NAME in SettingsScreen
- SubscriptionScreen back button contentDescription for accessibility
- TAG → companion const val in StartupCommandRunner, PortForwardManager, SftpSessionManager
- TerminalRenderer swapped KDoc comments fixed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 KiB
13 KiB
SSH Workbench — TODO
Updated: 2026-04-12 Status: Active development. Future ideas in
FUTURE.md.
Recently Completed (2026-04-12)
Full codebase audit 2026-04-12— fifth audit (all modules). Fixed: C++ compiler hardening viacppFlagsin lib-vault-crypto; removed deadVt100Parserclass and redundantXtermParser.sendPrimaryDA(); fixedSessionNotifiercrash (first→firstOrNull); fixed keyboard modifiers not consumed on SwitchPage/ToggleNumBlock; removed dead fields (menuPopupActive,menuPopupItems,miniContainer,SETTINGS_OPENED); removed deprecatedsaveHostKeyFingerprint3-arg overload; TAG → companion const val;Color(0xFF6E7979)→AppColors.Muted; version string fromBuildConfig.VERSION_NAME;SubscriptionScreenback button a11y;KeyManagerViewModelerror logging;TelnetSession.termTypeshadowing fix.Package name change— applicationId changed fromcom.roundingmobile.sshworkbenchtocom.roundingmobile.sshwb(Firebase auto-key conflict blocked Play Console registration). Namespace stayscom.roundingmobile.sshworkbench. Registered in Google Play Console.Web platform scaffolding—www/folder with Docker stack (nginx + Node.js/Express + MariaDB), landing page, login page (email/pw + OAuth), dashboard (vault + session logs). API routes for auth, vault CRUD, log management. MariaDB schema with users, vaults, logs, teams, permissions, snippets, audit_log.Vault settings export/import— optional "Include settings" checkbox (unchecked by default) in both Save Vault Locally and Export Vault. Exports 56 DataStore prefs (keyboard, display, QuickBar customization, HW actions). Import auto-restores settings.EXPORTABLE_*_KEYSlists inTerminalPrefsKeysdefine what's backed up.Jump chain pro message fix— upgrade dialog now says "Jump host chaining" instead of "Jump Host" so free users understand single jump hosts work, only chaining is pro-gatedFree vault import gate— free users can only import local vault saves (MODE_LOCAL), not pro-exported vaults (MODE_PASSWORD/MODE_QR). Clear error message in 5 locales.Settings from terminal view— "Settings" item in tab bar + drawer bar kebab menus opens full SettingsScreen. Drawer content panel gets Settings row + compact about footer (app icon + version + developer).Scrollback truncation dialog— when user lowers scrollback value with active SSH/Telnet/Local sessions, confirmation dialog warns about history loss.ScreenBuffer.truncateHistory()trims oldest lines and clamps scroll offset.
Recently Completed (2026-04-11)
Security audit 2026-04-11— fourth full security audit (prod scope only). Fixed: FileLogger redacts PEM/Bearer; telnet cleartext warning card in EditConnectionScreen;migrateFromProApk()made internal + idempotent; host key fingerprints stored with<keyType>:<fingerprint>prefix (backward-compatible); URL scheme allowlist inMainActivity.onUrlTapped. Deferred: password String→CharArray refactor (HIGH, multi-file API change); purchase signature verification (already in TODO, needs Play Console RSA key); clipboard auto-clear timer (HIGH, needs UX). Full report inSecurityAudit.md.Hardware Key Actions— Settings → Terminal → Hardware Key Actions: full-screen ActionsScreen mapping Volume Up/Down + Shake to terminal actions (close session, font up/down, next/prev session, scroll up/down, custom key sequence). Single + double press support with configurable 200-500ms delay. Collapsible accordion cards.HardwareActionHandler.ktextracted from MainActivity.SessionEntry.onFontSizeRequest/onScrollRequestcallback pattern.AppColors centralized palette— single source of truth inui/theme/Theme.kt, all 15 screen files migrated from hardcodedColor(0xFFxxxxxx)toAppColors.XreferencesSettings TopAppBar terminal style— all 13 TopAppBars across the app use the same dark terminal style (containerColor #10141A, teal Space Grotesk uppercase title, divider line)Settings restyle— section headers in teal Space Grotesk uppercase letter-spaced 13sp, About section with cropped pro launcher icon + centered branding, value vs description font distinction (mono for values, bodySmall for hints), Language moved from General to Display sectionLanguage Selection screen—LanguageScreen.ktfull-screen with flag emojis, accent bar on selected, locale code in mono, fixed info card. EN/ES/FR/DE/SV translations (~590 strings each). Spanish marked as "Español (España)"Time format setting— Display → Time Format: Device default / 12-hour / 24-hour.resolveIs24h()helper in TimeFormatUtils, threaded through ConnectionListScreen → ConnectionItemCardProtocol-aware accent colors— connection cards use type-specific colors: green (SSH), amber (SFTP-only), violet (Telnet), sky blue (Local) for accent bar, dot, border, timerLocal shell proper session IDs—startLocalShellnow uses generated sessionId + savedConnectionId (was hardcoded 0L). Survives back-button, shows active on connection cards, supports multiple local shellsLocal shell startup commands— startup command execution +lastOutputTimeNstracking added to local shell (was missing, caused 10s timeout)SFTP updates lastConnected— opening SFTP tab now updates lastConnected so connection sorts to topSFTP option SSH-only— "New SFTP Session" hidden for telnet and local connectionsQuick connect bar colors—$icon, placeholder text, trailing icon now use #7A8888 (matching lock/key icon color)#3E4949 purged— replaced all uses with #7A8888, too dark on terminal palettePulse animation tuned— green dot breathes 100%→60% over 2s (was 100%→30% over 1.2s)Connection list terminal redesign— Space Grotesk font, dark terminal palette (#10141A/#181C22), accent bars via drawWithContent, session badges (pill-style), no circle avatars, outline FAB, "$" quick-connect prefix, SSH_WORKBENCH branded title barAuth cancel stops retries— pressing Cancel on password dialog immediately stops auth (no more 3x retry loop), session closes cleanlySFTP back button cd .. removed— system back no longer navigates up folders in SFTP browser, uses breadcrumb/".." entry instead
Recently Completed (2026-04-05 — 2026-04-06)
Subscription model migration— replaced free/pro build flavors with single APK + Google Play Billing (monthly/yearly/lifetime)Dev/prod flavor split— dev flavor has ADB receiver + test infrastructure, prod has empty no-opsDev .dev applicationId suffix— dev and prod can coexist on same device; yellow dev iconDev all-pro features— dev ProFeaturesModule provides all features unlocked via flavor source set (no runtime checks)FLAG_SECURE settings— three granular options (Full App / Vault / Terminal) under Security, biometric-gatedKeys & Vault screen— new nav screen combining SSH Keys, Save Vault Locally, Export/Import VaultLocal vault save— device-bound encrypted backup (mode 0x03), password-only, device fingerprint verified on importConnection list toolbar— kebab menu replaced with direct Settings gear iconsingleTask launch mode— fixes Home→icon returning to connection list instead of terminalQR scanner orientation— locked to portrait via setOrientationLocked(true)Vault import password bug— deserializeHosts set id=0, breaking credential/key/jumpHost re-linkingDB reset to v1— new package, no existing users, removed all 10 migrationsIcon consolidation— removed Android robot foreground, using real W foreground PNG, teal/gold adaptive iconsActive session timer— live timer on connection cards no longer gated behind sessionTracking (pro); always visibleLog icons dev-only— copy/clear log buttons hidden in prod via DevConfig.DEV_DEFAULTSDeploy script cleanup— deployDuero.sh cleans all ssh-workbench*.apk, CopyApks filters stale APKs by mtimeKey import validation— SSHKeyLoader validates imported keys, extracts real pubkey/fingerprint, ZIP support (zip4j)Settings card layout— Material 3 grouped cards, 7 sections, muted headers20 color themes— added Ayu Dark, Catppuccin Mocha, Everforest Dark, Kanagawa, Material Dark, Nightfox, One Dark, Palenight, Rosé Pine, Tokyo Night + Nord Warm, Solarized Soft variants10 terminal fonts— bundled JetBrains Mono, Fira Mono, Source Code Pro, Hack, Inconsolata, Cascadia Mono, PT Mono, Ubuntu Mono, DejaVu Sans Mono + System MonoCombined theme picker— ThemePickerSheet with color scheme combo, font combo, font size slider, live previewCursor speed— Slow/Normal/Fast/Rapid with acceleration (2x at 5 repeats, 4x at 15)Cursor blink— 530ms blink with 15s idle auto-stop, resumes on input/outputTerminal type per connection— TERM env var (xterm-256color/xterm/vt220/vt100/linux) in Edit Connection, DB v2Keep screen on wired— FLAG_KEEP_SCREEN_ON applied from preference (default OFF)Vault import in-place— VaultImportSheet hosted in KeysVaultScreen, no popBackStackClickable radio/checkbox rows— VaultExportSheet, VaultImportSheet rows tappable on textconfigChanges— orientation|screenSize|smallestScreenSize|screenLayout prevents activity recreation on rotationTheme picker default label— EditConnection + tab bar dialogs now show actual global theme inDefault (…)label; tab bar dialog uses all 20 themes with scrollable Default optionDrawer back button— Back in terminal pane closes drawer first if drawer is openMini numpad 15% width—widthPercent10 → 15 in all threelayout_qwerty*.jsonVP2 rotation phantom fix—KeyboardView.onSizeChangedrebuilds VP2 on any width transition including initial 0→actual layout;lastModifierStatescached for re-apply (Google Issue 175796502 workaround)Number row dropdown in portrait—KeyboardSettingsDialognow shows all 4 options (top/left/right/hidden) regardless of orientationNumBlok toggle on mini numpad—KeyDefinition.numLabel/numActionfields,KeyAction.ToggleNumBlock; mini last row hasNum 0 \which becomes PC-keypad nav when toggledHardware keyboard auto-hide—Configuration.keyboarddetection; CKB + QB hidden by default when BT/USB keyboard connects; kebab Show/Hide toggles both as a pair in HW kb modeAudit 2026-04-06—KeyboardPageViewsmart-cast!!removal,SSHKeyLoaderEd25519 seed length require,vault_crypto.cppplaintextsecure_zerobeforeReleaseByteArrayElementsinnativeEncryptServer-driven auth— removed pre-connect password dialog; auth prompts only after TCP+KEX+host key;AuthPromptResult(responses, remember)in lib-ssh API; prompted-password fallback for servers that reject keyboard-interactive; 3-attempt retry (matching OpenSSHNumberOfPasswordPrompts); "Remember password" saves only on successful connect viapendingRememberPasswordLegacy test lab documentation—docs/LEGACY_TEST_LAB.md(2165 lines): 56-system matrix, Dockerfiles, compose.yml, SIMH configs, systemd units, scripts,LAB_ROOTconfigurability, self-extracting doc
Open
- Configure subscription products in Google Play Console (ssh_workbench_monthly, ssh_workbench_yearly, ssh_workbench_lifetime)
- Test billing flow with Play Console test accounts
- Update TECHNICAL.md with billing architecture details
- Implement purchase signature verification (needs Play Console RSA key) — HIGH security finding from audit 2026-04-11
- Refactor SSHAuth.Password from String to CharArray — HIGH security finding from audit 2026-04-11, multi-file API change crossing lib-ssh and app
- Add clipboard auto-clear timer for sensitive copies — HIGH security finding from audit 2026-04-11, needs UX decisions
- Implement session logging — per-session toggle (tab 3-dot menu), global default OFF, ANSI-stripped text to ZIP, SAF folder picker, organized by connection alias. Solves tmux/screen buffer limitation. Design agreed 2026-04-12, see
project_session_logging_design.md. - Register dev app in Firebase Console for analytics/crashlytics on dev builds
- Create new Firebase project for
com.roundingmobile.sshwb(oldssh-workbenchproject deleted, 30-day wait). Add SHA-1 and SHA-256 fingerprints. Download new google-services.json. - Create Google Cloud project for web OAuth (Google + GitHub). Configure OAuth consent screen + credentials for sshworkbench.app.
- Wire up OAuth callback routes in Node.js API (Google + GitHub passport flow)
- Set up Docker on duero for full web stack deployment
- Web: documentation section with search (convert existing docs to web pages)
- Web: Stripe integration for Pro tier billing
- Web: team management UI (roles: Owner/Admin/Member/Viewer)
- Update CLAUDE.md and docs with new package name
com.roundingmobile.sshwb