.env Content is Being Captured With Command

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The .env file is in globalignore, yet the agent fetches the content of it using Powershell Get-Content command.

Steps to Reproduce

Simply happens when it needs to check .env data.

Expected Behavior

The agent should not be able to access the .env file no matter what, but should ask for access at least.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.20 (user setup)
VSCode Version: 1.105.1
Commit: b3573281c4775bfc6bba466bf6563d3d498d1070
Date: 2025-12-12T06:29:26.017Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Auto

For AI issues: add Request ID with privacy disabled

42864b65-dbb9-410d-b173-da06f31ef2c2

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

Important note: .cursorignore/global ignore blocks access for Tab/Agent/Inline and @ mentions, but cannot block terminal commands. Terminal is always a separate tool and should require your confirmation before running:

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.