Skip to content

fix(security): isolate issue task execution#5495

Open
WhinoDo wants to merge 26 commits into
multica-ai:mainfrom
WhinoDo:codex/issue-task-scope-isolation
Open

fix(security): isolate issue task execution#5495
WhinoDo wants to merge 26 commits into
multica-ai:mainfrom
WhinoDo:codex/issue-task-scope-isolation

Conversation

@WhinoDo

@WhinoDo WhinoDo commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Restrict daemon-issued issue task capabilities to their bound issue/task and repository work root. Task tokens cannot read or mutate workspace/project/repository management configuration, agents, runtimes, autopilot, skills, squads, foreign issues/tasks, sibling state, or daemon-owner credentials/files. Human PAT/JWT operator administration remains unchanged.

Candidate identity

  • Base: ea8511340e6949436c04edea00dabeeebba34233
  • Candidate: 9eed256821eca342efe8d4d0c88a65e9c68932d9
  • Tree: d30dd9a5d03a50e59046b3181a4bf17d3706456f

Verification

  • go test ./internal/daemon ./pkg/agent -count=1
  • go vet ./internal/daemon ./pkg/agent
  • go test ./... -count=1
  • go vet ./...
  • go test -race ./internal/daemon -count=1
  • go test -race -p 1 ./... -count=1
  • Linux and Windows cross-compile checks for pkg/agent
  • git diff --check and gofmt checks
  • Focused hardlink and task-root isolation tests

A fully parallel race run produced four fixed-timeout failures under host load; all four passed three isolated race runs, and the complete serial race suite passed.

Independent review

Independent read-only Codex reviewer 019f67b4-ff28-78c2-a95b-ec305f05c850 reviewed the exact candidate/tree above and returned APPROVED with no P0/P1 findings.

Nonblocking findings:

  • P2: a pathname replacement window remains because all sandbox operations are not fd-bound.
  • P3: the task CLI advertises issue rerun and issue runs, while the server rejects them.

No canary or downstream AThink work will be treated as unlocked until this candidate is merged, deployed, and a real task-token canary proves byte-identical management configuration before/after.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

@WhinoDo is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@WhinoDo WhinoDo force-pushed the codex/issue-task-scope-isolation branch 3 times, most recently from c255806 to 614228a Compare July 16, 2026 05:17
WhinoDo added 26 commits July 16, 2026 17:58
Bind task roots, cwd, and executable identities before launch, recheck them
immediately before Start, and keep Linux mounts on open descriptors while
reserving leading ExtraFiles for Pi session FD handoff. Darwin remains
pathname-based and fails closed on identity replacement.
Close the race where automatic Desktop restarts could diagnose and stop
separately, and ensure idle-required shutdown acquires the claim barrier
before process exit so tasks cannot be claimed mid-restart.
@WhinoDo WhinoDo force-pushed the codex/issue-task-scope-isolation branch from 1a16465 to ea844d4 Compare July 16, 2026 15:38
@WhinoDo

WhinoDo commented Jul 16, 2026

Copy link
Copy Markdown
Author

Ready for maintainer merge

Candidate SHA: ea844d49c79675a73e4b5281a9b1d32777fd6a28
PR: #5495
CI: all required checks green on that exact SHA

Independent Reviewer (exact SHA): APPROVED for ea844d49c79675a73e4b5281a9b1d32777fd6a28
Mergeability: MERGEABLE / CLEAN vs current main
Fork head: WhinoDo/multica codex/issue-task-scope-isolation
maintainer_can_modify: true

What this lands

Issue-task execution scope isolation + daemon lifecycle serialization:

  • Issue/task tokens must not read or mutate workspace/project/repo/agent/runtime/autopilot/skill/squad configuration
  • Desktop daemon start/stop/restart is serialized; automatic restarts use idle-required shutdown
  • Server /shutdown is claim-barrier aware (busy → 409)

Why we cannot self-merge

WhinoDo has pull only on multica-ai/multica (no MergePullRequest permission). Please merge when ready.

Post-merge request for AThink local canary

After merge, we will:

  1. deploy the merged binary into the local Multica.app CLI path
  2. restart daemon
  3. run a real task-token canary proving issue-derived work cannot mutate Multica management config

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant