Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: damoahdominic/occ
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: damoahdominic/occ
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: multihost
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 11 commits
  • 20 files changed
  • 3 contributors

Commits on Mar 27, 2026

  1. fix(ssh): verify install script integrity before execution

    Replace the unsafe `curl | bash` pattern with a 4-step verified
    install: download script to temp file, fetch SHA-256 checksum from
    a separate domain (releases.openclaw.sh), verify with sha256sum,
    then execute only if the hash matches. Temp files are cleaned up on
    both success and failure paths.
    
    Protects against MITM attacks, DNS hijacking, and CDN compromise —
    an attacker must now compromise two independent origins simultaneously.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 27, 2026
    Configuration menu
    Copy the full SHA
    2e41e5a View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2026

  1. docs: fix contributor images to show all contributors

    Added quotes to HTML attributes and anon=1 param to include all contributors.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    29a14ef View commit details
    Browse the repository at this point in the history
  2. security: move host connection configs to SecretStorage and add adapt…

    …er trust
    
    Mitigates malicious extension attack vector where any VS Code extension
    could read ~/.occ/hosts.json to exfiltrate SSH connection details (host,
    user, keyPath). Three hardening measures:
    
    1. Connection configs now stored in VS Code SecretStorage (OS keychain),
       with automatic migration from plaintext. hosts.json retains only a
       type stub for adapter routing.
    
    2. hosts.json written with 0600 permissions (owner-only).
    
    3. registerHostAdapter() now requires extension ID, validates against
       trusted allowlist, and prompts user approval for unknown adapters.
       All registrations logged to output channel.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    61d92fd View commit details
    Browse the repository at this point in the history
  3. security: verify integrity of all install paths, eliminate curl-pipe-…

    …bash
    
    Closes remaining supply chain gaps identified in security review:
    
    1. Post-Node.js-install fallback now uses SHA-512 verified tarball
       instead of bare `npm install -g openclaw`.
    
    2. Local installer scripts (Unix/Windows) no longer pipe remote
       scripts directly into shell. Scripts are downloaded to temp files,
       SHA-256 checksums fetched and verified before execution.
    
    3. Removed `npm install -g openclaw@latest` fallback from update
       prompt — only suggests `openclaw update` now.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    31cce1b View commit details
    Browse the repository at this point in the history
  4. security: detect exposed gateway and harden health checks

    Mitigates gateway exposure attack (port 18789 reachable on LAN):
    
    1. Add bind-address safety check — when gateway is running on a local
       host, probe the port on a non-loopback interface. If reachable,
       show a warning that the gateway is exposed to the network.
    
    2. All health check HTTP requests now use 127.0.0.1 explicitly instead
       of localhost (which could resolve to a non-loopback address).
    
    3. Add readGatewayToken() helper for future use — reads the auth token
       from openclaw.json so health checks can include authentication.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    229a4dd View commit details
    Browse the repository at this point in the history
  5. security: implement SSH host key verification to prevent MITM attacks

    Closes the first-connect MITM vulnerability in the SSH adapter:
    
    1. StrictHostKeyChecking changed from accept-new to yes — SSH now
       rejects connections to hosts not in known_hosts.
    
    2. Setup wizard verifies host keys before first connect: fetches
       fingerprint via ssh-keyscan, shows it in a modal dialog, and
       only adds to known_hosts after user explicitly trusts the host.
    
    3. testConnection() refuses unknown hosts — directs users to the
       setup wizard for proper fingerprint verification.
    
    4. Helper functions exported: isHostKnown(), fetchHostFingerprint(),
       addHostToKnownHosts() for consistent host key management.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    49d0470 View commit details
    Browse the repository at this point in the history
  6. security: harden version checks and download URLs against spoofing

    Mitigates fake-update and release-tampering attack vectors:
    
    1. Version strings from npm registry now validated against strict
       semver pattern — rejects crafted/malicious version responses.
       Non-200 HTTP responses also rejected (prevents redirect-based
       spoofing).
    
    2. Removed remaining npm install -g openclaw@latest fallback from
       statusController auto-update prompt.
    
    3. Website download page now validates that release asset URLs
       originate from github.com/objects.githubusercontent.com domains
       before linking — prevents tampered release metadata from
       redirecting users to malicious download servers.
    
    4. Website shows "Verify checksums (SHA-256)" link when a checksums
       file is present in the GitHub release assets.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    52592ff View commit details
    Browse the repository at this point in the history
  7. security: harden Docker containers and audit for dangerous configurat…

    …ions
    
    Mitigates container escape attack vector:
    
    1. All OCC-created containers now run with --cap-drop ALL
       --cap-add NET_BIND_SERVICE --security-opt no-new-privileges.
       This drops dangerous default capabilities and prevents privilege
       escalation via setuid binaries.
    
    2. Runtime security audit on container connect: inspects the
       container for dangerous configurations (running as root,
       --privileged mode, Docker socket mounted) and warns the user.
       Covers both OCC-created and user-provided containers.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    19e8530 View commit details
    Browse the repository at this point in the history
  8. security(P0): remove arbitrary command execution and all curl-pipe-bash

    Two critical fixes:
    
    1. Remove webview catch-all command execution fallback in
       statusController.ts and home.ts. Previously, any unrecognized
       webview message with a `command` field was passed directly to
       vscode.commands.executeCommand() — allowing a compromised webview
       to execute arbitrary VS Code commands. The fallback clauses are
       removed; only explicitly handled commands are accepted.
    
    2. Replace all remaining curl-pipe-bash patterns in installCli()
       across all 4 connection files (local, docker, ssh, localDefault).
       Install scripts are now downloaded to temp files, checksums
       fetched and verified via sha256sum, then executed. Temp files
       cleaned up on success and failure.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    5a16020 View commit details
    Browse the repository at this point in the history
  9. security(P1): URL allowlist, API key via env var, filtered exec env

    Three high-severity fixes:
    
    1. openUrl webview handler now validates URLs against a domain
       allowlist (occ.mba.sh, github.com, openclaw.ai, etc.) and
       rejects non-http(s) protocols. Prevents phishing via
       compromised webview content.
    
    2. API keys no longer passed as CLI arguments (visible in ps,
       docker logs, shell history). All runSetup() methods now pass
       the key via OPENCLAW_API_KEY environment variable instead.
    
    3. buildExecEnv() no longer spreads the entire process.env to
       child processes. Each adapter now uses safeExecEnv() which
       allowlists only necessary variables (PATH, HOME, SHELL, etc.)
       SSH adapter keeps SSH_AUTH_SOCK; Docker keeps DOCKER_HOST.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    FletcherFrimpong and claude committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    b0207a7 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2026

  1. Merge pull request #60 from FletcherFrimpong/multihost

    security: harden hosts.json and supply chain install paths
    asieduernest12 authored Apr 4, 2026
    Configuration menu
    Copy the full SHA
    d0ad77e View commit details
    Browse the repository at this point in the history
Loading