security-secrets-management
Use this skill when asked about secrets management, secret scanning, GitLeaks, truffleHog, ggshield, Vault, credential rotation, .env files, environment…
от j4flmao★ 47 звёзд на GitHub
Установить security-secrets-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Security Secrets Management
Purpose
Design a secrets management strategy covering detection (GitLeaks, truffleHog, ggshield), centralized storage (Vault, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault), automated rotation, Kubernetes External Secrets integration, and developer workflow prevention.
Agent Protocol
Trigger
Exact user phrases: "secrets management", "secret scanning", "GitLeaks", "truffleHog", "ggshield", "vault", "credential rotation", ".env", "environment variables", "secret detection", "secret storage", "HashiCorp Vault", "AWS Secrets Manager", "GCP Secret Manager", "secret rotation", "pre-commit secret", "credential leak", "hardcoded secret", "External Secrets", "secret audit".
Input Context
Before activating, verify:
- Cloud provider (AWS, GCP, Azure, or on-prem)
- CI/CD platform and integration points
- Existing secrets detection tools or incidents
- Deployment platform (Kubernetes, serverless, VMs)
- Current secret storage approach (env files, SSM, Vault)
- Compliance requirements (SOC 2, PCI DSS, HIPAA)
Output Artifact
Secrets management strategy as YAML configs and workflow documentation.
Response Format
# Secret detection config (.gitleaks.toml)
# Pre-commit hook config
# Storage namespace layout
# Rotation policy
# ExternalSecret template
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Secret scanning configured with pre-commit hook and CI scan
- Centralized secret store deployed (Vault or cloud-native)
- Secret namespace hierarchy and access policies defined
- Rotation policy with interval and automation configured
- Developer prevention patterns documented
- Incident response for leaked credentials defined
- False positive management process in place
- Audit logging for secret access configured
Max Response Length
250 lines of configuration.
Architecture / Decision Trees
Secret Storage Decision Tree
What is the primary infrastructure platform?
├── Multi-cloud or on-premises
│ └── HashiCorp Vault (dynamic secrets, PKI, multi-datacenter replication)
├── AWS-only
│ └── AWS Secrets Manager (RDS rotation, cross-account, Lambda integration)
├── GCP-only
│ └── GCP Secret Manager (IAM, multi-region replication, version management)
└── Azure-only
└── Azure Key Vault (RBAC, soft-delete, managed HSM tier)
Is Kubernetes in use?
├── Yes → External Secrets Operator + any of the above providers
├── No → Direct SDK integration per application
└── Both → Vault CSI Provider + External Secrets for K8s workloads
What is the compliance requirement?
├── SOC 2 → Audit logging, rotation, access controls
├── PCI DSS → HSMs, network isolation, key hierarchy
├── HIPAA → BAA with provider, audit trails, minimum necessary access
└── FedRAMP → FIPS 140-2 validated modules, GovCloud
Secret Detection Placement Decision
Where should secrets be detected?
├── Pre-commit (fastest feedback, developer in flow)
│ ├── GitLeaks: custom regex rules, ~100ms per commit
│ ├── ggshield: 300+ detectors, ~200ms per commit
│ └── Order: GitLeaks → ggshield (fail-fast on regex)
├── Pre-push (catches what pre-commit misses)
│ ├── truffleHog verified: checks against live APIs, ~30s
│ └── Block push on verified secret
├── CI (branch protection, PR gates)
│ ├── Full scan on PR to main
│ ├── Diff scan only (faster, focused)
│ └── Block merge on HIGH/CRITICAL findings
└── Scheduled / periodic
├── Nightly full repo scan
├── Weekly scan of all repos in organization
└── Monthly scan of all repos + S3 buckets + GCS buckets + Slack history
Workflow
Step 1: Secret Detection - Pre-commit
GitLeaks: gitleaks detect --source . --config .gitleaks.toml.
Uses custom rules for project-specific patterns.
Target: internal tokens, JWTs, connection strings, cloud keys.
truffleHog: trufflehog git file://. --only-verified --fail.
Secondary deep scan verifying against live services.
Correlates with AWS STS, GitHub API, Slack API.
ggshield (GitGuardian): ggsecret scan pre-commit.
Covers 300+ detector types from 200+ services.
Higher SaaS API key coverage than GitLeaks alone.
Hook order: GitLeaks first (fast regex), ggshield second
(broad coverage), truffleHog last (verified deep scan).
Block commit if any tool detects a secret.
Allowlist known test credentials with path and regex rules.
Use SKIP=<hook> only with documented emergency reason.
Step 2: Secret Detection - CI
Full history scan on push to main:
gitleaks detect --source . --verbose.
PR diff scan for new secrets:
gitleaks detect --source . --log-opts="..origin/main".
TruffleHog verified mode checks live services. AWS keys against STS.GetCallerIdentity. GitHub tokens against GitHub API. Slack tokens against Slack API.
CI gates:
- Fail on GitLeaks HIGH or CRITICAL severity
- Fail on truffleHog verified sec
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/secret-detection.md
- references/secret-scanning-guide.md
- references/secret-storage.md
- references/secrets-audit.md
- references/secrets-lifecycle-management.md
- references/secrets-management-advanced.md
- references/secrets-management-fundamentals.md
- references/secrets-platform-comparison.md
- references/secrets-rotation.md
FAQ
Что делает скилл security-secrets-management?
Use this skill when asked about secrets management, secret scanning, GitLeaks, truffleHog, ggshield, Vault, credential rotation, .env files, environment variables, secrets detection, or secrets storage. This skill enforces: pre-commit secret scanning with GitLeaks/truffleHog/ggshield, centralized secret storage with Vault/AWS Secrets Manager/GCP Secret Manager, automated rotation policies, Kubernetes External Secrets, and developer prevention patterns. Do NOT use for: general dependency scanning (SBOM), container image security, or API key generation.
Как установить скилл security-secrets-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл security-secrets-management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…