用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill secret-detector命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project
Guía técnica completa para integrar 250+ servicios externos con agentes IA usando Composio. Cubre instalación, autenticación OAuth, gestión de herramientas, triggers y flujos multi-servicio.
Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project
基于 SOC 职业分类
正在显示 SKILL.md
| name | secret-detector |
| description | 機密情報検出スキル。APIキー、パスワード、トークン等の機密情報をコードから検出。git-secrets/truffleHog/gitleaks等のツールを統合。漏洩防止と早期発見に使用。 |
コードベースに含まれる機密情報を検出するスキル。APIキー、パスワード、シークレットトークン等の漏洩を防ぐ。
| 種類 | パターン例 |
|---|---|
| API Key | sk-xxxx, AKIAxxxx, api_key = "xxx" |
| AWS | aws_access_key_id, aws_secret_access_key |
| DB | password = "xxx", DB_PASSWORD |
| JWT | eyJ で始まる長い文字列 |
| Private Key | -----BEGIN RSA PRIVATE KEY----- |
# macOS
brew install gitleaks
# Linux
wget https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz
tar -xzf gitleaks_8.18.0_linux_x64.tar.gz
# 現在のコードをスキャン
gitleaks detect --source . -v
# Git履歴も含めてスキャン
gitleaks detect --source . --log-opts="--all"
# JSON出力
gitleaks detect --source . --report-path findings.json --report-format=json
# 特定のコミット範囲
gitleaks detect --source . --log-opts="HEAD~10..HEAD"
title = "gitleaks config"
[[rules]]
id = "aws-access-key"
description = "AWS Access Key"
regex = '''AKIA[0-9A-Z]{16}'''
tags = ["aws", "key"]
[[rules]]
id = "github-token"
description = "GitHub Personal Access Token"
regex = '''ghp_[0-9a-zA-Z]{36}'''
tags = ["github", "token"]
[allowlist]
paths = [
'''tests/.*''',
'''\.env\.example''',
]
pip install trufflehog
# Gitリポジトリをスキャン
trufflehog git https://github.com/user/repo
# ローカルディレクトリ
trufflehog filesystem .
# JSON出力
trufflehog filesystem . --json
# 除外パス
trufflehog filesystem . --exclude-paths="tests/,docs/"
# インストール
git clone https://github.com/awslabs/git-secrets
cd git-secrets
make install
# リポジトリに設定
cd /path/to/repo
git secrets --install
git secrets --register-aws
# カスタムパターン
git secrets --add 'api_key\s*=\s*["\'][^"\']+["\']'
git secrets --add 'password\s*=\s*["\'][^"\']+["\']'
# 除外パターン
git secrets --add --allowed 'placeholder'
# 現在のファイルをスキャン
git secrets --scan
# ステージングされたファイル
git secrets --scan --staged
# 全履歴をスキャン
git secrets --scan-history
pip install detect-secrets
# ベースライン作成
detect-secrets scan > .secrets.baseline
# スキャン実行
detect-secrets scan --baseline .secrets.baseline .
# 監査(手動確認)
detect-secrets audit .secrets.baseline
# grepで手動検出
# AWS Access Key
rg "AKIA[0-9A-Z]{16}" .
# AWS Secret Key
rg "(?i)aws(.{0,20})?['\"][0-9a-zA-Z/+=]{40}['\"]" .
# GitHub Token
rg "ghp_[0-9a-zA-Z]{36}" .
rg "github_pat_[0-9a-zA-Z_]{82}" .
# Generic API Key
rg "(?i)(api[_-]?key|apikey)['\"]?\s*[:=]\s*['\"][0-9a-zA-Z_-]{20,}['\"]" .
# Password
rg "(?i)(password|passwd|pwd)['\"]?\s*[:=]\s*['\"][^'\"]+['\"]" .
# Private Key
rg "-----BEGIN (?:RSA |DSA |EC |OPENSSH )?PRIVATE KEY-----" .
# JWT
rg "eyJ[a-zA-Z0-9_-]*\.eyJ[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*" .
[allowlist]
paths = [
'''\.env\.example''',
'''tests/fixtures/.*''',
'''docs/examples/.*''',
]
regexes = [
"EXAMPLE_API_KEY",
"your-api-key-here",
]
skip_paths:
- "tests/"
- "docs/"
skip_detectors:
- "PrivateKey"
# 漏洩したシークレットを無効化
# AWS: IAMコンソールでキーを削除/無効化
# GitHub: Settings > Developer settings > Personal access tokens で削除
# Git履歴からも削除(注意が必要)
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch path/to/file-with-secret' \
--prune-empty --tag-name-filter cat -- --all
# 環境変数を使用
# .env (gitignoreに追加)
API_KEY=real-api-key-here
# アプリケーションで読み込み
process.env.API_KEY
#!/bin/bash
# .git/hooks/pre-commit
git secrets --scan --staged
if [ $? -ne 0 ]; then
echo "Secrets detected! Commit blocked."
exit 1
fi
- name: Check for secrets
run: |
gitleaks detect --source . --verbose --exit-code 1
#!/bin/bash
# daily-secret-scan.sh
cd /path/to/project
gitleaks detect --source . --report-path /var/log/secrets-$(date +%Y%m%d).json
if [ $? -ne 0 ]; then
# アラート送信
curl -X POST $SLACK_WEBHOOK -d '{"text": "Secrets detected!"}'
fi