blind-env
Keep AI agents out of your .env, config YAML, and Helm values files.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/yunst047--blind-env-skill)HTML
<a href="/listings/yunst047--blind-env-skill"><img src="/api/listings/yunst047--blind-env-skill/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
`node` (16.7 or later) has to be on your PATH. Without it the hook stays quiet and the skill still works as guidance.
Claude Code
/plugin marketplace add yunst047/blind-env-skill /plugin install blind-env@blind-env
Or from a shell:
claude plugin marketplace add yunst047/blind-env-skill claude plugin install blind-env@blind-env
Start a new session afterwards. Hooks load when a session starts.
Other agents
[`AGENTS.md`](AGENTS.md) is the portable rule set. Codex, OpenCode, and other agents that read `AGENTS.md` pick it up automatically. For Cursor, Windsurf, Cline, or Copilot, paste it into that tool's rules file. On this path you get the rules only, without enforcement.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 17 lines
- {
- "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
- "name": "blind-env",
- "description": "Keep AI agents out of your .env, config YAML, and Helm values files.",
- "owner": {
- "name": "Yunst",
- "url": "https://github.com/yunst047"
- },
- "plugins": [
- {
- "name": "blind-env",
- "description": "Never read env / config YAML / Helm values — skill + enforcing PreToolUse guard.",
- "source": "./",
- "category": "security"
- }
- ]
- }
README.md · README · 126 lines
- <h1 align="center">blind-env</h1>
- <p align="center"><em>Your agent can see the code, but not the secrets.</em></p>
- <p align="center">
- <img src="https://img.shields.io/badge/claude--code-plugin-6b4fbb?style=flat-square" alt="Claude Code plugin">
- <img src="https://img.shields.io/badge/license-MIT-111111?style=flat-square" alt="MIT license">
- </p>
- ---
- AI coding agents love to `cat .env` "just to check", or to grep the whole repo for
- `password` and paste `charts/api/values-prod.yaml` into the transcript. **blind-env**
- stops that. The plugin has two parts:
- - **A skill**, [`skills/blind-env/SKILL.md`](skills/blind-env/SKILL.md). It sets the
- behaviour: work from variable *names*, ask the user for a single non-secret value,
- and hand edits back to the user.
- - **A `PreToolUse` guard**, [`hooks/blind-env-guard.js`](hooks/blind-env-guard.js). It
- enforces the skill by denying `Read`, `Edit`, `Write`, `MultiEdit`, `NotebookEdit`,
- `Grep`, `Bash`, and `PowerShell` calls that would touch a protected file.
- ## What's protected
- | Kind | Patterns |
- |------|----------|
- | Env files | `.env`, `.env.*`, `*.env`, `.envrc` |
- | Config YAML | `*.y(a)ml` whose name contains a config word: `config`, `settings`, `secret(s)`, `credential(s)`, `application`, `appsettings`, `environment`, `env`, `vault`, `values`, `helmfile`, plus `app.yaml` |
- | Helm / config dirs | any YAML under `helm/`, `.helm/`, `charts/`, `config/`, `configs/`, `secrets/`, `environments/`, `env/`, `envs/` |
- | Kube credentials | `kubeconfig`, `~/.kube/config` |
- **Still readable:** `.env.example`, `.env.sample`, `.env.template`, `.env.dist`,
- `.env.schema`, YAML under `.github/`, `.circleci/`, `.gitlab/`, and `node_modules/`,
- and `.pre-commit-config.yaml`. Ordinary YAML such as `docker-compose.yml`,
- `openapi.yaml`, and `pnpm-lock.yaml` is readable too.
- ### How the guard decides
- | Tool call | Blocked when |
- |-----------|--------------|
- | `Read`, `Edit`, `Write`, `MultiEdit`, `NotebookEdit` | the target path is protected |
- | `Bash`, `PowerShell` | any token in the command names a protected file (`cat .env`, `Get-Content values.yaml`, `git show HEAD:.env`, `cat .env*`) |
- | `Bash`, `PowerShell` recursive search (`rg`, `grep -r`, `git grep`, `ag`, `findstr /s`, `… -Recurse \| Select-String`) | protected files exist under the search root and the search isn't narrowed with `-g`, `--glob`, `--include`, `-t`, or `--type` |
- | `Grep` | the `path` or `glob` targets a protected file, **or** `output_mode: "content"` runs over a directory that contains protected files without a `type` or positive `glob` |
- | `Edit` / `Write` on `.blind-env.json`, or a shell command that names it | always, so the agent can't switch the guard off |
- A denied call returns a reason telling the agent what to do instead. A `Grep` call in
- the default `files_with_matches` mode is allowed, because it shows only file names.
- ## Install
- `node` (16.7 or later) has to be on your PATH. Without it the hook stays quiet and the
- skill still works as guidance.
- ### Claude Code
- ```
- /plugin marketplace add yunst047/blind-env-skill
- /plugin install blind-env@blind-env
- ```
- Or from a shell:
- ```bash
- claude plugin marketplace add yunst047/blind-env-skill
- claude plugin install blind-env@blind-env
- ```
- Start a new session afterwards. Hooks load when a session starts.
- ### Other agents
- [`AGENTS.md`](AGENTS.md) is the portable rule set. Codex, OpenCode, and other agents
- that read `AGENTS.md` pick it up automatically. For Cursor, Windsurf, Cline, or Copilot,
- paste it into that tool's rules file. On this path you get the rules only, without
- enforcement.
- ## Configure
- Create `.blind-env.json` at the project root. Only you edit it; the guard blocks the
- agent from changing it.
- ```json
- {
- "allow": ["config/locales/*.yml", "docs/**/*.yaml"],
- "block": ["*.properties", "**/terraform.tfvars"],
- "strict": false
- }
- ```
- | Key / env var | Effect |
- |---------------|--------|
- | `allow` | Globs that stay readable, even when a built-in rule would block them. |
- | `block` | Extra globs to protect. A glob with a `/` is matched against the project-relative path, and any other glob against the file name. |
- | `strict: true` or `BLIND_ENV=strict` or `BLIND_ENV_STRICT=1` | Block **every** `.yaml` / `.yml` file. |
- | `off: true` or `BLIND_ENV=off` | Turn the guard off. |
- ### Defense in depth
- Claude Code's built-in deny rules apply to its file tools as well. You can add them to
- `.claude/settings.json` alongside the guard:
- ```json
- {
- "permissions": {
- "deny": ["Read(**/.env)", "Read(**/.env.*)", "Read(**/values*.yaml)", "Read(**/charts/**)"]
- }
- }
- ```
- ## Limits
- This is a guard, not a sandbox. A command that reaches a file without naming it
- (`cat *`, `find . -exec cat {} +`, or a script that opens it) can slip past. The guard
- fails open: if it hits malformed input it allows the call. It doesn't replace
- `.gitignore` hygiene, secret scanning, or a secrets manager.
- ## Develop
- ```bash
- npm test # node:test, no dependencies
- ```
- ## License
- [MIT](LICENSE)
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.