Skip to content

GitHub Copilot wrongly requires approval for writing to /dev/null. #280067

@garretwilson

Description

@garretwilson

GitHub Copilot in agent mode uses a lot of safe commands that I have approved, such as cd and ls. But sometimes it redirects command errors to /dev/null, so that it won't be confused by the output I suppose. e.g.

git show HEAD:foo/bar.ts 2>/dev/null | head -150

GitHub Copilot asks for my permission, because it thinks the LLM is writing to a file.

File write operations detected that cannot be auto approved: \dev\null

But 2>/dev/null is not really writing to a file; it's just discarding information from the output.

Is there a way I can approve all writing to /dev/null without approving all file system writing? If not, the system probably needs to special case this I/O sink.

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions