env-secrets-manager
What it does
It scans a repository for likely leaked credentials, ranks the findings by severity, and suggests cleanup such as rotation and better ignore rules. It is for developers and teams protecting configuration secrets.
When to use it
- βWhen you are about to push commits that changed env or config files.
- βWhen you need to check a repository for secrets that were committed by accident.
- βWhen a production variable is missing and you need to track down the cause.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/env-secrets-manager/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want you to scan my repository for leaked API keys and tell me what to rotate first.β
5 new skills a week. 1 minute to read.
How it works
The agent runs an auditor over the repository, which flags likely credentials by severity, then suggests fixes such as rotating keys and updating the example and ignore files.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Does it fix the leaks for me?
It reports them and suggests containment steps, such as rotating real credentials and removing exposed values.
Can it run in CI?
Yes. It can output results as JSON for automated pipelines.
What should I look at first?
The critical and high findings first, then rotate any real credentials.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9585
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.