Skip to main content

Add your description here

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, and private keys—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 bad security practices (like eval(), pickle.load(), or disabling SSL verification), making it more than just a 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 two-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.

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.
  • 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, Azure Storage Keys (opt-in).
  • AI/ML: OpenAI, Anthropic, Gemini, HuggingFace, Replicate.
  • Services: Stripe, Slack, Twilio, Salesforce, Facebook.
  • Security Best Practices:
    • Unsafe Check: eval(), exec()
    • Unsafe Deserialization: pickle.load()
    • Insecure SSL: verify=False
    • Weak Hashing: MD5
    • Insecure Network Binding: 0.0.0.0
  • Generic: PEM Private Keys, 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.1.3.tar.gz (8.8 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.1.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: helpfulgremlin-0.1.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.1.3.tar.gz
Algorithm Hash digest
SHA256 9271948632dda75c2081f171dd66cb533f941cfbcae533925c4c76ab1468c71c
MD5 ec8b6e05772e56db1c2202a54d265394
BLAKE2b-256 5edbbc36f6bba24392bbb6ae57b9437fe23f0daebf3bbb3b0f2209c0c4a7e1db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: helpfulgremlin-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e00ed81590c69ac35928b6387f71b4380ac9b76507c91322837c27f2d074f1
MD5 6a5a48f273de98d547a041b2ba2de814
BLAKE2b-256 a05be9d5cb3b89d96493a7a79e671a7b41e87af29ca1e2d48b0609d734d70c71

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