Cursor/audit security hardening#4
Merged
Merged
Conversation
Close audit P0/P1 gaps with symlink-aware paths, no sh -c in Docker, HTTP dialer guards, safer browser WS auth, private config mode, and govulncheck in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
Enable gradual v2 planner/scheduler paths behind config flags, add /healthz and /readyz, and document the wired versus unimplemented features. Co-authored-by: Cursor <cursoragent@cursor.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5e0e681a-128a-4c3a-88ad-6fb35b3e565f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Touches authentication, path/SSRF controls, and optional engine planning/execution paths; defaults keep v2 flags off, but misconfiguration or regressions in permission checks could block legitimate tool use or leave browser/HTTP exposure if health or WS ports are bound broadly.
Overview
This PR tightens the security posture and expands operability while optionally enabling v2 planning/execution behind feature flags.
Security & safety: Docker isolation runs commands as argv (no
sh -c). Filesystem/git paths use symlink-aware resolution; emptyallow_pathsnow denies access. The HTTP tool adds SSRF-safe dialing and redirect checks. Browser WebSocket auth prefersSec-WebSocket-Protocol: octaai.<token>, rejects emptyOrigin, and config saves at0600without logging full browser tokens. SQLite opens with WAL and busy timeout.Engine & daemon:
features.use_htn_planner,use_dag_executor, anduse_capabilitieswire HTN planning (with v1 fallback),pkg/executorscheduling, and the builtin capability registry. The daemon exposes--health-addrwith/healthzand/readyz. CI moves to Go 1.25.x, addsmake lint, a 20% coverage gate, and govulncheck;make live-testand Docker/health docs are added.Tests & docs: Broad unit coverage (permission, browser, engine, planner, storage, tools) plus roadmap/log docs and an in-repo Firefox addon; memory is documented as TF-IDF, not vector DB.
Reviewed by Cursor Bugbot for commit 5b95584. Bugbot is set up for automated code reviews on this repo. Configure here.