Skip to content

system temp directory should add to allowed list for file access #306

@doggy8088

Description

@doggy8088

Describe the bug

The recent version of Copilot CLI appears to block access to the TEMP directory, which was previously allowed.

Affected version

0.0.340 Commit: fac8111

Steps to reproduce the behavior

I'm using Windows 10 with Windows Terminal with PowerShell 7 (pwsh.exe).

  1. Create a C:\TEMP1 folder.

  2. Change working directory to C:\TEMP1.

  3. Create a test.ps1

    echo '❌ An error occurred, please check the detailed log at: C:\TEMP\err.log'
    echo '❌ An error occurred, please check the detailed log at: C:\TEMP\err.log'
  4. Create a err.log to your $env:TEMP folder (I assume it's C:\TEMP folder) which is normally allowed by Copilot CLI.

  5. Run the following command:

    copilot --allow-all-tools -p 'Run test.ps1'
  6. You will see the following:

    ✓ Run test.ps1 script
    $ .\test.ps1
    ↪ 3 lines...
    ● The script ran but produced error messages. Let me check what's in the error log and the script
    itself to understand what happened.
    
    ✓ Read test.ps1 (7 lines)
    
    The following paths are outside the allowed directories:
    - C:\TEMP\err.log
    
    Allow access to these paths? (y/n):

Expected behavior

I expected to access any files in the TEMP folder without needing permission.

Additional context

  • Operating system: Windows
  • CPU architecture: x86_64
  • Terminal emulator: Windows Terminal
  • Shell: pwsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions