[PR #1620] [CLOSED] feat: add 'deny' option to permission configuration system #9995

Closed
opened 2026-02-16 18:14:31 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1620
Author: @josephschmitt
Created: 8/5/2025
Status: Closed

Base: devHead: deny-permission


📝 Commits (1)

  • 0c38375 feat: add 'deny' option to permission configuration system

📊 Changes

4 files changed (+13 additions, -3 deletions)

View changed files

📝 packages/opencode/src/config/config.ts (+1 -1)
📝 packages/opencode/src/tool/bash.ts (+5 -2)
📝 packages/opencode/src/tool/edit.ts (+4 -0)
📝 packages/opencode/src/tool/write.ts (+3 -0)

📄 Description

Users can now permanently block specific bash commands or file operations by setting permission values to "deny" instead of just "ask" or "allow". This provides stronger security controls by preventing the AI from executing potentially dangerous commands or modifying files when explicitly forbidden.

The deny option works for both bash command patterns and file editing permissions:

  • bash: { "rm *": "deny", "sudo *": "deny" }
  • edit: "deny"

This is super important for us to be able to set certain high-risk tools/commands to always deny, such as the aws cli or terraform.

🤖 Generated with opencode

Co-Authored-By: opencode noreply@opencode.ai


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1620 **Author:** [@josephschmitt](https://github.com/josephschmitt) **Created:** 8/5/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `deny-permission` --- ### 📝 Commits (1) - [`0c38375`](https://github.com/anomalyco/opencode/commit/0c38375ab03930b59820da5e796761842d2e420c) feat: add 'deny' option to permission configuration system ### 📊 Changes **4 files changed** (+13 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/config/config.ts` (+1 -1) 📝 `packages/opencode/src/tool/bash.ts` (+5 -2) 📝 `packages/opencode/src/tool/edit.ts` (+4 -0) 📝 `packages/opencode/src/tool/write.ts` (+3 -0) </details> ### 📄 Description Users can now permanently block specific bash commands or file operations by setting permission values to "deny" instead of just "ask" or "allow". This provides stronger security controls by preventing the AI from executing potentially dangerous commands or modifying files when explicitly forbidden. The deny option works for both bash command patterns and file editing permissions: - bash: { "rm *": "deny", "sudo *": "deny" } - edit: "deny" This is super important for us to be able to set certain high-risk tools/commands to always deny, such as the `aws` cli or `terraform`. 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:31 -05:00
yindo closed this issue 2026-02-16 18:14:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9995