Skip to content

feat: introduce commandAllow for prefix-based Shell.exec rules#1

Open
ysc13245 wants to merge 4 commits intoSeyZ:mainfrom
ysc13245:feature/command-allow-prefix
Open

feat: introduce commandAllow for prefix-based Shell.exec rules#1
ysc13245 wants to merge 4 commits intoSeyZ:mainfrom
ysc13245:feature/command-allow-prefix

Conversation

@ysc13245
Copy link
Copy Markdown

feat: prefix-based allowlist for Shell.exec

This PR adds support for commandAllow, enabling prefix-based
allow rules for Shell.exec.

  • Avoids regex complexity
  • Uses token-based prefix matching
  • Applies only when Shell.exec is set to ASK
  • Fully backward compatible

Example:

{
  "commandAllow": [
    ["docker", "logs"],
    ["openclaw", "config", "get"],
    ["journalctl"]
  ]
}

This allows common diagnostic commands without interactive prompts,
while keeping other exec calls protected.

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