← MCP server and skill grades

claude-octopus

nyldn/claude-octopus

D
Type
MCP server
Scanned
Nov 17, 2026
Version
49104983080a
Files read
1554

Claude Octopus is a plugin and local server that coordinates Claude with up to twelve other AI tools to research, plan, write, and review software. Its biggest risk is that even read-only review modes disable safety checks in external AI tools and automatically run scripts or load API settings from the project folder, so reviewing an untrusted project or malicious prompt could execute commands on your computer or leak private files and credentials.

What it can reach

Files
Reads and edits project files, git branches and worktrees, and local .env files, while also reading and writing logs, caches, settings, and credential files in ~/.claude-octopus, ~/.claude, and /tmp.
Network
Sends prompts and project code to external AI services and local servers, fetches web pages, checks npm and Anthropic usage endpoints, and creates or comments on GitHub issues and pull requests.
Shell commands
Runs Bash and Python scripts, AI-requested terminal commands, project test and build scripts, developer tools (like git, GitHub CLI, npx, and uvx), and up to twelve external AI command-line tools.
Secrets
Reads API keys, login tokens, and GitHub credentials from environment variables, shell startup files, .env files, system keychains, and local AI tool config folders, and sends them to configured AI providers.
Browser
Opens provider login and API-key pages in your default web browser during setup and can optionally inspect live web page styles through Chrome tools.
System
Monitors and stops local background processes, runs an optional background scheduler for recurring tasks, and can install global command-line packages using npm or Homebrew during setup.

Findings

