quickstart
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 57
- Forks
- 5
03 SKILL.md 正文
ripsecrets Quickstart Guide
ripsecrets is a command-line tool designed to scan source code for accidentally committed secrets and API keys. It's 95x faster than comparable tools and uses intelligent pattern detection to find sensitive data before it reaches your repository.
Commands
ripsecrets <resource> <action>— Execute ripsecrets commandsripsecrets self version— Print ripsecrets versionripsecrets scan directory— Scan directory/repository for secretsripsecrets scan install-hook— Install ripsecrets as pre-commit hookripsecrets scan custom-pattern— Scan with additional secret patternripsecrets _ _— Passthrough to ripsecrets CLI
Installation
cargo install --git https://github.com/sirwart/ripsecrets --branch main
Or via Homebrew:
brew install ripsecrets
Basic Usage
Scan current directory for secrets
ripsecrets
Scan specific files or directories
ripsecrets src/ config.yml .env
Install as Git pre-commit hook
ripsecrets --install-pre-commit
Check with custom patterns
ripsecrets --additional-pattern "my-api-key-\*"
What ripsecrets Detects
- AWS API keys and credentials
- GitHub tokens and personal access tokens
- Private keys (RSA, DSA, EC)
- Database connection strings
- OAuth tokens
- API keys from common services
- Private encryption keys
- Custom patterns you define
Exit Codes
- 0: No secrets found
- 1: Secrets detected (non-zero exit code helps in pre-commit hooks)
Pre-commit Hook Setup
Automatic setup:
ripsecrets --install-pre-commit
This adds ripsecrets to your Git pre-commit hooks, preventing commits with detected secrets.
Manual setup in .git/hooks/pre-commit:
#!/bin/bash
ripsecrets || exit 1
Whitelisting Secrets
Create a .secretsignore file in your repository root:
# Allow specific test keys
test-api-key: akia2c3d4e5f6g7h8
demo_token: ghp_1234567890abcdefghijk
Or add allowlist comments in code:
# ripsecrets:allow
API_KEY = "test_key_12345"
Common Options
--strict-ignore- Respect .secretsignore file strictly--additional-pattern <PATTERN>- Add custom regex patterns--check <PATH>- Check specific file/directory--version- Show version info--help- Display help
Real-world Use Cases
Pre-commit integration
ripsecrets || exit 1
CI/CD pipeline scanning
ripsecrets . --strict-ignore
Audit existing repository
# Find all secrets in entire repository history
git log -p | ripsecrets
Custom pattern scanning
ripsecrets --additional-pattern "db_password=\*" .
Performance
- Scans most repositories in milliseconds
- Uses statistical randomness detection for speed
- No external API calls
- Operates entirely offline
Comparison to Alternatives
| Tool | Speed | Method | False Positives |
|---|---|---|---|
| ripsecrets | 95x faster | Statistical | Low |
| truffleHog | Baseline | Entropy scanning | Medium |
| gitleaks | ~50x slower | Pattern matching | High |
Limitations
- Cannot detect all possible secret formats
- Custom patterns may require tuning
- Some false positives possible with entropy-based detection
Resources
Integration Examples
With pre-commit framework
# .pre-commit-config.yaml
- repo: local
hooks:
- id: ripsecrets
name: ripsecrets
entry: ripsecrets
language: system
stages: [commit]
In GitHub Actions
- name: Scan for secrets
run: ripsecrets . --strict-ignore
04 同仓库更多 Skills
sc-machin-mcp
暂无简介
supercli.quickstart
SuperCLI capability router — discover and execute CLI commands through namespace.resource.action interface
zzdoc
Use this skill to compile scdoc manpages with a fast Zig-based compiler.
zx
Use this skill when the user wants to a tool for writing better scripts using node.js.
zvm
Use this skill when the user wants to manage multiple Zig compiler versions.
quickstart
暂无简介