Home / Blog / DotShield – stop Claude Code and Cursor from reading your…
Tech News

DotShield – stop Claude Code and Cursor from reading your .env

DotShield released version 0.1.0-beta of its credential protection tool to block Claude Code and Cursor from reading environment secrets in local repositories.

By Dillip Chowdary • Nov 17, 2026 • Source: github.com

DotShield – stop Claude Code and Cursor from reading your .env
Image: github.com

At a glance

Product
DotShield
Release version
0.1.0-beta
Pricing
Free for personal and workplace use
Operating platforms
macOS, Linux, and Windows on x64 or arm64
Agent support
Claude Code and Cursor
Licence terms
DotShield Free Use Licence with closed source code

DotShield launched version 0.1.0-beta of its secret-protection utility for AI development tools, as detailed in github.com's report. The release introduces local guard hooks and an offline scanner designed to stop assistants like Claude Code and Cursor from reading, printing, or logging sensitive project data. By targeting API keys, environment files, tokens, and private keys across active workspaces, git histories, and transcripts, the software isolates credentials before automated agents can expose them.

This report details DotShield's standalone architecture, its local scanning workflows, runtime hook controls, and the structured evaluation protocol for beta testers. Software engineers, security administrators, and teams deploying autonomous terminal assistants or AI-integrated code editors can use this overview to evaluate credential containment on developer workstations without transmitting telemetry to remote servers.

01Local Secret Scanning and Workspace Remediation

DotShield provides an offline inspection engine that scans target directories, git commit histories, and coding agent configuration files without transmitting data. The scanner targets credentials across Claude Code transcripts, environment configurations, and Cursor Model Context Protocol settings. Discovered secret values are never printed to terminal screens or logged in clear text during scan execution.

The automated fix command generates an explicit remediation plan before applying modifications to project files. Once confirmed, the command redacts exposed tokens within agent transcripts after creating an isolated local backup archive. It simultaneously appends identified secret paths to ignore files, configures Claude Code read denial rules, and lists all exposed credentials that developers should rotate immediately.

02Cross Platform Installation and Quick Setup

The software runs on macOS, Linux, and Windows systems across x64 and arm64 hardware architectures, requiring Node version 18 or higher for execution without prior installation: ``bash npm install -g dotshield@beta dotshield guard install --agent both dotshield guard mode enforce ``

Initial setup follows three sequential CLI commands that move a repository from discovery to active enforcement:

  1. Workspace inspection Run dotshield scan to locate credentials across directories, commit history, and agent files
  2. Automated remediation Run dotshield fix to redact transcripts and configure access deny rules after plan confirmation
  3. Hook activation Run dotshield guard install followed by dotshield guard mode enforce to establish runtime blocking

Note: Newly initialized Claude Code and Cursor terminal sessions detect and register installed guard hooks automatically upon launch. Sessions that are already active during installation do not inherit runtime protection dynamically and must be restarted manually. Developers can verify active configuration paths, operating modes, and log targets at any time using the guard status sub-command.

03Guard Hook Enforcement and Agent Restrictions

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

DotShield embeds runtime hooks directly into Claude Code and Cursor execution pipelines to monitor automated tool usage continuously. The guard subsystem intercepts attempted file reads involving secret paths, masks credentials detected in shell command outputs, and blocks sensitive prompts before submission. Additionally, the hook scrubs residual secrets from session transcripts whenever an agent session terminates.

The security engine differentiates between passive monitoring and active prevention across two distinct operational modes:

Operational ModeTelemetry and LoggingCredential Read ActionsShell Output and Prompts
watchRecords planned actions to local logPermits file access without blockingObserves tokens and prompts without interception
enforceRecords blocked events to local logDenies file reads matching secret signaturesMasks terminal text and halts sensitive prompts

Autonomous coding agents are strictly prohibited from modifying security configurations or bypassing runtime protections. DotShield explicitly denies execution requests whenever an agent attempts to execute allowlist commands, alter guard modes, or trigger guard uninstallation. This architectural boundary prevents compromised or misaligned language models from deactivating credential barriers during unattended task execution.

04Two Week Beta Evaluation and Telemetry

The structured public beta evaluation spans a two-week validation cycle designed to minimize false positives before teams enforce strict blocking. During the first week in watch mode, developers run standard workflows while executing the guard report command periodically to review prospective blocks. During the second week, teams switch to enforce mode to activate blocking across all detected credential access attempts.

When legitimate project files trigger protection, developers can whitelist items using a twelve-character fingerprint or explicit file path. Commands like allow fingerprint and allow path prevent repeated flags on test fixtures while recording false-positive metrics. Beta participants export diagnostic metrics using the guard report command with a fourteen-day window flag to generate standardized JSON telemetry.

05Binary Verification and Restrictive Licensing Terms

DotShield operates with an air-gapped security model that excludes network connectivity from operational code paths. All repository scans, rule verifications, and redactions execute strictly on local machine resources without transmitting data to remote endpoints. The single external network interaction occurs during initial package setup when the installer retrieves the compiled platform binary directly from official GitHub release assets.

The distributed npm package acts as a zero-dependency wrapper containing no custom installation scripts. On initial invocation, the wrapper downloads the matching binary release, validates its SHA-256 cryptographic hash against signed checksum files, and stores the executable in the user home directory. The wrapper revalidates the cryptographic checksum on every subsequent run, while runtime agent hooks invoke the verified binary directly without placing Node on the hook execution path.

DotShield provides version 0.1.0-beta under the DotShield Free Use Licence, permitting zero-cost deployment for commercial and workplace development. The proprietary agreement strictly prohibits redistributing binaries, publishing modified copies, reverse-engineering internal logic, or building competing products, marking a shift from the Apache-2.0 licence used during versions 0.1.0-beta.1 and 0.1.0-beta.2. Release repositories distribute pre-compiled binary packages exclusively, and source code remains private.

Frequently asked questions

How does DotShield protect API keys from AI coding assistants?

DotShield registers runtime hooks for Claude Code and Cursor that deny reads of secret files, mask credentials in command outputs, and stop prompts containing sensitive tokens. It also provides an offline scanner that identifies secrets in project folders, git history, and agent transcripts.

Can an AI agent disable DotShield guard hooks?

No, DotShield automatically denies attempts by AI agents to run allowlist, guard mode, or uninstallation commands. This prevents autonomous agents from switching off protection or overriding security controls during task execution.

Does DotShield transmit scanned repository data over the network?

No, DotShield operates without network code, keeping all scanned files, git history, and telemetry local to the developer machine. The only network request occurs during initial installation to download and verify the platform binary.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →