apache / apache/maka

Add basic permission configuration methods

Open
#3,351 3 comments 0 reactions 1 assignee Claimed by @CxHsin View on GitHub
enhancement
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

### Problem

- The https://github.com/apache/maka/blob/main/packages/cli/README.md file doesn't mention anything related to permissions. It would be great if there were a way to configure permissions. A sandbox isn't necessarily needed; prompts and regular expressions can handle many scenarios.
- For example, in the `~/.config/opencode/opencode.jsonc` file related to https://github.com/anomalyco/opencode , I would do something like this to prevent `anomalyco/opencode` from accessing or modifying files under `/mnt/**` and the `/etc/wsl.conf` file, while also disabling `anomalyco/opencode` from executing the `git commit` and `git push` commands.
```json
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {"git commit *": "deny","git push *": "deny"},
"edit": {"/etc/wsl.conf": "deny"},
"external_directory": {"*": "allow","/mnt/**": "deny"}
}
}
```
- Early investigation is located at https://x.com/linghengqian/status/2090453772862656944?s=20 .

### Desired outcome

- Add basic permission configuration methods.

### Alternatives or workarounds

- Uncertain.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.