Skip to content

docs: clarify shell permission limits - #56676

Open
sayedrisat wants to merge 2 commits into
anomalyco:devfrom
sayedrisat:shell-read-guardrail
Open

sayedrisat wants to merge 2 commits into
anomalyco:devfrom
sayedrisat:shell-read-guardrail

Conversation

@sayedrisat

@sayedrisat sayedrisat commented Oct 18, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #56545

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Clarifies that shell permission patterns match the command string, not every file a command reads. The example shows why a filename deny is not a sandbox or a reliable way to protect secrets from recursive shell searches.

How did you verify your code works?

Website typecheck, generated-file check, and build passed. The repository pre-push check passed.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #2242, #55232, #17073

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new section is accurate and consistent with the rest of the page: same config shape and same 'scanner-produced command string' term as the Actions table. I read it against the base page; it's docs only, so there's nothing to run. The public API is unchanged.

One thing worth fixing: where the section sits (see the inline comment).

Related: #2242, #55232, #17073

| `opencode_read_mcp_resource` | `<server>:<uri>` |
| `execute` | `*`; a deny removes Code Mode and the tools reached only through it, while nested tools enforce their rules |

### Shell rules do not restrict files a command reads

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the section here splits the Actions table from its existing follow-up example: "For example, allow one skill and deny all other skills:" (line 144) now sits under the "Shell rules do not restrict files a command reads" heading, so it reads as a shell example. Could you move this section after the skill example (e.g. just before the doom_loop/lsp note), or next to the other shell material further down the page?

This branch has not been deployed

No deployments
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.

bash: recursive file-reading commands (grep -r, rg, ls -R) bypass filename-pattern deny rules

1 participant