Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ggshield-scanner

БесплатноЗапускает вложенные скриптыНе проверен

Detect 500+ types of hardcoded secrets (API keys, credentials, tokens) before they leak into git. Wraps GitGuardian's ggshield CLI.

sundial-orgот sundial-org★ 676 звёзд на GitHub

Об этом скилле

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

    pip install ggshield>=1.15.0
    
  2. GitGuardian API Key: Required for secret detection

export GITGUARDIAN_API_KEY="your-api-key-here"
  1. 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:

  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. **M
Полный SKILL.md на GitHub

Установить ggshield-scanner в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdggshield_skill.pypyproject.toml

FAQ

Что делает скилл ggshield-scanner?

Detect 500+ types of hardcoded secrets (API keys, credentials, tokens) before they leak into git. Wraps GitGuardian's ggshield CLI.

Как установить скилл ggshield-scanner?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ggshield-scanner запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ggshield-scanner с