bambu-studio-ai
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...
Git hook to detect secrets before commit.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install derick001/secret-detection打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
This skill provides a git pre‑commit hook that scans staged files for common secret patterns (API keys, passwords, tokens) and blocks the commit if any are found. It helps prevent accidental leakage of secrets to public repositories.
Inputs: Git staged files (automatically scanned by the hook) or manual file paths.
Outputs: Detection report with line numbers; non‑zero exit code if secrets found.
Use this skill when:
# Install the hook in your git repository
./scripts/main.py install
# Scan specific files
./scripts/main.py scan --file path/to/file
# Scan all staged files (like the hook does)
./scripts/main.py scan --staged
git commit
$ ./scripts/main.py install
✓ Pre-commit hook installed at .git/hooks/pre-commit
✓ Hook will scan for secrets on every commit
$ git commit -m "Add config"
⚠️ Secret detected in config.yaml line 12: AWS_ACCESS_KEY_ID=AKIA...
⚠️ Secret detected in .env line 3: PASSWORD=secret123
✗ Commit blocked: 2 secrets found
$ ./scripts/main.py scan --staged
Scanning 3 staged files...
✓ config.yaml: clean
✓ .env: clean
✓ src/main.py: clean
✓ No secrets found
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
A git pre‑commit hook that scans staged files for common secret patterns (API keys, passwords, tokens) and blocks commits if secrets are found.
Install the hook (in your git repository):
./scripts/main.py install
Test the scanner:
./scripts/main.py scan --staged
The hook will run automatically on every git commit.
AKIA...)ghp_...)github_pat_...)sk-...)./scripts/main.py scan --file config.yaml --file .env
./scripts/main.py scan --staged
install command creates a .git/hooks/pre‑commit script that calls this scanner.git commit, the hook scans all staged files using regex patterns.SECRET_PATTERNS in scripts/main.py).The skill is written in Python 3 and uses no external dependencies beyond the standard library.
To extend the detection patterns, edit the SECRET_PATTERNS list in scripts/main.py.
# Secret Detection ## What This Does This skill provides a git pre‑commit hook that scans staged files for common secret patterns (API keys, passwords, tokens) and blocks the commit if any are found. It helps prevent accidental leakage of secrets to public repositories. Inputs: Git staged files (automatically scanned by the hook) or manual file paths. Outputs: Detection report with line numbers; non‑zero exit code if secrets found. ## When To Use Use this skill when: - You work with repositories that may contain sensitive credentials - You want to prevent accidental commits of secrets - You need a lightweight, local secret scanner for git workflows - You want to enforce security checks before pushing to remote ## Usage ### Installation ```bash # Install the hook in your git repository ./scripts/main.py install ``` ### Manual Scan ```bash # Scan specific files ./scripts/main.py scan --file path/to/file # Scan all staged files (like the hook does) ./scripts/main.py scan --staged ``` ### Hook Behavior - The hook runs automatically on `git commit` - If secrets are detected, the commit is blocked - The script prints the detected secrets with file names and line numbers - Exit code 0 = no secrets found; exit code 1 = secrets found ## Examples ### Example 1: Installing the Hook ```bash $ ./scripts/main.py install ✓ Pre-commit hook installed at .git/hooks/pre-commit ✓ Hook will scan for secrets on every commit ``` ### Example 2: Secret Detection Blocking a Commit ```bash $ git commit -m "Add config" ⚠️ Secret detected in config.yaml line 12: AWS_ACCESS_KEY_ID=AKIA... ⚠️ Secret detected in .env line 3: PASSWORD=secret123 ✗ Commit blocked: 2 secrets found ``` ### Example 3: Manual Scan ```bash $ ./scripts/main.py scan --staged Scanning 3 staged files... ✓ config.yaml: clean ✓ .env: clean ✓ src/main.py: clean ✓ No secrets found ``` ## Requirements - Git (for hook installation) - Python 3.6+ (for the scanner) - No external API keys or services needed ## L...
# Secret Detection Skill A git pre‑commit hook that scans staged files for common secret patterns (API keys, passwords, tokens) and blocks commits if secrets are found. ## Quick Start 1. **Install the hook** (in your git repository): ```bash ./scripts/main.py install ``` 2. **Test the scanner**: ```bash ./scripts/main.py scan --staged ``` 3. **The hook will run automatically** on every `git commit`. ## What It Detects - AWS Access Key IDs (`AKIA...`) - AWS Secret Access Keys - Passwords, secrets, tokens in variable assignments - GitHub Personal Access Tokens (`ghp_...`) - GitHub Fine‑Grained Tokens (`github_pat_...`) - OpenAI API Keys (`sk-...`) - Bearer tokens ## Manual Usage ### Scan Specific Files ```bash ./scripts/main.py scan --file config.yaml --file .env ``` ### Scan All Staged Files ```bash ./scripts/main.py scan --staged ``` ## How It Works 1. The `install` command creates a `.git/hooks/pre‑commit` script that calls this scanner. 2. On `git commit`, the hook scans all staged files using regex patterns. 3. If any secret pattern is matched, the commit is blocked and the secrets are displayed. 4. Clean commits proceed normally. ## Limitations - Only common secret patterns are detected (custom patterns can be added by editing `SECRET_PATTERNS` in `scripts/main.py`). - May produce false positives (e.g., long random strings that aren't secrets). - Does not scan binary files. - Requires manual installation per repository. ## For Developers The skill is written in Python 3 and uses no external dependencies beyond the standard library. To extend the detection patterns, edit the `SECRET_PATTERNS` list in `scripts/main.py`.
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...
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...
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
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.