causly-server

P0: before 1.5.4 and the 10 Nov launch

Release blockers. Each item lists the evidence from the current code, the fix, and the acceptance test. Work on branch security/hardening-1.5.4.

Status: [ ] open, [~] in progress, [x] done.


P0-01 Vulnerable dependencies [ ]

Evidence. npm audit --omit=dev on 31 Oct 2026 reports 11 issues: 3 critical, 5 high, 3 moderate.

Package Installed Severity Fix
simple-git (direct) 3.36.0 critical (unsafe operation guards can be bypassed) 4.0.2, major version
@modelcontextprotocol/sdk (direct) 1.29.0 high 1.32.2
zod (direct) 4.4.3 high (memory exhaustion on oversized collections) 4.6.6 or newer
proxy-addr, body-parser, fast-uri, ip-address, hono, @hono/node-server, qs transitive critical to moderate cleared by the SDK upgrade

Impact. The server uses stdio, so the HTTP-related advisories are low exposure. simple-git runs on every git tool call and is the one that matters.

Fix. Upgrade in this order, running the full suite after each step: zod, SDK, simple-git 4.x (read its changelog, it is a major version), then mysql2, pg and vitest. Regenerate the lockfile.

Acceptance.

Docs to update. CHANGELOG.md security section. If simple-git 4 changes how a git tool behaves, also tools/filesystem-git-shell.md.


P0-02 Issue #2: npm install fails in nested cmd.exe on Windows [x]

Evidence. GitHub issue #2. npm install through run_command fails on packages with postinstall scripts: 'node' is not recognized. tools/commandOps.js already patches PATHEXT and PATH, but:

Fix.

  1. Prepend path.dirname(process.execPath) and the npm global prefix to PATH. Prepend, so the Node that runs the server is the Node that runs scripts.
  2. Remove the hard-coded C:\Users\nihal and C:\Program Files\nodejs. Derive the profile from os.homedir().
  3. Set ComSpec to the absolute cmd.exe path when it is missing.
  4. Keep the PowerShell and cmd.exe fallbacks as they are.

Acceptance.

Docs to update. troubleshooting.md (remove the Windows postinstall workaround), limitations.md (Platforms), and close issue #2.


P0-03 Database credentials reach the activity log [ ]

