Skip to content

feat(runtime): plan scoped additional permissions - #964

Merged
likun666661 merged 1 commit into
apache:mainfrom
YayoiNanoka:feat/runtime-additional-permission-planning
Jul 14, 2026
Merged

likun666661 merged 1 commit into
apache:mainfrom
YayoiNanoka:feat/runtime-additional-permission-planning

Conversation

@YayoiNanoka

Copy link
Copy Markdown
Contributor

Summary

Refs #509
Follow-up to #960 and extracted from #880 as an independently reviewable slice.

This PR adds the Runtime planning boundary for one-call additional permissions.

  • canonicalizes relative, existing, missing, and symlinked filesystem targets
  • separates user-visible paths from canonical enforcement paths
  • computes only the permissions missing from the active base profile
  • maps file tools to minimal read/write and exact/subtree scopes
  • accepts Bash permissions only through an explicit declaration
  • rejects requests that conflict with explicit deny rules
  • records bounded risk summaries and stable intent/profile hashes
  • revalidates approved paths to detect symlink or target-type changes

This slice does not request approval, persist or consume grants, execute tools with expanded permissions, or change the default Runtime path. Those orchestration steps remain separate slices.

Verification

  • npm test --workspace @maka/core — 947 passed
  • npm test --workspace @maka/runtime — 1585 passed, 0 failed, 7 platform-conditional skips
  • npm run build
  • npm run typecheck

Review focus

The authorization boundary is intentionally declaration-driven: Bash command strings are never parsed to infer required permissions. Filesystem targets are canonicalized before approval and revalidated before later consumption so a symlink or target-type change cannot silently reuse the proposal.

@likun666661
likun666661 merged commit cd3ffa6 into apache:main Jul 14, 2026
3 checks passed
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.

2 participants