Langsung ke konten
Skillpedia
Keamanan29k ยท #9585

env-secrets-manager

Fungsinya

Skill ini memindai repositori untuk mencari kemungkinan kebocoran kredensial, mengurutkan temuan berdasarkan tingkat keparahan, dan menyarankan pembersihan seperti rotasi dan aturan ignore yang lebih baik. Ditujukan untuk pengembang dan tim yang melindungi secret konfigurasi.

Kapan dipakai

  • โœ“Saat Anda akan mendorong commit yang mengubah file env atau konfigurasi.
  • โœ“Ketika Anda perlu memeriksa repositori dari secret yang ter-commit secara tidak sengaja.
  • โœ“Saat variabel produksi hilang dan Anda perlu mencari penyebabnya.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/env-secrets-manager/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya ingin Anda memindai repositori saya dari kunci API yang bocor dan memberi tahu mana yang harus dirotasi lebih dulu.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menjalankan auditor pada repositori, yang menandai kemungkinan kredensial berdasarkan tingkat keparahan, lalu menyarankan perbaikan seperti merotasi kunci dan memperbarui file contoh serta file ignore.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah ia memperbaiki kebocoran untuk saya?

Ia melaporkannya dan menyarankan langkah penahanan, seperti merotasi kredensial asli dan menghapus nilai yang terekspos.

Bisakah ia berjalan di CI?

Bisa. Ia dapat mengeluarkan hasil dalam format JSON untuk pipeline otomatis.

Apa yang sebaiknya saya periksa pertama?

Temuan kritis dan tinggi terlebih dahulu, lalu rotasi kredensial asli apa pun.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
29k
Peringkat
#9585
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa