Search

PythonReactSEOPDF
OpenClaw

git-secrets-scanner

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

guohongbin-git0 source installs☆ 0 Repository stars

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 guohongbin-git/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/guohongbin-git/git-secrets-scanner
Version
—
Commit
5a8f4ddbb887b6cd0b5af3b80308dc5c83c32b49
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

parakeet-stt

carlulsoe

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, o...

OpenClaw

feishu-process-feedback

carlzhao007

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化...