ggshield-scanner
Detect 500+ types of hardcoded secrets (API keys, credentials, tokens) before they leak into git. Wraps GitGuardian's ggshield CLI.
Install
mkdir -p .claude/skills/ggshield-scanner && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8226" && unzip -o skill.zip -d .claude/skills/ggshield-scanner && rm skill.zipInstalls to .claude/skills/ggshield-scanner
About this skill
ggshield Secret Scanner
Overview
ggshield is a CLI tool that detects hardcoded secrets in your codebase. This Moltbot skill brings secret scanning capabilities to your AI agent.
What Are "Secrets"?
Secrets are sensitive credentials that should NEVER be committed to version control:
- AWS Access Keys, GCP Service Accounts, Azure credentials
- API tokens (GitHub, Slack, Stripe, etc.)
- Database passwords and connection strings
- Private encryption keys and certificates
- OAuth tokens and refresh tokens
- PayPal/Stripe API keys
- Email server credentials
Why This Matters
A single leaked secret can:
- 🔓 Compromise your infrastructure
- 💸 Incur massive cloud bills (attackers abuse your AWS account)
- 📊 Expose customer data (GDPR/CCPA violation)
- 🚨 Trigger security incidents and audits
ggshield catches these before they reach your repository.
Features
Commands Available
1. scan-repo
Scans an entire git repository for secrets (including history).
@clawd scan-repo /path/to/my/project
Output:
🔍 Scanning repository...
✅ Repository clean: 1,234 files scanned, 0 secrets found
Output on detection:
❌ Found 2 secrets:
- AWS Access Key ID in config/prod.py:42
- Slack API token in .env.backup:8
Use 'ggshield secret ignore --last-found' to ignore, or remove them.
2. scan-file
Scans a single file for secrets.
@clawd scan-file /path/to/config.py
3. scan-staged
Scans only staged git changes (useful pre-commit check).
@clawd scan-staged
This runs on your git add-ed changes only (fast!).
4. install-hooks
Installs ggshield as a git pre-commit hook.
@clawd install-hooks
After this, every commit is automatically scanned:
$ git commit -m "Add config"
🔍 Running ggshield pre-commit hook...
❌ Secrets detected! Commit blocked.
Remove the secrets and try again.
5. scan-docker
Scans Docker images for secrets in their layers.
@clawd scan-docker my-app:latest
Installation
Prerequisites
-
ggshield CLI: Install via pip
pip install ggshield>=1.15.0 -
GitGuardian API Key: Required for secret detection
- Sign up: https://dashboard.gitguardian.com (free)
- Generate API key in Settings
- Set environment variable:
export GITGUARDIAN_API_KEY="your-api-key-here"
- Python 3.8+: Required by ggshield
Install Skill
clawdhub install ggshield-scanner
The skill is now available in your Moltbot workspace.
In Your Moltbot Workspace
Start a new Moltbot session to pick up the skill:
moltbot start
# or via messaging: @clawd list-skills
Usage Patterns
Pattern 1: Before Pushing (Security Check)
Dev: @clawd scan-repo .
Moltbot: ✅ Repository clean. All good to push!
Dev: git push
Pattern 2: Audit Existing Repo
Dev: @clawd scan-repo ~/my-old-project
Moltbot: ❌ Found 5 secrets in history!
- AWS keys in config/secrets.json
- Database password in docker-compose.yml
- Slack webhook in .env.example
Moltbot: Recommendation: Rotate these credentials immediately.
Consider using git-filter-repo to remove from history.
Pattern 3: Pre-Commit Enforcement
Dev: @clawd install-hooks
Moltbot: ✅ Installed pre-commit hook
Dev: echo "SECRET_TOKEN=xyz" > config.py
Dev: git add config.py
Dev: git commit -m "Add config"
Moltbot: ❌ Pre-commit hook detected secret!
Dev: rm config.py && git reset
Dev: (add config to .gitignore and to environment variables instead)
Dev: git commit -m "Add config" # Now works!
Pattern 4: Docker Image Security
Dev: @clawd scan-docker my-api:v1.2.3
Moltbot: ✅ Docker image clean
Configuration
Environment Variables
These are required for the skill to work:
| Variable | Value | Where to Set |
|---|---|---|
GITGUARDIAN_API_KEY | Your API key from https://dashboard.gitguardian.com | ~/.bashrc or ~/.zshrc |
GITGUARDIAN_ENDPOINT | https://api.gitguardian.com (default, optional) | Usually not needed |
Optional ggshield Config
Create ~/.gitguardian/.gitguardian.yml for persistent settings:
verbose: false
output-format: json
exit-code: true
For details: https://docs.gitguardian.com/ggshield-docs/
Privacy & Security
What Data is Sent to GitGuardian?
✅ ONLY metadata is sent:
- Hash of the secret pattern (not the actual secret)
- File path (relative path only)
- Line number
❌ NEVER sent:
- Your actual secrets or credentials
- File contents
- Private keys
- Credentials
Reference: GitGuardian Enterprise customers can use on-premise scanning with no data sent anywhere.
How Secrets Are Detected
ggshield uses:
- Entropy-based detection: Identifies high-entropy strings (random tokens)
- Pattern matching: Looks for known secret formats (AWS key prefixes, etc.)
- Public CVEs: Cross-references disclosed secrets
- Machine learning: Trained on leaked secrets database
Troubleshooting
"ggshield: command not found"
ggshield is not installed or not in your PATH.
Fix:
pip install ggshield
which ggshield # Should return a path
"GITGUARDIAN_API_KEY not found"
The environment variable is not set.
Fix:
export GITGUARDIAN_API_KEY="your-key"
# For persistence, add to ~/.bashrc or ~/.zshrc:
echo 'export GITGUARDIAN_API_KEY="your-key"' >> ~/.bashrc
source ~/.bashrc
"401 Unauthorized"
API key is invalid or expired.
Fix:
# Test the API key
ggshield auth status
# If invalid, regenerate at https://dashboard.gitguardian.com → API Tokens
# Then: export GITGUARDIAN_API_KEY="new-key"
"Slow on large repositories"
Scanning a 50GB monorepo takes time. ggshield is doing a lot of work.
Workaround:
# Scan only staged changes (faster):
@clawd scan-staged
# Or specify a subdirectory:
@clawd scan-file ./app/config.py
Advanced Topics
Ignoring False Positives
Sometimes ggshield flags a string that's NOT a secret (e.g., a test key):
# Ignore the last secret found
ggshield secret ignore --last-found
# Ignore all in a file
ggshield secret ignore --path ./config-example.py
This creates .gitguardian/config.json with ignore rules.
Integrating with CI/CD
You can add secret scanning to GitHub Actions / GitLab CI:
# .github/workflows/secret-scan.yml
name: Secret Scan
on: [push]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install ggshield
- run: ggshield secret scan repo .
env:
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
Enterprise: On-Premise Scanning
If your company uses GitGuardian Enterprise, you can scan without sending data to the cloud:
export GITGUARDIAN_ENDPOINT="https://your-instance.gitguardian.com"
export GITGUARDIAN_API_KEY="your-enterprise-key"
Related Resources
- ggshield Documentation: https://docs.gitguardian.com/ggshield-docs/
- GitGuardian Dashboard: https://dashboard.gitguardian.com (view all secrets found)
- Moltbot Skills: https://docs.molt.bot/tools/clawdhub
- Secret Management Best Practices: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html
Support
- Bug reports: https://github.com/GitGuardian/ggshield-skill/issues
- Questions: Open an issue or comment on ClawdHub
- ggshield issues: https://github.com/GitGuardian/ggshield/issues
License
MIT License - See LICENSE file
Contributors
- GitGuardian Team
- [Your contributions welcome!]
Version: 1.0.0 Last updated: January 2026 Maintainer: GitGuardian
More by openclaw
View all skills by openclaw →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversUnlock seamless Salesforce org management with the secure, flexible Salesforce DX MCP Server. Streamline workflows and b
Analyze Python, Go, and TypeScript code locally to automatically generate IAM policies and AWS IAM permissions for least
GitGuardian MCP Server: auto secret scanning, secrets detection, honeytokens, and remediation for secrets management and
Use our Security Scanner as a website virus scanner to detect site scanner virus threats, vulnerabilities, and exposed s
Security Scanner analyzes code repositories to find exposed secrets, vulnerabilities, dependency flaws and misconfigurat
MCP server for Ghidra reverse engineering. Enables AI assistants to decompile binaries, analyze functions, rename variab
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.