Evidence. tools/security.js redacts by key name. The list (token, password, secret, api_key, and so on) does not include connection_string, and URL credentials inside a value (postgres://user:pass@host/db) are not recognized. tools/toolWrapper.js:54 returns err.message to the client without passing it through the redactor.

Impact. A Postgres or MySQL call writes the full connection string, password included, to logs/activity.log. Errors can echo it back to the agent.

Fix. One central redaction module used by the logger, error responses and API results:

Acceptance.

Docs to update. security.md (Secret redaction: new key names and credentials inside URLs), tools/database.md (connection strings are redacted in logs).


P0-04 Docker Compose shell injection (WSL fallback) [ ]

Evidence. tools/dockerOps.js:231 and :249: const composeCmd = `cd '${wslDir}' && docker compose up...`. A project directory containing a single quote closes the quote and runs the rest as shell.

Fix. Do not build shell text from a path. Run wsl.exe with an argument array (--cd <dir> -- docker compose up -d) so the path is never parsed by a shell. Then audit every exec, execAsync and string-built command in tools/ for the same pattern.

Acceptance.

Docs to update. tools/docker.md (how Compose runs through WSL on Windows), security.md (What is not protected) if the wording changes.


P0-05 http_check has no SSRF protection [ ]

Evidence. tools/vercelOps.js:180: fetch(url, { method: "GET", redirect: "follow" }). web_fetch in tools/webOps.js already blocks private, loopback and link-local addresses, checked at connection time, but http_check does not use it.

Impact. An agent steered by hostile page content can probe internal addresses (169.254.169.254, localhost, 10.x) and see status and timing.

Fix. Extract the guard from webOps.js into a shared module and use it in both tools. Validate every redirect hop. Keep CAUSLY_ALLOW_PRIVATE_HOSTS=true as the single opt-out.

Acceptance.

Docs to update. tools/vercel.md (http_check blocks private addresses), configuration.md (CAUSLY_ALLOW_PRIVATE_HOSTS now covers http_check too), security.md (network guard).


P0-06 File tools: inconsistent path protection [ ]

Evidence.

Fix.

  1. Call the protection check for source and destination in every file and directory tool.
  2. Resolve real paths first (symlinks, .., 8.3 short names), then compare on path boundaries.
  3. Add protected locations for Linux and macOS (/etc, /usr, /bin, /System, /Library, ~/.ssh, ~/.aws, ~/.config/gcloud, the OS keychain folders).
  4. Treat store_path like any other path argument.

Acceptance.

Docs to update. security.md (Protected paths: Windows, macOS and Linux lists, real-path resolution), tools/filesystem-git-shell.md (copy_file is protected), tools/secrets.md (store_path rule).


P0-07 CI hygiene and automated checks [ ]

Evidence.

Fix.

Acceptance.

Docs to update. development.md (CI jobs, new checks, Dependabot, how to run the docs drift test locally).


P0-08 Permission levels and enforcement [ ]

Evidence. tools/security.js assigns levels. A tool missing from the table defaults to MEDIUM and is allowed. Some levels are lower than the risk:

Tool Now Proposed Why
git_push MEDIUM HIGH Visible to others, hard to undo
git_merge MEDIUM HIGH Rewrites the working branch
secrets_get MEDIUM HIGH Returns a decrypted secret to the agent
git_stash (drop) LOW MEDIUM Destroys work
git_tag (delete) LOW MEDIUM Removes a ref
supabase_create_project MEDIUM HIGH Creates billable resources
vercel_cancel_deployment MEDIUM HIGH Affects production

Fix. Apply the table. Keep the safe default for unknown tools, but make a missing level a test failure so it can never ship.

Acceptance.

Docs to update. security.md (levels table and examples), tools/filesystem-git-shell.md (git_push, git_merge), tools/secrets.md (secrets_get), tools/supabase.md, tools/vercel.md. The drift test from P0-07 enforces this.


P0-09 MCP conformance and tool annotations [ ]

Evidence. No tool registers MCP annotations. Clients and directories use readOnlyHint, destructiveHint, idempotentHint and openWorldHint to decide how to present and approve a tool. The server has not been run against the MCP Inspector.

Fix.

Acceptance.

Docs to update. architecture.md (annotations), development.md (adding a pack: annotations come from the permission level), security.md (annotations are hints, not enforcement).


P0-10 Input fuzz tests for every path and shell boundary [ ]

Why. The Compose bug (P0-04) is one instance of a class. Others will exist.

Do. One shared test helper that feeds each path or command argument these values and asserts no evaluation, no escape from the workspace and no crash: ', ", ;, &, |, $(x), a backtick, %PATH%, a newline, a very long name, an empty string, Hindi and emoji names, a trailing space or dot (Windows), ..\.., a UNC path, and a symlink.

Acceptance.

Docs to update. development.md (how to use the fuzz helper when adding a tool).


P0-11 Install, upgrade and platform matrix [ ]

Why. Windows has had hands-on use. macOS and Linux have been run only by CI, never by hand.

Do.

Acceptance.

Docs to update. getting-started.md (verified platforms, minimum Node version), limitations.md (Platforms), troubleshooting.md (new install findings).


P0-12 Release hygiene [ ]

Evidence. package.json has no homepage. The package is not published with provenance.

Do.

Acceptance.

Docs to update. CHANGELOG.md. README and ROADMAP are updated last, after P0 is green. No docs site change.


P0-13 Correctness bugs found during QA [ ]

Evidence.

  1. edit_file does not match a multi-line old_str against a file that uses CRLF line endings, so edits to normal Windows files fail with “not found”. Reproduced on 31 Oct 2026 against a CRLF eslint.config.mjs.
  2. github_list_issues with state: "all" returned an empty list while an open issue existed. state: "open" returned it. Check whether all is passed through correctly.

Fix. Normalize line endings when matching and preserve the file’s original line endings when writing. Fix or document the state handling.

Acceptance.

Docs to update. tools/filesystem-git-shell.md (edit_file and line endings), tools/github.md (state values for github_list_issues).