8 high5 medium11 low
  1. HighAntigravity consultative seats run with --dangerously-skip-permissions

    scripts/helpers/agy-exec.sh:78

    Consultative workflows such as research, code review, security review, council, and debate are meant to be read-only (build-fleet.sh explicitly excludes kimi for lacking a read-only boundary). However, build-fleet.sh admits agy into all consultative fleets while agy-exec.sh unconditionally passes --dangerously-skip-permissions, relying only on a prompt instruction (AGY_INLINE_DIRECTIVE) to ask the model not to edit files or run terminal commands. Prompt injection in a reviewed PR diff, repository file, or fetched page can override that prompt instruction and modify workspace files or run commands—and if OCTOPUS_AGY_SANDBOX=off is set, --sandbox is removed while --dangerously-skip-permissions remains active.

    Fix: Do not pass --dangerously-skip-permissions for consultative or review seats; enforce CLI-level read-only tool flags where supported, exclude agy from read-only fleets if it cannot disable write and shell tools at the CLI layer, and refuse --dangerously-skip-permissions when OCTOPUS_AGY_SANDBOX=off.

  2. HighProject .env in current working directory overrides user API keys and enables attacker-controlled accounts

    scripts/lib/provider-routing.sh:590

    When resolving provider credentials in non-interactive subshells (or when a user relies on OAuth so an API key variable like OPENAI_API_KEY is unset), resolve_provider_env reads $PWD/.env before $HOME/.env, $HOME/.bashrc, and $HOME/.zshrc. Running even a read-only workflow such as /octo:review, /octo:security, or /octo:preflight inside a cloned repository containing a malicious .env file can replace the user's own credentials or silently activate providers like OpenRouter, OrcaRouter, Perplexity, Codex, or Grok with an attacker's API key, routing prompts, code diffs, and persistent memory to an account whose request logs the attacker controls.

    Fix: Remove $PWD/.env from resolve_provider_env so provider credentials are only loaded from user-owned configuration under $HOME or explicit environment variables.

  3. HighConsultative and council workflows force Codex into danger-full-access, disabling sandboxing

    scripts/lib/agent-sync.sh:1143

    Advisory runs such as /octo:council (including --goal review and --implement never), pre-implementation design reviews, and feature artifact analysis call run_agent_sync_consultative, which unconditionally exports OCTOPUS_CODEX_SANDBOX=danger-full-access. Although it runs inside a temporary copy of the repository, Codex's danger-full-access mode disables all OS filesystem and network sandboxing and auto-approves arbitrary shell commands, even overriding a user's explicit OCTOPUS_CODEX_SANDBOX=read-only setting. Prompt injection in reviewed code, diffs, or context artifacts can trick the Codex seat into executing arbitrary commands and accessing files or secrets anywhere on the machine.

    Fix: Honor explicit OCTOPUS_CODEX_SANDBOX=read-only settings and use workspace-write (confined to the disposable directory) rather than danger-full-access when read-only sandboxing is unavailable.

  4. HighOpenCode dispatch omits project-config disablement and credential isolation in untrusted workspaces

    scripts/lib/dispatch.sh:959

    While opencode-probe.py sets OPENCODE_CONFIG_PROJECT_DISABLE=1, OPENCODE_DISABLE_PROJECT_CONFIG=1, and strips unrelated secrets to prevent loading untrusted project code, actual workflow dispatch in get_agent_command only sets OPENCODE_PURE=1 (which disables external JS plugins but not project opencode.json configuration) and omits OpenCode from build_provider_env's env -i isolation. When OpenCode is seated in /octo:review, /octo:council, or /octo:discover on an untrusted repository, a repository opencode.json can launch local MCP command servers or override provider base URLs while inheriting all parent environment secrets.

    Fix: Pass OPENCODE_CONFIG_PROJECT_DISABLE=1 and OPENCODE_DISABLE_PROJECT_CONFIG=1 during OpenCode dispatch, isolate OpenCode's environment in build_provider_env with env -i, and enforce a read-only agent mode for non-implementation roles.

  5. HighQwen CLI always runs with --approval-mode yolo and full environment inheritance, even in read-only roles

    scripts/lib/dispatch.sh:766

    Unlike Kimi (which dispatch.sh blocks from read-only roles) and Grok, Cursor, or Claude (which restrict write and shell tools for non-implementers), Qwen is always dispatched with --approval-mode yolo regardless of role or phase, and is omitted from build_provider_env's env -i isolation. Because Qwen is automatically included in default council, review, security, and research fleets when installed, prompt injection in reviewed code or research content can cause Qwen to execute auto-approved shell commands with access to all environment secrets.

    Fix: Use a read-only approval mode (such as --approval-mode plan) or reject Qwen for non-implementation roles as done for Kimi, and isolate Qwen's environment in build_provider_env.

  6. HighTangle Bubblewrap sandbox escape via project-local node_modules/.bin/supabase execution

    scripts/lib/testing.sh:466

    Tangle runs untrusted coding providers inside a Linux Bubblewrap (bwrap) mount boundary so they can only modify the target worktree and cannot execute unconfined host code or touch .git hooks. However, after the worker finishes, validate_tangle_results() runs in the unconfined parent shell and calls tangle_check_supabase_migration_history() whenever a file under supabase/migrations/*.sql changed. When the global supabase CLI is not installed, the parent shell executes $repo_root/node_modules/.bin/supabase directly from the writable worktree. Because node_modules/ is normally gitignored, snapshot_tangle_worktree_paths() (which uses git ls-files --exclude-standard) does not flag a newly planted node_modules/.bin/supabase as an out-of-scope write even in strict mode, allowing a prompt-injected worker or untrusted repo to run arbitrary code on the host outside bwrap.

    Fix: Do not execute repository-local binaries such as $repo_root/node_modules/.bin/supabase from the unconfined parent orchestrator; only use a trusted host-installed binary or run the check inside the read-only Bubblewrap boundary.

  7. HighTangle drops its Bubblewrap filesystem boundary during retries and review corrections

    scripts/lib/workflows.sh:1931

    In _tangle_develop_in_workspace(), OCTOPUS_TANGLE_EXECUTION_BOUNDARY=true is exported before spawning the initial parallel coding subtasks, but is immediately unset right after the spawn loop finishes. In the default strict write-scope mode, octopus_tangle_execution_boundary_required() returns false once that variable is unset. As a result, coding agents spawned during Step 3 quality-gate retries (which trigger automatically when a declared output file is missing) and Step 5 contextual review-correction rounds run without Bubblewrap confinement, as do tangle phases run via the default YAML embrace workflow (yaml-workflow.sh). A prompt-injected coding agent in those rounds can modify .git/hooks, $HOME, or parent result files despite README claims that Tangle never falls back to unconfined execution.

    Fix: Keep OCTOPUS_TANGLE_EXECUTION_BOUNDARY, OCTOPUS_TANGLE_WORKTREE, and OCTOPUS_TANGLE_RESULTS_DIR exported through validation retries and contextual review corrections (and in yaml-workflow.sh tangle dispatches), and ensure run_agent_sync enforces the same boundary for tangle implementers.

  8. HighArbitrary local file read and provider exfiltration via plan:/spec:/brief: prompt tokens

    scripts/lib/workflows.sh:4805

    Before dispatching Tangle design review and task decomposition, _tangle_develop_in_workspace() scans the prompt for any whitespace-separated token starting with plan:, spec:, or brief: (or = variants) and reads up to 40 KB of that file directly into resolved_prompt. Unlike Tangle's Reads: scope—which blocks paths outside the repository by default and blocks .env, SSH keys, and credential files—tangle_resolve_context_file_path() expands ~ to $HOME, permits arbitrary absolute paths, symlinks, and .. traversal, and accepts any file extension. If an AI agent or MCP client calling octopus_develop is tricked by prompt injection into including a token like plan:~/.ssh/id_rsa or spec:.env, the script silently reads the secret file and transmits its contents to external AI providers and validation reports.

    Fix: Restrict plan/spec/brief file resolution to regular .md files inside the project root (or explicitly authorized read roots) and validate the resolved path through tangle_read_scope_is_allowed and secret scanning before injecting its contents.

  9. MediumScheduler security gate omits tool allowlist enforcement and allows writes to ~/.claude-octopus/

    hooks/scheduler-security-gate.sh:84

    Although the hook header states that it blocks tools not in the job's allowed list and restricts filesystem access during scheduled jobs (such as automated GitHub triage), the script never reads or checks any allowed-tools list from the job JSON. Bash, Glob, and Grep can still read or modify arbitrary files outside the workspace (aside from two regex checks on Bash), jq errors fail open, and Read/Write/Edit explicitly allow all of ~/.claude-octopus/. A prompt-injected scheduled agent can overwrite ~/.claude-octopus/scheduler/jobs/<id>.json to widen its own workspace or overwrite ~/.claude-octopus/statusline.sh to run arbitrary code in interactive Claude sessions.

    Fix: Enforce the per-job allowed-tools list from the job file, fail closed if jq or path resolution fails, restrict Bash/Glob/Grep to the job workspace, emit hookSpecificOutput.permissionDecision deny consistently, and block Write/Edit access to ~/.claude-octopus/.

  10. MediumMemory bridge silently downloads and runs unpinned mcp-memory-service via uvx

    scripts/mcp-memory-bridge.sh:9

    The fallback memory adapter defaults MCP_MEMORY_CMD to 'uvx mcp-memory-service' and checks availability using only the first word of the command ('command -v uvx'). On any machine where uv/uvx is installed—even if the user never installed or enabled mcp-memory-service—mcp_memory_available returns true, causing search, context, or observe calls to download and execute the latest unpinned mcp-memory-service package and its dependencies from PyPI at runtime.

    Fix: Require an explicit user opt-in before enabling mcp-memory-service, check for a locally installed mcp-memory-service binary rather than uvx, and pin an exact version if uvx is explicitly requested.

  11. MediumDefault-open role tool policy grants shell execution to OpenAI-compatible agents in non-implementation roles

    scripts/lib/dispatch.sh:281

    get_tool_policy defaults any unrecognized role (including reviewer, security-reviewer, architect, strategist, council personas like strategy-analyst, and empty roles in fan-out) to full, and also classifies implementation personas like typescript-pro as full even when /octo:council runs with --implement never or --implement plan-only. Outside phase=review, octo_tool_loop_requires_no_tools relies on get_tool_policy, allowing openai-compatible-agent.py to run with --tool-policy auto (which exposes write_file and shell=True run_command) during advisory or validation workflows if prompt injection tricks the model into calling tools.

    Fix: Change get_tool_policy's wildcard default from full to a read-only policy and require an explicit implementation phase (such as tangle or develop) before enabling tool execution in octo_tool_loop_requires_no_tools.

  12. MediumArbitrary code execution when extracting design tokens from untrusted repositories

    scripts/token-extraction/extractors/tailwind.ts:167

    The design token extraction pipeline presents itself as a static configuration analyzer, but TailwindExtractor (tailwind.ts), ThemeFileExtractor (theme-file.ts), and StyledComponentsExtractor (styled-components.ts) evaluate matched JavaScript and TypeScript objects using new Function(). In Node.js, new Function() is not a sandbox and runs with full process privileges. Running token extraction on a cloned or untrusted repository allows any tailwind.config.js or *theme*.{js,ts,tsx} file to execute arbitrary commands on the user's machine.

    Fix: Replace new Function() evaluation in tailwind.ts, theme-file.ts, and styled-components.ts with a static AST parser (such as TypeScript's compiler AST or Babel parser) that extracts literal values without executing code.

  13. MediumCursor CLI provider bypasses workspace trust on read-only reviews and enables unattended tool execution

    config/providers/cursor-agent/CLAUDE.md:51

    The Cursor CLI provider configuration passes --trust on every agent invocation, including read-only ask and plan roles used for code review, research, and councils, and passes --force (full unattended write and shell access) for implementer and developer roles. Skipping Cursor's workspace-trust check (--trust) inside an untrusted repository allows workspace-defined configurations (such as project .cursor/mcp.json servers) to be trusted automatically, while --force grants unrestricted tool access despite README.md describing the Cursor CLI integration as read-only by default.

    Fix: Omit --trust when running read-only roles on untrusted workspaces (or run the CLI in an empty temporary directory when passing prompts via stdin), and require explicit opt-in before passing --force.

  14. LowUnquoted heredocs in skill Bash templates evaluate backticks and command substitutions

    skills/skill-debate/SKILL.md:604

    Several skill templates (including skills/skill-debate/SKILL.md, .claude/skills/skill-debate/SKILL.md, skills/skill-design-lineage/SKILL.md, skills/octopus-quick/SKILL.md, and skills/skill-intent-contract/SKILL.md) instruct the host agent to write markdown summaries and advisor responses using unquoted Bash heredocs (<<EOF). Because debate and design outputs routinely quote code identifiers in backticks or contain $() expressions from reviewed files or external provider responses, Bash evaluates those expressions as shell commands while writing the markdown file.

    Fix: Use single-quoted heredoc delimiters (<<'EOF') when writing static blocks and pass dynamic text through single-quoted environment variables or files, matching the pattern already used in skills/flow-define/SKILL.md.

  15. LowToken extraction pipeline runs unpinned npx tsx at runtime

    scripts/extract/core-extractor.sh:327

    When /octo:extract runs, core-extractor.sh executes 'npx tsx cli.ts' inside scripts/token-extraction, whose package.json declares ts-node in devDependencies rather than tsx. Without --no-install or a local tsx dependency, npx can fetch and execute an unpinned tsx package from the npm registry at runtime.

    Fix: Add a pinned tsx dependency to scripts/token-extraction/package.json (or invoke the local ./node_modules/.bin/ts-node binary) and pass --no-install to npx.

  16. LowPredictable /tmp state and output paths used without symlink or ownership checks

    hooks/octopus-hud.mjs:868

    Multiple hooks and skills read and write predictable paths in /tmp (such as /tmp/octopus-ctx-<sid>.json in octopus-hud.mjs and octopus-statusline.sh, /tmp/octopus-failures-<session>.json in strategy-rotation.sh, /tmp/octopus-compress-debounce-unknown.count in output-compressor.sh, /tmp/octopus-freeze-<session>.txt in freeze-check.sh, /tmp/LESSONS_PRESERVED.md in skill-rollback, and /tmp/octopus-review-<provider>.md in skill-staged-review) without O_NOFOLLOW, mktemp, or ownership checks, and octopus-hud.mjs does not sanitize session_id before building the path. On multi-user machines, a local attacker can pre-create symlinks or spoof state files in /tmp.

    Fix: Store session bridge, debounce, freeze, and temporary review files in a mode-0700 directory under ~/.claude-octopus/ (or allocate unique files with mktemp), and validate session_id to alphanumeric characters.

  17. LowStatusline HUD extracts Claude OAuth tokens from Keychain and polls npm without documentation

    hooks/octopus-hud.mjs:267

    Once installed via /octo:setup or install-deps.sh, the Tier 1 statusline HUD reads Claude Code OAuth access and refresh tokens from ~/.claude/.credentials.json or macOS Keychain ('Claude Code-credentials'), refreshes and overwrites ~/.claude/.credentials.json against platform.claude.com, queries api.anthropic.com/api/oauth/usage, and polls registry.npmjs.org/@anthropic-ai/claude-code/latest hourly without user opt-in or mention in the README privacy/network disclosures.

    Fix: Rely on Claude Code's native stdin rate_limits statusline payload by default, make Keychain OAuth access and npm registry version checks explicit opt-ins, and document them in README.md.

  18. LowUnauthenticated localhost HTTP memory bridges allow local context injection on shared hosts

    scripts/claude-mem-bridge.sh:30

    claude-mem-bridge.sh and agentmemory-bridge.sh automatically probe localhost TCP ports (37700 + uid%100 and 3111) over plain HTTP with no authentication by default. On a multi-user system where those services are not running, another local user can bind the port to receive session observations and return crafted memory context that session-start-memory.sh and workflows inject into Claude's prompt.

    Fix: Disable localhost TCP memory bridges unless explicitly enabled by the user and require authentication secrets or a user-owned Unix domain socket.

  19. LowMCP server environment blocklist misses OCTOPUS_AUTONOMY and executable override variables

    mcp-server/src/index.ts:101

    mcp-server/src/index.ts defines BLOCKED_ENV_VARS to prevent inherited environment variables from weakening sandbox or autonomy settings (blocking CLAUDE_OCTOPUS_AUTONOMY), but forwards all other OCTOPUS_* and CLAUDE_OCTOPUS_* variables. This lets aliases and command overrides such as OCTOPUS_AUTONOMY, OCTOPUS_CLAUDE_BIN, OCTOPUS_COMMANDCODE_BIN, OCTOPUS_COMMANDCODE_PERMISSION_MODE, OCTOPUS_MCP_MEMORY_CMD, and OCTOPUS_AGENT_LIFECYCLE_HOOK pass through to orchestrate.sh.

    Fix: Replace the four-item BLOCKED_ENV_VARS deny-list with an explicit allowlist of safe non-executable configuration variables in mcp-server/src/index.ts.

  20. LowAPI keys passed in curl command-line headers are visible in the process table

    scripts/lib/perplexity.sh:431

    Perplexity, OpenRouter, and OrcaRouter requests pass Bearer API keys directly via curl -H command-line arguments. On multi-user systems or during parallel runs alongside untrusted subprocesses, command-line arguments are readable via ps or /proc/<pid>/cmdline for the 60-120 second duration of the HTTP request, bypassing environment-variable isolation.

    Fix: Pass sensitive Authorization headers to curl via stdin or a mode-0600 temporary config file using curl --config instead of command-line arguments.

  21. LowPredictable model cache file in /tmp is read and written without ownership or symlink checks

    scripts/lib/model-resolver.sh:955

    On Linux systems where TMPDIR is unset, octo_model_cache_file resolves to a predictable path such as /tmp/octo-model-cache-<user>-global.json. resolve_octopus_model reads this file without verifying file ownership or symlinks and writes to a predictable .tmp.$$ sibling without mktemp or umask 077, allowing another local user on a shared machine to pre-create and poison cached model selections for custom-model-auto providers.

    Fix: Move the model resolution cache into a mode-0700 user directory under ~/.cache/claude-octopus or ~/.claude-octopus and write updates via mktemp with mode 0600.

  22. LowShell command injection in generated extract-all-features.sh script

    scripts/token-extraction/outputs/feature-index.ts:193

    When token-extraction runs with --detect-features, FeatureDetector derives feature names from subdirectory names in the scanned repository (such as features/<subdir>), and generateFeatureExtractionScript() writes an executable bash script (extract-all-features.sh, mode 0755) that interpolates feature.name and featureName inside double quotes without shell escaping. Only whitespace is replaced with hyphens, leaving characters like $, backticks, quotes, and semicolons intact. If a user scans an untrusted repository containing a crafted directory name and runs the generated script, arbitrary shell commands execute.

    Fix: Restrict feature slugs to a strict character allowlist such as [^a-z0-9_-] or shell-escape values with single-quote escaping before writing them into extract-all-features.sh.

  23. LowMissing path traversal validation on scheduler job IDs

    scripts/scheduler/octopus-scheduler.sh:195

    Although policy_check() validates job fields like execution.workspace against .. path traversal, neither policy.sh nor octopus-scheduler.sh validates the job .id field (or the id argument to remove, enable, and disable). Because cmd_add copies the job file to ${JOBS_DIR}/${id}.json and cmd_remove deletes ${JOBS_DIR}/${id}.json, a job ID containing ../ sequences can overwrite or delete arbitrary .json files outside ~/.claude-octopus/scheduler/jobs/.

    Fix: Validate job IDs in policy_check() and CLI subcommands against a strict identifier pattern such as ^[a-zA-Z0-9_-]+$ before constructing file paths.

  24. LowTest script writes and executes a hardcoded path in /tmp

    tests/test-version-check.sh:226

    This developer test script writes a shell script to the fixed path /tmp/test_version_compare.sh, marks it executable, and runs it instead of using mktemp or the test framework's private temporary directory. Installed users never run this test, so it only affects developers or CI runners on shared multi-user machines where another local user could pre-create or race that path.

    Fix: Create the temporary test script with mktemp inside "$TEST_TMP_DIR" instead of writing to a predictable path in /tmp.