Skip to content
Back to search

blind-env

MarketplaceWorks with Claude CodeGitHub

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.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yunst047--blind-env-skill/badge.svg)](/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
  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "blind-env",
  4. "description": "Keep AI agents out of your .env, config YAML, and Helm values files.",
  5. "owner": {
  6. "name": "Yunst",
  7. "url": "https://github.com/yunst047"
  8. },
  9. "plugins": [
  10. {
  11. "name": "blind-env",
  12. "description": "Never read env / config YAML / Helm values — skill + enforcing PreToolUse guard.",
  13. "source": "./",
  14. "category": "security"
  15. }
  16. ]
  17. }
README.md · README · 126 lines
  1. <h1 align="center">blind-env</h1>
  2. <p align="center"><em>Your agent can see the code, but not the secrets.</em></p>
  3. <p align="center">
  4. <img src="https://img.shields.io/badge/claude--code-plugin-6b4fbb?style=flat-square" alt="Claude Code plugin">
  5. <img src="https://img.shields.io/badge/license-MIT-111111?style=flat-square" alt="MIT license">
  6. </p>
  7. ---
  8. AI coding agents love to `cat .env` "just to check", or to grep the whole repo for
  9. `password` and paste `charts/api/values-prod.yaml` into the transcript. **blind-env**
  10. stops that. The plugin has two parts:
  11. - **A skill**, [`skills/blind-env/SKILL.md`](skills/blind-env/SKILL.md). It sets the
  12. behaviour: work from variable *names*, ask the user for a single non-secret value,
  13. and hand edits back to the user.
  14. - **A `PreToolUse` guard**, [`hooks/blind-env-guard.js`](hooks/blind-env-guard.js). It
  15. enforces the skill by denying `Read`, `Edit`, `Write`, `MultiEdit`, `NotebookEdit`,
  16. `Grep`, `Bash`, and `PowerShell` calls that would touch a protected file.
  17. ## What's protected
  18. | Kind | Patterns |
  19. |------|----------|
  20. | Env files | `.env`, `.env.*`, `*.env`, `.envrc` |
  21. | 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` |
  22. | Helm / config dirs | any YAML under `helm/`, `.helm/`, `charts/`, `config/`, `configs/`, `secrets/`, `environments/`, `env/`, `envs/` |
  23. | Kube credentials | `kubeconfig`, `~/.kube/config` |
  24. **Still readable:** `.env.example`, `.env.sample`, `.env.template`, `.env.dist`,
  25. `.env.schema`, YAML under `.github/`, `.circleci/`, `.gitlab/`, and `node_modules/`,
  26. and `.pre-commit-config.yaml`. Ordinary YAML such as `docker-compose.yml`,
  27. `openapi.yaml`, and `pnpm-lock.yaml` is readable too.
  28. ### How the guard decides
  29. | Tool call | Blocked when |
  30. |-----------|--------------|
  31. | `Read`, `Edit`, `Write`, `MultiEdit`, `NotebookEdit` | the target path is protected |
  32. | `Bash`, `PowerShell` | any token in the command names a protected file (`cat .env`, `Get-Content values.yaml`, `git show HEAD:.env`, `cat .env*`) |
  33. | `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` |
  34. | `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` |
  35. | `Edit` / `Write` on `.blind-env.json`, or a shell command that names it | always, so the agent can't switch the guard off |
  36. A denied call returns a reason telling the agent what to do instead. A `Grep` call in
  37. the default `files_with_matches` mode is allowed, because it shows only file names.
  38. ## Install
  39. `node` (16.7 or later) has to be on your PATH. Without it the hook stays quiet and the
  40. skill still works as guidance.
  41. ### Claude Code
  42. ```
  43. /plugin marketplace add yunst047/blind-env-skill
  44. /plugin install blind-env@blind-env
  45. ```
  46. Or from a shell:
  47. ```bash
  48. claude plugin marketplace add yunst047/blind-env-skill
  49. claude plugin install blind-env@blind-env
  50. ```
  51. Start a new session afterwards. Hooks load when a session starts.
  52. ### Other agents
  53. [`AGENTS.md`](AGENTS.md) is the portable rule set. Codex, OpenCode, and other agents
  54. that read `AGENTS.md` pick it up automatically. For Cursor, Windsurf, Cline, or Copilot,
  55. paste it into that tool's rules file. On this path you get the rules only, without
  56. enforcement.
  57. ## Configure
  58. Create `.blind-env.json` at the project root. Only you edit it; the guard blocks the
  59. agent from changing it.
  60. ```json
  61. {
  62. "allow": ["config/locales/*.yml", "docs/**/*.yaml"],
  63. "block": ["*.properties", "**/terraform.tfvars"],
  64. "strict": false
  65. }
  66. ```
  67. | Key / env var | Effect |
  68. |---------------|--------|
  69. | `allow` | Globs that stay readable, even when a built-in rule would block them. |
  70. | `block` | Extra globs to protect. A glob with a `/` is matched against the project-relative path, and any other glob against the file name. |
  71. | `strict: true` or `BLIND_ENV=strict` or `BLIND_ENV_STRICT=1` | Block **every** `.yaml` / `.yml` file. |
  72. | `off: true` or `BLIND_ENV=off` | Turn the guard off. |
  73. ### Defense in depth
  74. Claude Code's built-in deny rules apply to its file tools as well. You can add them to
  75. `.claude/settings.json` alongside the guard:
  76. ```json
  77. {
  78. "permissions": {
  79. "deny": ["Read(**/.env)", "Read(**/.env.*)", "Read(**/values*.yaml)", "Read(**/charts/**)"]
  80. }
  81. }
  82. ```
  83. ## Limits
  84. This is a guard, not a sandbox. A command that reaches a file without naming it
  85. (`cat *`, `find . -exec cat {} +`, or a script that opens it) can slip past. The guard
  86. fails open: if it hits malformed input it allows the call. It doesn't replace
  87. `.gitignore` hygiene, secret scanning, or a secrets manager.
  88. ## Develop
  89. ```bash
  90. npm test # node:test, no dependencies
  91. ```
  92. ## License
  93. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.