ggshield-scanner
Detect 500+ types of hardcoded secrets (API keys, credentials, tokens) before they leak into git. Wraps GitGuardian's ggshield CLI.
What this skill does
# 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
1. **ggshield CLI**: Install via pip
```bash
pip install ggshield>=1.15.0
```
2. **GitGuardian API Key**: Required for secret detection
- Sign up: https://dashboard.gitguardian.com (free)
- Generate API key in Settings
- Set environment variable:
```bash
export GITGUARDIAN_API_KEY="your-api-key-here"
```
3. **Python 3.8+**: Required by ggshield
### Install Skill
```bash
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:
```bash
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:
```yaml
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:
1. **Entropy-based detection**: Identifies high-entropy strings (random tokens)
2. **Pattern matching**: Looks for known secret formats (AWS key prefixes, etc.)
3. **Public CVEs**: Cross-references disclosed secrets
4. **Machine learning**: Trained on leaked secrets database
## Troubleshooting
### "ggshield: command not found"
ggshield is not installed or not in your PATH.
**Fix**:
```bash
pip install ggshield
which ggshield # Should return a path
```
### "GITGUARDIAN_API_KEY not found"
The environment variable is not set.
**Fix**:
```bash
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**:
```bash
# 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**:
```bash
# 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):
```bash
# 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:
```yaml
# .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:
```bash
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
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.