Skip to main content

Rapid sanity checking for Vibe Coded Projects

Project description

👾 helpfulGremlin

Sanity check your vibes before you git push.

Build Status

I built helpfulGremlin because I wanted a lightweight, zero-config CLI utility to scan my codebase for sensitive artifacts—API keys, secrets, tokens, private keys, and now AI-agent configuration leaks—before they are accidentally exposed. It's designed for "vibe-coding" where velocity is high, acting as a friendly guardrail.

Recently, I extended it to also check for AI-agent-era leak surfaces (like MCP configs, .env files, npm/PyPI auth files, and pasted bearer headers) plus bad security practices (like eval(), pickle.load(), or disabling SSL verification), making it more than just a generic secret scanner.

🚀 Quick Start

Run it instantly using uv (no installation required):

# Run in the current directory
uvx helpfulGremlin

Or install it globally:

uv tool install helpfulGremlin
helpfulGremlin .

🛠 Usage

# Scan the current directory
helpfulGremlin

# Scan a specific directory or file
helpfulGremlin ./src/my_script.py

# Verbose mode (see every file checked)
helpfulGremlin . --verbose

# Run with multiple worker processes (for large repos)
helpfulGremlin . --workers 4

🏗 Architecture & Design Decisions

1. Python & uv First

I chose Python for its rich ecosystem of text processing and regex libraries. Typically, Python tools are hard to distribute, but with uv, helpfulGremlin can be run ephemerally (uvx) without messing up your system python.

2. Hybrid Detection Engine

I implemented a three-layer detection strategy:

  • Layer 1: Regex Signatures: Fast pattern matching for known secrets (AWS, OpenAI, Stripe, etc.). Patterns are externalized in src/helpfulgremlin/patterns.yaml.
  • Layer 2: Entropy Analysis: Uses Shannon Entropy to detect high-randomness strings (like passwords or unknown API keys) that don't match specific regexes. This catches weird custom secrets others miss.
  • Layer 3: Agent Config Analysis: Parses local MCP/agent JSON configs when possible and inspects env, header, command, arg, and URL values for hardcoded credentials.

3. Smart Context Awareness

I designed the scanner to be intelligent about where it looks:

  • Context-Aware Scanning: Security checks are scoped to file types (e.g., Python-specific checks like eval() only run on .py files). This keeps performance high.
  • Agent-Aware Defaults: Warns on risky local config files such as .mcp.json, .claude/settings.json, .cursor/mcp.json, .env.local, .npmrc, .pypirc, and cloud credential JSON files.
  • Gitignore Support: Automatically parses your .gitignore to avoid scanning node_modules, venv, etc.
  • Binary Skipping: Detects and skips binary files to save CPU.
  • Large File Protection: Skipping files > 5MB to prevent memory exhaustion.
  • Remediation: It doesn't just say "Error"; it suggests how to fix it (e.g., "Move this hardcoded key to an environment variable").

4. Modern UX (textual / rich)

I used the rich library to provide beautiful, emoji-enriched terminal output, progress bars, and tables. Security tools shouldn't be boring 1990s textual walls.

🕵️ Detected Patterns

helpfulGremlin currently detects:

  • Cloud Providers: AWS (Access/Secret Keys), Google Cloud API Keys, Google Cloud Service Accounts, Azure Storage Keys (opt-in).
  • Databases: PostgreSQL, MySQL, MongoDB, and Redis URIs.
  • AI/ML: OpenAI, Anthropic, Gemini, HuggingFace, Replicate.
  • Services: Stripe, Slack, Twilio, Salesforce, Facebook.
  • AI Agent Configs:
    • MCP project configs: .mcp.json, mcp.json
    • Agent/editor configs: .claude/settings.json, .cursor/mcp.json, claude_desktop_config.json
    • Dangerous local credential files: .env*, .npmrc, .pypirc, .netrc, cloud credential JSON
    • Pasted bearer authorization headers and hardcoded MCP env/header values
  • Security Best Practices:
    • Unsafe Checks: eval(), exec(), shell=True
    • Unsafe Deserialization: pickle.load()
    • Insecure SSL/TLS: verify=False, Node NODE_TLS_REJECT_UNAUTHORIZED
    • Insecure Environments: Flask/Django debug=True, Docker USER root
    • Web Risks: dangerouslySetInnerHTML (XSS), formatted SQL queries (SQLi)
    • Weak Hashing: MD5
    • Insecure Network Binding: 0.0.0.0
  • Generic: PEM Private Keys, SSH Private Keys, JWT Tokens, Generic "api_key" variable assignments.
  • Unknowns: High-entropy strings (> 4.2 bits of randomness).

⚙️ Configuration

You can customize the detection rules by editing the patterns.yaml file inside the package.

📦 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helpfulgremlin-0.2.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helpfulgremlin-0.2.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file helpfulgremlin-0.2.0.tar.gz.

File metadata

  • Download URL: helpfulgremlin-0.2.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for helpfulgremlin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 62cfd2302c4140327a4a6a93c75ef25adb7735cf72f8c78c7c672e9ec6ef6ad5
MD5 fc8d78d60bc2bbf030bc459773e51564
BLAKE2b-256 442a6e096e005e801297d142a407317aa59212c7b53fe649ced3b375df4359a9

See more details on using hashes here.

File details

Details for the file helpfulgremlin-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: helpfulgremlin-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for helpfulgremlin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c940ab35f05108f003e3075bbc43f07c4fe5d007422bb6dfa3176d2c435370
MD5 3443027e109b0532b2928eb6e89c2c4b
BLAKE2b-256 441279933c481787b14cf90cae1858b294b60f2d7f6f40f7a2c2549f344aba10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page