Saltar al contenido
Skillpedia
Seguridad29 mil · #9585

env-secrets-manager

Qué hace

Analiza un repositorio en busca de credenciales probablemente filtradas, ordena los hallazgos por gravedad y sugiere limpiezas como la rotación y mejores reglas de exclusión. Es para desarrolladores y equipos que protegen los secretos de configuración.

Cuándo usarla

  • ✓Cuando vas a subir commits que cambian archivos de entorno o de configuración.
  • ✓Cuando necesitas revisar un repositorio en busca de secretos que se subieron por accidente.
  • ✓Cuando falta una variable de producción y necesitas encontrar la causa.

Link de la skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/env-secrets-manager/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/env-secrets-manager/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Quiero que revises mi repositorio en busca de claves de API filtradas y me digas cuáles rotar primero.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente ejecuta un auditor sobre el repositorio, que marca las credenciales probables por gravedad, y después sugiere arreglos como rotar las claves y actualizar los archivos de ejemplo y de exclusión.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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

  • .env and .env.example lifecycle 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

  1. Run scripts/env_auditor.py on the repository root.
  2. Prioritize critical and high findings first.
  3. Rotate real credentials and remove exposed values.
  4. Update .env.example and .gitignore as needed.
  5. Add or tighten pre-commit/CI secret scanning gates.

Reference Docs

  • references/validation-detection-rotation.md
  • references/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

  1. Use a secret manager as the production source of truth.
  2. Keep dev env files local and gitignored.
  3. Enforce detection in CI before merge.
  4. 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 Secret objects without hardcoding.

Application Access Patterns

  1. SDK/API pull — application fetches secret at startup or on-demand via provider SDK.
  2. Sidecar injection — a sidecar container (e.g., Vault Agent) writes secrets to a shared volume or injects them as environment variables.
  3. Init container — a Kubernetes init container fetches secrets before the main container starts.
  4. CSI driver — secrets mount as a filesystem volume via the Secrets Store CSI Driver.

Cross-reference: See engineering/secrets-vault-manager for 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.py to flag secrets with no recorded rotation date.

Phase 2: Rotation

  1. Generate a new credential (API key, database password, certificate).
  2. Deploy the new credential to all consumers (apps, services, pipelines) in parallel.
  3. Verify each consumer can authenticate using the new cred
Preguntas frecuentes

¿Arregla las filtraciones por mí?

Las informa y sugiere pasos de contención, como rotar las credenciales reales y quitar los valores expuestos.

¿Puede ejecutarse en CI?

Sí. Puede dar los resultados en JSON para canalizaciones automatizadas.

¿Qué miro primero?

Los hallazgos críticos y altos primero, y después rotar las credenciales reales que haya.

Detalles

Descripción original del autor

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.

repo: alirezarezvani/claude-skills

Popularidad

Estrellas en GitHub
29 mil
Posición en el ranking
#9585
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas