返回顶部
s

secret-scanner 密钥扫描器

Scans files, repos, and directories for leaked secrets — API keys, tokens, passwords, connection strings, private keys, and credentials. Detects 40+ secret patterns across all major cloud providers and services.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
655
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

secret-scanner

Secret Scanner

Security skill that scans code, config files, and repos for accidentally leaked secrets and credentials.

When to Use This Skill

Use this skill when the user:

  • - Asks to "check for leaked secrets" or "scan for API keys"
  • Wants to audit a repo or folder before committing or publishing
  • Says "are there any hardcoded passwords in this code?"
  • Asks to "find credentials" or "check for exposed tokens"
  • Wants pre-commit or pre-publish security checks
  • Mentions concern about accidentally checking in secrets

Capabilities

  • - Detect 40+ secret patterns including:
- AWS Access Keys, Secret Keys, Session Tokens - Azure Storage Keys, Connection Strings, SAS Tokens - GCP Service Account Keys, API Keys - GitHub / GitLab / Bitbucket Personal Access Tokens - OpenAI, Anthropic, Hugging Face API Keys - Slack Bot Tokens, Webhooks - Stripe, Twilio, SendGrid Keys - Database connection strings (MongoDB, PostgreSQL, MySQL, Redis) - SSH Private Keys, PEM/PFX Certificates - JWT Tokens, Bearer Tokens - Generic passwords in config files (password=, secret=, token=)
  • - Scan individual files, directories, or entire repos recursively
  • Ignore binary files, node_modules, .git, and other non-relevant paths
  • Output results as Markdown report or JSON
  • Provide severity ratings (Critical, High, Medium, Low)
  • Suggest remediation for each finding

How to Scan

Scan a directory

CODEBLOCK0

Scan with JSON output

CODEBLOCK1

Scan and save report

CODEBLOCK2

Within an Agent

CODEBLOCK3

Secret Patterns Detected

Cloud Provider Keys
ProviderSecrets Detected
AWSAccess Key ID (AKIA...), Secret Access Key, Session Token
Azure
Storage Account Key, Connection String, SAS Token, Client Secret |

| GCP | API Key (AIza...), Service Account JSON, OAuth Client Secret |

AI / LLM Keys
ServicePattern
OpenAIINLINECODE2 prefixed API keys
Anthropic
sk-ant- prefixed keys |

| Hugging Face | hf_ prefixed tokens | | Cohere | API keys in config |

Developer Platforms
PlatformSecrets Detected
GitHubINLINECODE5, gho_, ghu_, ghs_, ghr_ tokens
GitLab
glpat- tokens |

| Slack | xoxb-, xoxp-, xoxs- tokens, webhook URLs | | Stripe | sk_live_, sk_test_, rk_live_ keys | | Twilio | Account SID, Auth Token | | SendGrid | SG. prefixed API keys |

Databases & Infrastructure
TypePattern
MongoDBINLINECODE18 or mongodb+srv:// with credentials
PostgreSQL
postgresql:// with embedded password |

| MySQL | mysql:// with embedded password | | Redis | redis:// with password | | SSH | -----BEGIN (RSA\|EC\|OPENSSH) PRIVATE KEY----- | | Certificates | PEM, PFX, P12 with embedded keys |

Generic Patterns
PatternDescription
password=Hardcoded passwords in config/env files
secret=
Hardcoded secrets |

| token= | Hardcoded tokens | | Bearer | Bearer tokens in code | | Basic Auth | Base64-encoded basic auth headers | | JWT | eyJ prefixed JWT tokens | | High Entropy | Long random strings that look like secrets |

Severity Levels

SeverityDescriptionExamples
🔴 CriticalActive production credentialsAWS Secret Key, Private Keys, DB passwords
🟠 High
Service tokens with broad access | GitHub PAT, Slack Bot Token, Stripe Live Key | | 🟡 Medium | Keys that may be test/dev | Test API keys, example tokens | | 🟢 Low | Potential false positives | Generic password= in comments, placeholder values |

Files Scanned

Scans these file types by default:

  • - Source code: .py, .js, .ts, .java, .go, .rb, .php, .cs, INLINECODE33
  • Config: .json, .yaml, .yml, .toml, .ini, .cfg, INLINECODE40
  • Environment: .env, .env.local, INLINECODE43
  • Shell: .sh, .bash, .zsh, INLINECODE47
  • Docs: .md, INLINECODE49
  • Other: Dockerfile, docker-compose.yml, INLINECODE52

Ignored Paths

Automatically skips:

  • - node_modules/, vendor/, venv/, INLINECODE56
  • INLINECODE57, INLINECODE58
  • INLINECODE59, INLINECODE60
  • Binary files, images, compiled outputs
  • INLINECODE61, INLINECODE62

Remediation Guidance

When secrets are found, the skill recommends:

  1. 1. Rotate the secret immediately — assume it's compromised
  2. Remove from code — use environment variables or a secrets manager instead
  3. Add to .gitignore — prevent .env and credential files from being committed
  4. Use git-filter-repo — to remove secrets from git history
  5. Enable pre-commit hooks — to catch secrets before they're committed

Requirements

  • - Python 3.7+
  • No additional dependencies (uses Python standard library)

Entry Point

  • - CLI: INLINECODE64

Tags

#security #secrets #credentials #api-keys #tokens #passwords #scanner #audit #pre-commit #leak-detection #cloud #aws #azure #gcp #devops

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 credential-scanner-1776419988 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 credential-scanner-1776419988 技能

通过命令行安装

skillhub install credential-scanner-1776419988

下载

⬇ 下载 secret-scanner v0.1.0(免费)

文件大小: 11.16 KB | 发布时间: 2026-4-17 19:20

v0.1.0 最新 2026-4-17 19:20
Initial release

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部