⌘

Env Shield

v2.0.1πŸ›‘οΈTier 1 Security AuditedCLI v2.1.287+ Verified

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

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;
  });
}
Security Audit99/100
Network EgressNone (Zero Socket Egress)
Filesystem ScopeBounded to Workspace
Credential Exposure0 Leaks Detected
Sandbox IsolationHost User Privilege

Technical Specifications

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