Search

PythonReactSEOPDF
OpenClaw

doro-git-secrets-scanner

Git 安全扫描器 - 检查提交中的敏感信息泄露(API keys、密码、token)

a2mus0 source installs☆ 0 Repository starsv1.0.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install a2mus/doro-git-secrets-scanner

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Git 安全扫描器

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

工具对比

工具 Stars 特点
Gitleaks 24,958 最流行,Go 编写,快速
TruffleHog 24,612 验证 secrets,支持多种格式
git-secrets 13,173 AWS 官方,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 T...

Source information

Source
github
Repository
openclaw/skills
Path
skills/a2mus/doro-git-secrets-scanner
Version
1.0.0
Commit
42fec82cb1d72e14a9ec37d4193b7eeef6da694a
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Git 安全扫描器

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

## 工具对比

| 工具 | Stars | 特点 |
|------|-------|------|
| **Gitleaks** | 24,958 | 最流行,Go 编写,快速 |
| **TruffleHog** | 24,612 | 验证 secrets,支持多种格式 |
| **git-secrets** | 13,173 | AWS 官方,pre-commit hook |

## 安装

### Gitleaks(推荐)

```bash
# macOS
brew install gitleaks

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

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

### TruffleHog

```bash
# macOS
brew install trufflehog

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

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

### git-secrets

```bash
# macOS
brew install git-secrets

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

## 使用方法

### 1. 扫描当前仓库

```bash
# Gitleaks
gitleaks detect --source . -v

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

# git-secrets(需要先设置 hook)
git secrets --scan-history
```

### 2. 扫描特定提交

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

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

### 3. 扫描所有历史

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

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

### 4. 设置 pre-commit hook

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

### 5. CI/CD 集成

```yaml
# .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 T...

Related skills

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

OpenClaw

0x0-messenger

eijiac24

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.