anomalyco / anomalyco/opencode

Permission deny patterns dont match PowerShell commands when shell is pwsh

Open
#41,970 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

When shell is pwsh, bash permission deny patterns (rm *, del *, sudo *, scp *) never match PowerShell commands (Remove-Item, etc). Deny rules are silently bypassed.

Evidence

  • Config: "shell": "pwsh" with "rm *": "deny" and "del *": "deny"
  • Logs show Remove-Item executed 9 times - zero matched by deny rules
  • All bash-style deny rules are irrelevant on Windows pwsh

Expected

Permission matching should be shell-aware. "rm ": "deny" should match Remove-Item when shell is pwsh. Or provide separate pwsh permission block.

Impact

False sense of security - deny list looks complete but does nothing on Windows.

Version: 1.18.16, Electron 42.3.3, Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.