Skip to content

External directory permission does not work on Windows #11042

Closed

Description

@pschiel

Steps to reproduce

  • setup external_directory permission
  • ask agent to write a file to a different drive
  • agent writes files without asking

Root Cause

In a Windows environment with mixed paths (Windows, MSYS/GitBash) the Wildcard/Permission system breaks in several cases (relative paths, absolute paths / cross-drive) due to path mismatching.

#6763 fixes this via path normalization

Activity

  1. github-actions commented on Jan 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. OpeOginni commented on Jan 28, 2026

    @OpeOginni
    Contributor

    Do you mean the agent writes file to that external_directory you just set?

  3. fantomc0der commented on Feb 22, 2026

    @fantomc0der

    Even when I don't declare an explicit permission for "external_directory" and let it fall back to:

    "*": "ask"
    

    OpenCode is more than happy to reach outside the current working directory to read any part of my file system, including files with secrets from my home directory. I haven't been able to prevent it from doing that yet, regardless of how I configure the permission for "external_directory".

  4. kennethac commented on Mar 27, 2026

    @kennethac

    Why did this get closed? This is definitely still happening and is a critical security problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions