🧪 Focused security review — 047
This review covers the concrete ContainerDesk implementation at prompt 047. It is a bounded code/native regression review, not a penetration-test certification or a claim that the remote Docker account is sandboxed. App read-only mode controls app workflows; it does not reduce privileges already held by the user’s SSH/Docker account. A local attacker able to replace the app, trusted SSH configuration or its process environment is outside this boundary.
Finding and repair
S047-1: the main WebView could navigate to external UI content. Production CSP constrained subresources but no native top-level navigation handler existed. On the unchanged 046 release binary, the actual main window loaded an owned 127.0.0.1 HTTP page; 047-native/baseline.json records the request. No production server or external website was contacted. No remote IPC privilege escalation was demonstrated: capabilities already had no remote URL grant. The defect nevertheless allowed unexpected/phishing UI to replace the app.
The main window is now constructed explicitly from its unchanged window configuration after backend initialization. A native handler admits only the bundled tauri://localhost document (empty/root/index.html path, optional hash route), without credentials, ports or query parameters. Debug builds additionally admit only the pinned http://127.0.0.1:1420 development origin and same document paths. Popups/new windows and WebView downloads are denied. External protocols, file/data/blob URLs, lookalike hosts, user-info, other paths and production development-server URLs are rejected. form-action 'none', frame-src 'none' and base-uri 'none' supplement the native fence. Tauri’s capability selection is explicitly main, so merely adding another capability file cannot silently enable it.
Regression: Rust malicious-URL cases and tests/lab/security.py on the actual production binary at 047. From 050, ordinary production rejects automation; scripted window checks use the explicit automation build, with a separate actual production refusal check. The harness first launches the standalone binary without automation/inspector environment and inspects listening TCP socket inodes owned by its process tree. It then uses external tauri-driver/WebKitWebDriver to attempt navigation/popups/forms/frames against a separate owned loopback server, file/data paths, inline script, malformed IPC and ungranted plugins. The app must keep its local route; the probe server must receive zero requests. The harness has a deliberate --baseline reproduction mode for the older binary, not an application feature.
The first guard implementation omitted Tauri’s canonical no-slash tauri://localhost form and blocked startup; the URL test and guard were corrected before acceptance. A Rust test’s invalid Result convenience method was corrected after the compiler rejected it. Neither failed attempt is counted as successful verification.
Trust boundary audit
| Boundary | Reviewed implementation and outcome | Regression evidence |
|---|---|---|
| Renderer IPC | Rust serde enums, deny-unknown-fields request types, typed IDs/bounds and full selection/session/daemon scope; frontend checks are supplementary | Contract/command/policy tests, native malformed alias/session/config requests and denied fake-scope access |
| Local process creation | Diagnostics/structured runner launch a validated absolute native SSH executable with argument arrays; PTY uses CommandBuilder separately. No generic shell/process plugin permission |
Runner cancellation/limits tests; native generic shell/fs/window IPC denials |
| Remote command construction | ssh/quoting.rs single-quotes every argument, rejects NUL/oversize; registry validates operation meaning and separators; Compose uses checked exact directory/ordered files |
Hostile $(), backticks, quotes, newline and option-like inert shell tests; 046 real quoted Compose paths/config drift |
| SSH config and alias trust | Bounded discovery does not execute config. Only selected aliases resolve via ssh -G; Match exec/ProxyCommand are explicitly trusted executable configuration. Aliases reject options, whitespace/control chars and shell punctuation |
Discovery/resolver native/unit tests plus six malformed native IPC aliases |
| SSH host verification | Private first-match policy overlay applies strict verification, no password/agent forwarding/known-host mutation to destination and native ProxyJump; same selected config/alias remains authoritative | ssh/auth.rs, runner.rs, authentication matrix evidence 018/042 and strict both-hop oracle 046 |
| App-owned sockets/processes | Private 0700 runtime root/random directories, 0600 lease/config, flock, ownership/type/inode checks; recovery preserves live/foreign resources; bounded output/admission/cancellation and shutdown | Runtime/runner tests; observed log/PTY/control-master/ProxyJump cleanup 041/045/046 |
| Read-only and confirmations | New/recovered sessions read-only; explicit current-workspace management grant; random short-lived exact one-use intent, consumed before dispatch, scope/access rechecked after admission; unknown outcomes never replay | Tests for expiry/replay/wrong host/target/timeouts, changed daemon/session, revocation; 038/046 native disposable writes/oracles |
| Terminal | Separate grant and exact intent, fixed shell choices and non-root user, current scope/owner/sequence, bounded input/output and PTY ownership; OSC clipboard/title/link actions disabled | 039–040/046 real PTY plus 047 hostile-output/input browser and Rust regressions |
| Untrusted text/secrets | React text rendering; no renderer innerHTML, eval or arbitrary URL-opening sink found. Inspect projects/masks environment/sensitive labels before default IPC. Support report builds a new allowlist object; never serializes raw source DTOs |
Seeded inspect/support tests, hostile logs/labels browser tests, actual native hostile host name and seeded support preview |
| Filesystem/export | No generic filesystem capability. Narrow settings/history/runtime owners; native chooser selects explicit export destination; frozen bounded support preview, private atomic write and one-use consumption | Storage/export/preview tests; actual GTK Save/Cancel/private-file evidence 043; native ungranted fs command denial |
| Navigation/protocols | S047-1 fixed. No custom public protocol/deep-link handler, remote capability origin, localhost plugin or application TCP server registered. assetProtocol is disabled by default and no fs scope is granted |
Native guarded navigation, standalone socket ownership check, code/manifest audit |
CSP permits bundled scripts only, with no script unsafe-inline or unsafe-eval, and IPC-only connections. The explicit style-element inline allowance introduced in 046 is needed by the pinned xterm DOM renderer; it does not allow scripts or arbitrary network origins. Inline CSS injection would still be a rendering risk, so remote text is never interpreted as HTML/CSS. Existing native 046 checks verify terminal style application and blocked inline script. At 047, Tauri’s own opt-in WebKit automation used TAURI_WEBVIEW_AUTOMATION=true. Prompt 050 additionally gates that activation behind the nondefault native-automation build feature; ordinary binaries remove it before initialization. See native testing. No app-specific testing command or unauthenticated HTTP control service was added. Normal-launch socket checks are distinct from test-driver endpoints. See Tauri capabilities and CSP guidance; pinned local Tauri/Wry source was inspected for the actual navigation/automation APIs.
Dependency findings and limits
The 2026-09-29 npm audit --json reported zero advisories. Cargo Audit 0.22.2 against RustSec database commit f23b768236fe2880e4cfa167da662cad8ca79240 reported zero entries in its vulnerability category and two informational warnings, retained in dependency-audit.json:
glib 0.18.5, RUSTSEC-2024-0429: unsound string-variant iterator; fixed upstream in glib ≥0.20. The pinned Tauri GTK3 dependency graph requires 0.18. Source searches found noVariantStrIter/array_iter_strcall in application, Tauri, Wry, Tao, Muda, GTK/GDK/GIO, WebKit or dialog source; matches were GLib’s implementation/docs/tests. This is evidence about observed call sites, not a proof of universal unreachability. Retain as an upstream native-dependency risk; do not call the tree advisory-free. A compatible framework update or reviewed backport must be reassessed before adding that API or changing native dependencies.proc-macro-error 1.0.4, RUSTSEC-2024-0370: unmaintained transitive build-time GTK/GLib macro dependency. No patched version is listed. No dependency or architecture replacement was made solely to suppress the warning.
The repository’s existing Dependabot alert could not be read with the supplied token (HTTP 403). No account scope was expanded and no remote alert was dismissed. Local audits provide their own dated results; they are not a claim about the inaccessible alert’s identity/state. No audit ignore rule was added.
Verification and downstream gates
047 evidence records exact commands, counts, final native result and binary digest. The native results distinguish the vulnerable baseline from the fixed run. Default support preview/export contents omit seeded identity/config/error/environment/terminal secrets; intentionally user-selected raw-log exports remain explicit sensitive user actions rather than default diagnostics.
This historical security increment did not verify macOS or installed packages. Current native package/platform claims and remaining limits belong to the platform matrix; native network interruption is the selected recovery gate, while physical sleep/wake and Wayland are not claimed. The navigation hook is cross-platform code, but Linux execution alone is not macOS proof. WebKitGTK/OS security updates are runtime platform responsibilities. Review dependency warnings again at release freeze and after any native-framework upgrade. No production host or irreversible server action was used in this review.