⌘

Env Shield

v2.0.1AST Scan: 0 CriticalSource PublicCLI v2.1.287+ Tested

Automatic API key, SSH credential, and secret redaction proxy for terminal outputs and tool requests.

@vault-sec•★2,750 stars•↓12,400 active installs•MIT License
View Source ↗
⚡Installation Specifier
$/plugin install env-shield@marketplace
ℹUninstall anytime:claude plugin uninstall env-shield@marketplace

Problem Solved & Architectural Motivation

Intercepts process stdout and tool payloads, automatically masking OpenAI, AWS, Stripe, Anthropic, and GitHub secrets with ephemeral placeholders to prevent leaks into context or logs.

Before Execution

Zero-Time AST Interception

Evaluates tool payloads prior to kernel fork.

Scoring Model

0-100 Impact Index

Weighted heuristic scoring: files touched, git dirty state, env scope.

Non-Intrusive

Native CLI Hook

Zero proxy daemon required; hooks straight into Claude tool calls.

Lifecycle Architecture & Hook Flow

POSIX Event Engine
Step 01
Claude Plan
Prompt Inference
→
Step 02
Tool Call
tool.call Payload
→
HOOK INTERCEPT
env-shield
<18ms Heuristic
→
Step 04
OS Execution
Kernel Fork

Manifest Schema (plugin.json)

{
  "name": "env-shield",
  "version": "2.0.1"
}

Hook Implementation (register.js)

TypeScript SDK
export default function shield(hook) {
  const SECRET_PATTERNS = [/sk-[a-zA-Z0-9]{32,}/g, /ghp_[a-zA-Z0-9]{36}/g];
  hook.on('io.stdout', (str) => {
    let sanitized = str;
    for (const pat of SECRET_PATTERNS) sanitized = sanitized.replace(pat, '[REDACTED_SECRET]');
    return sanitized;
  });
}
Static Security AuditTested commit e4b91f2
0 Critical
SubprocessesClean (No Exec)
Dynamic Code (eval)Clean (0 eval)
Credential ExposureClean (0 leaks)
Network EgressZero Socket Egress
Filesystem ScopeWorkspace Bound
Read 6-Point Audit Methodology ↗

Static heuristic checks only. Not a formal commercial certification or warranty. Review source before installing.

Technical Specifications

Min CLI Versionv2.1.287+
Categorytool-guards
Runtime Overhead< 18ms AST
LicenseMIT
Mod Publisher