# Send Git Secrets Scanner to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "git-secrets-scanner",
    "name": "Git Secrets Scanner",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/guohongbin-git/git-secrets-scanner",
    "canonicalUrl": "https://clawhub.ai/guohongbin-git/git-secrets-scanner",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/git-secrets-scanner",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=git-secrets-scanner",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "git-secrets-scanner",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T16:35:20.475Z",
      "expiresAt": "2026-05-10T16:35:20.475Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=git-secrets-scanner",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=git-secrets-scanner",
        "contentDisposition": "attachment; filename=\"git-secrets-scanner-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "git-secrets-scanner"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/git-secrets-scanner"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/git-secrets-scanner",
    "downloadUrl": "https://openagent3.xyz/downloads/git-secrets-scanner",
    "agentUrl": "https://openagent3.xyz/skills/git-secrets-scanner/agent",
    "manifestUrl": "https://openagent3.xyz/skills/git-secrets-scanner/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/git-secrets-scanner/agent.md"
  }
}
```
## Documentation

### Git 安全扫描器

检查提交中的敏感信息泄露。

### 工具对比

工具Stars特点Gitleaks24,958最流行，Go 编写，快速TruffleHog24,612验证 secrets，支持多种格式git-secrets13,173AWS 官方，pre-commit hook

### Gitleaks（推荐）

# macOS
brew install gitleaks

# Linux
# 从 https://github.com/gitleaks/gitleaks/releases 下载

# 或使用 Go
go install github.com/gitleaks/gitleaks/v8@latest

### TruffleHog

# macOS
brew install trufflehog

# Linux
# 从 https://github.com/trufflesecurity/trufflehog/releases 下载

# 或使用 Docker
docker pull trufflesecurity/trufflehog:latest

### git-secrets

# macOS
brew install git-secrets

# Linux
git clone https://github.com/awslabs/git-secrets.git
cd git-secrets
sudo make install

### 1. 扫描当前仓库

# Gitleaks
gitleaks detect --source . -v

# TruffleHog
trufflehog git file://. --only-verified

# git-secrets（需要先设置 hook）
git secrets --scan-history

### 2. 扫描特定提交

# Gitleaks
gitleaks detect --source . --log-opts="HEAD~1..HEAD"

# TruffleHog
trufflehog git file://. --commit=HEAD

### 3. 扫描所有历史

# Gitleaks
gitleaks detect --source . --log-opts="--all"

# TruffleHog
trufflehog git file://. --no-deletion

### 4. 设置 pre-commit hook

# git-secrets
cd your-repo
git secrets --install
git secrets --register-aws

### 5. CI/CD 集成

# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]

jobs:
  gitleaks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: gitleaks/gitleaks-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

### API Keys

AWS Access Keys
GitHub Tokens
Slack Tokens
Stripe Keys
Moltbook API Keys ✨

### 密码

数据库密码
SMTP 密码
SSH 密钥

### Token

OAuth Tokens
JWT Tokens
Bearer Tokens

### 其他

私钥
证书
.env 文件

### 输出示例

Finding:     moltbook_sk_jX64MWE_yirqMSihBqb2B7slL64EygBt
Secret:      moltbook_sk_jX64MWE_yirqMSihBqb2B7slL64EygBt
RuleID:      generic-api-key
Entropy:     4.562345
File:        memory/moltbook-art-of-focus-post.md
Line:        45
Commit:      abc1234
Author:      user@example.com
Date:        2026-02-19T03:11:00Z
Fingerprint: abc123...

### 1. 提交前扫描

# 添加到 .git/hooks/pre-commit
#!/bin/bash
gitleaks protect --staged

### 2. 定期扫描

# 每周扫描
crontab -e
0 0 * * 0 cd /path/to/repo && gitleaks detect --source .

### 3. 扫描多个仓库

#!/bin/bash
for repo in ~/projects/*; do
  echo "Scanning $repo..."
  gitleaks detect --source "$repo" -v
done

### 修复泄露的 Secret

如果发现泄露：

立即撤销 - 重新生成 API key
删除历史 - 从 git 历史中删除敏感信息
强制推送 - git push --force（谨慎使用）
通知团队 - 告知其他开发者

### 使用 BFG 清理历史

# 安装 BFG
brew install bfg

# 清理敏感文件
bfg --delete-files .env

# 清理敏感字符串
bfg --replace-text passwords.txt

# 强制推送
git push --force

### .gitleaks.toml

title = "Custom Gitleaks Config"

[extend]
useDefault = true

[[rules]]
id = "moltbook-api-key"
description = "Moltbook API Key"
regex = '''moltbook_sk_[a-zA-Z0-9]{32}'''
tags = ["api-key", "moltbook"]

[allowlist]
paths = [
  '''example\\.txt''',
  '''test/.*'''
]

### 注意事项

False Positives - 扫描器可能误报
熵值 - 高熵值可能是敏感信息
上下文 - 检查是否真的敏感
验证 - TruffleHog 可以验证 secret 是否有效

版本: 1.0.0
工具: Gitleaks, TruffleHog, git-secrets
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: guohongbin-git
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T16:35:20.475Z
- Expires at: 2026-05-10T16:35:20.475Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/git-secrets-scanner)
- [Send to Agent page](https://openagent3.xyz/skills/git-secrets-scanner/agent)
- [JSON manifest](https://openagent3.xyz/skills/git-secrets-scanner/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/git-secrets-scanner/agent.md)
- [Download page](https://openagent3.xyz/downloads/git-secrets-scanner)