env-secrets-manager
하는 일
저장소에서 유출되었을 가능성이 있는 자격 증명을 스캔하고, 발견 사항을 심각도 순으로 정리하며, 자격 증명 교체와 무시 규칙 개선 같은 정리 방법을 제안합니다. 설정 비밀 값을 보호하는 개발자와 팀을 위한 스킬입니다.
사용하는 경우
- ✓env나 설정 파일을 바꾼 커밋을 푸시하기 직전일 때.
- ✓실수로 커밋된 비밀 값이 있는지 저장소를 점검해야 할 때.
- ✓운영 변수가 없어서 원인을 찾아야 할 때.
스킬 링크
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/env-secrets-manager/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 저장소에서 유출된 API 키를 스캔해서 무엇을 먼저 교체해야 할지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 저장소에서 감사 도구를 실행해 가능성 높은 자격 증명을 심각도별로 표시한 뒤, 실제 키 교체와 예제 및 무시 파일 업데이트 같은 수정 방법을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Env & Secrets Manager
Tier: POWERFUL Category: Engineering Domain: Security / DevOps / Configuration Management
Overview
Manage environment-variable hygiene and secrets safety across local development and production workflows. This skill focuses on practical auditing, drift awareness, and rotation readiness.
Core Capabilities
.envand.env.examplelifecycle guidance- Secret leak detection for repository working trees
- Severity-based findings for likely credentials
- Operational pointers for rotation and containment
- Integration-ready outputs for CI checks
When to Use
- Before pushing commits that touched env/config files
- During security audits and incident triage
- When onboarding contributors who need safe env conventions
- When validating that no obvious secrets are hardcoded
Quick Start
# Scan a repository for likely secret leaks
python3 scripts/env_auditor.py /path/to/repo
# JSON output for CI pipelines
python3 scripts/env_auditor.py /path/to/repo --json
Recommended Workflow
- Run
scripts/env_auditor.pyon the repository root. - Prioritize
criticalandhighfindings first. - Rotate real credentials and remove exposed values.
- Update
.env.exampleand.gitignoreas needed. - Add or tighten pre-commit/CI secret scanning gates.
Reference Docs
references/validation-detection-rotation.mdreferences/secret-patterns.md
Common Pitfalls
- Committing real values in
.env.example - Rotating one system but missing downstream consumers
- Logging secrets during debugging or incident response
- Treating suspected leaks as low urgency without validation
Best Practices
- Use a secret manager as the production source of truth.
- Keep dev env files local and gitignored.
- Enforce detection in CI before merge.
- Re-test application paths immediately after credential rotation.
Cloud Secret Store Integration
Production applications should never read secrets from .env files or environment variables baked into container images. Use a dedicated secret store instead. <!-- noqa: SEC-AUDITOR (advice against reading secrets from .env) -->
Provider Comparison
| Provider | Best For | Key Feature |
|---|---|---|
| HashiCorp Vault | Multi-cloud / hybrid | Dynamic secrets, policy engine, pluggable backends |
| AWS Secrets Manager | AWS-native workloads | Native Lambda/ECS/EKS integration, automatic RDS rotation |
| Azure Key Vault | Azure-native workloads | Managed HSM, Azure AD RBAC, certificate management |
| GCP Secret Manager | GCP-native workloads | IAM-based access, automatic replication, versioning |
Selection Guidance
- Single cloud provider — use the cloud-native secret manager. It integrates tightly with IAM, reduces operational overhead, and costs less than self-hosting.
- Multi-cloud or hybrid — use HashiCorp Vault. It provides a uniform API across environments and supports dynamic secret generation (database credentials, cloud IAM keys) that expire automatically.
- Kubernetes-heavy — combine External Secrets Operator with any backend above to sync secrets into K8s
Secretobjects without hardcoding.
Application Access Patterns
- SDK/API pull — application fetches secret at startup or on-demand via provider SDK.
- Sidecar injection — a sidecar container (e.g., Vault Agent) writes secrets to a shared volume or injects them as environment variables.
- Init container — a Kubernetes init container fetches secrets before the main container starts.
- CSI driver — secrets mount as a filesystem volume via the Secrets Store CSI Driver.
Cross-reference: See
engineering/secrets-vault-managerfor production vault infrastructure patterns, HA deployment, and disaster recovery procedures.
Secret Rotation Workflow
Stale secrets are a liability. Rotation ensures that even if a credential leaks, its useful lifetime is bounded.
Phase 1: Detection
- Track secret creation and expiry dates in your secret store metadata.
- Set alerts at 30, 14, and 7 days before expiry.
- Use
scripts/env_auditor.pyto flag secrets with no recorded rotation date.
Phase 2: Rotation
- Generate a new credential (API key, database password, certificate).
- Deploy the new credential to all consumers (apps, services, pipelines) in parallel.
- Verify each consumer can authenticate using the new cred
자주 묻는 질문
유출을 대신 고쳐 주나요?
아니요. 발견 사항을 보고하고, 실제 자격 증명 교체와 노출된 값 제거 같은 억제 단계를 제안합니다.
CI에서 실행할 수 있나요?
네. 자동화 파이프라인을 위해 결과를 JSON으로 출력할 수 있습니다.
무엇을 먼저 봐야 하나요?
치명적과 높음 등급의 발견 사항을 먼저 보고, 실제 자격 증명은 교체합니다.
상세 정보
작성자의 원본 설명
Use when auditing .env files, planning credential rotation, chasing a missing env var in production or hardening a repo against leaked secrets. Scans for committed secrets and drift with env_auditor.py.
인기도
- GitHub 스타
- 29k
- 순위
- #9585
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-launcher-orchestrator
29k하나의 명확한 목표에서 시작해 내 계정의 Claude 관리형 에이전트를 계획하고, 만들고, 테스트하고, 예약하도록 돕습니다.
grade-iterate
29k에이전트가 채점 기준표에 따라 관리형 AI 에이전트의 결과물을 평가하고, 정해진 횟수 안에서 개선하도록 돕습니다. 끝없이 반복하지 않습니다.
interview
29kAI 에이전트 아이디어에 대해 질문하고, 답변을 간단한 빌드 계획으로 바꿔 어떤 것도 출시하기 전에 정리하도록 돕습니다.
run-without-you
29k에이전트가 관리형 AI 에이전트를 예약 또는 이벤트에 따라 실행되도록 설정하고, 출시 전에 cron 시간을 확인하도록 돕습니다.