[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792MVAQVN2AJGAQEPHJ3HSE":3,"skill-same:01M792MVAQVN2AJGAQEPHJ3HSE":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M792MVAQVN2AJGAQEPHJ3HSE","secrets-management",null,"Handle keys properly: vaults, rotation, `.env` hygiene, pre-commit scanning, and purging a key already in git history. Use when managing environment secrets, Vault, KMS, or key rotation.","poorvith-mp\u002Fskills-developer","poorvith-mp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F277478855?v=4","01M78Z5K0YH1Z3PX815PGQ96ND","Poorvith M P","01M792ACSFXT45RJ69SSGKTVJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: secrets-management\nlast_reviewed: 2026-09-06\ngroup: Security\ndescription: >-\n  Handle keys properly: vaults, rotation, `.env` hygiene, pre-commit scanning, and purging a key\n  already in git history. Use when managing environment secrets, Vault, KMS, or key rotation.\n---\n\n# secrets-management\n\n## Core Philosophy\nHardcoding API keys, database passwords, or private encryption keys into source code or unencrypted configuration files is an existential security threat. Secrets must never be stored in plaintext, never committed to version control, and never shared over insecure channels. Modern secrets management requires centralized key vaults (HashiCorp Vault, AWS Secrets Manager), automated rotation, strict local `.env` hygiene, pre-commit entropy scanning, and rapid eradication procedures when a secret is accidentally exposed.\n\n---\n\n## 4-Step Secrets Management Architecture\n\n### Step 1: Centralized Vault & Runtime Injection\n1. **Dynamic Secret Generation & Key Vaults**:\n   - Store production secrets in a dedicated vault (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, or 1Password Developer).\n   - Authenticate services using cloud IAM roles (AWS IRSA, GCP Workload Identity) rather than static credentials.\n2. **Runtime Environment Injection**:\n   - Inject secrets into container runtimes at launch as environment variables or ephemeral in-memory volume mounts.\n   - Never write production secrets to configuration files committed to git.\n\n### Step 2: Local Developer Hygiene & `.env` Standards\n1. **The Three-File `.env` Protocol**:\n   - `.env.example`: Committed to Git. Contains all required variable keys with empty or fake mock values (documentation for developers).\n   - `.env.local`: Ignored by Git. Contains developer's personal local credentials.\n   - `.gitignore`: Must explicitly include:\n     ```gitignore\n     .env\n     .env.*\n     !.env.example\n     *.pem\n     *.key\n     id_rsa\n     ```\n\n### Step 3: Shift-Left Secret Scanning (Pre-Commit & CI Gates)\n1. **Local Pre-Commit Entropy Scanning**:\n   - Configure tools like `gitleaks` or `trufflehog` in local git hooks:\n     ```bash\n     gitleaks protect --verbose --staged\n     ```\n2. **CI\u002FCD Scanning & Branch Gating**:\n   - Run automated secret scans on every pull request. If a secret pattern (e.g. `sk-proj-...`, `ghp_...`, `AKIA...`) is detected, fail the build immediately and block merging.\n\n### Step 4: Incident Response & Secret Eradication\n1. **The Tainted Secret Rule**:\n   - Once a secret is committed to Git (even for 30 seconds on a private branch), **it must be considered compromised**.\n   - Immediate Remediation Steps:\n     - 1. **Revoke & Rotate**: Revoke the credential in the source provider immediately and issue a new one.\n     - 2. **Audit Access Logs**: Check cloud provider access logs for unauthorized usage during the exposure window.\n     - 3. **Purge Git History**: Use `git-filter-repo` (never basic git commit amending) to rewrite repository history:\n       ```bash\n       git filter-repo --invert-paths --path-match .env\n       ```\n\n---\n\n## Deliverable Format: Secrets Management Specification (`SECRETS-SPEC.md`)\n\n```markdown\n# Secrets Management Architecture: [System \u002F Application]\n\n## 1. Centralized Vault & Key Topology\n- **Vault Provider**: AWS Secrets Manager \u002F HashiCorp Vault\n- **Authentication**: IAM Role-based Workload Identity (Zero static root keys)\n- **Rotation Cadence**: Automated 30-day rotation for database passwords\n\n## 2. Secrets Registry & Environment Mapping\n| Secret Key Name | Storage Vault Path | Scope | Rotation Method |\n|---|---|---|---|\n| `DATABASE_URL` | `prod\u002Fapi\u002Fdb_conn` | Backend Service | Automated RDS Master Rotation |\n| `STRIPE_SECRET_KEY` | `prod\u002Fapi\u002Fstripe` | Billing Worker | Manual Bi-annual Rotation |\n| `JWT_PRIVATE_KEY` | `prod\u002Fauth\u002Fjwt_rsa` | Auth Service | KMS Asymmetric Key Pair |\n\n## 3. Pre-Commit Secret Scanner Configuration (`.gitleaks.toml`)\n```toml\n[allowlist]\ndescription = \"Allowed mock keys in test suites\"\npaths = [\n  '''tests\u002Ffixtures\u002F.*'''\n]\n```\n\n## 4. Emergency Rotation Runbook\n1. Access AWS Secrets Manager console -> Select secret -> Click \"Rotate Secret Immediately\".\n2. Deploy rolling restart of ECS services to pick up new credential.\n3. Verify application health check returns 200 OK.\n```\n\n---\n\n## Worked Example: Automated Git Secret Eradication\n\n- **Incident**: A junior developer committed an AWS IAM Access Key to a feature branch.\n- **Response**:\n  1. Revoked key in AWS IAM within 4 minutes.\n  2. Executed `git-filter-repo` to permanently erase the commit from all branches and tags.\n  3. Force-pushed updated reflog to remote; notified all developers to prune local clones.\n  4. Installed `gitleaks` pre-commit hook across all team repositories.\n- **Outcome**: Zero unauthorized AWS access detected in CloudTrail; recurrence eliminated.\n\n---\n\n## Verification Checklist\n\n- [ ] `.gitignore` explicitly blocks `.env`, `.env.*`, and private key files.\n- [ ] `.env.example` provides an up-to-date manifest of all required keys with dummy values.\n- [ ] Pre-commit hook runs `gitleaks` or `trufflehog` on staged changes.\n- [ ] Production secrets are fetched at runtime via IAM-authenticated vaults.\n- [ ] Documented rotation runbook exists for all third-party API credentials.\n\n---\n\n## Anti-Patterns\n\n- **The \"Private Repo\" Fallacy**: Assuming hardcoded keys are safe because the GitHub repository is currently private.\n- **Committing and Amending**: Making a new commit that deletes the secret without purging the commit history where the key remains readable.\n- **Slack\u002FEmail Secret Sharing**: Pasting production passwords into Slack DMs or email threads.\n","# secrets-management\n\n## Core Philosophy\nHardcoding API keys, database passwords, or private encryption keys into source code or unencrypted configuration files is an existential security threat. Secrets must never be stored in plaintext, never committed to version control, and never shared over insecure channels. Modern secrets management requires centralized key vaults (HashiCorp Vault, AWS Secrets Manager), automated rotation, strict local `.env` hygiene, pre-commit entropy scanning, and rapid eradication procedures when a secret is accidentally exposed.\n\n---\n\n## 4-Step Secrets Management Architecture\n\n### Step 1: Centralized Vault & Runtime Injection\n1. **Dynamic Secret Generation & Key Vaults**:\n   - Store production secrets in a dedicated vault (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, or 1Password Developer).\n   - Authenticate services using cloud IAM roles (AWS IRSA, GCP Workload Identity) rather than static credentials.\n2. **Runtime Environment Injection**:\n   - Inject secrets into container runtimes at launch as environment variables or ephemeral in-memory volume mounts.\n   - Never write production secrets to configuration files committed to git.\n\n### Step 2: Local Developer Hygiene & `.env` Standards\n1. **The Three-File `.env` Protocol**:\n   - `.env.example`: Committed to Git. Contains all required variable keys with empty or fake mock values (documentation for developers).\n   - `.env.local`: Ignored by Git. Contains developer's personal local credentials.\n   - `.gitignore`: Must explicitly include:\n     ```gitignore\n     .env\n     .env.*\n     !.env.example\n     *.pem\n     *.key\n     id_rsa\n     ```\n\n### Step 3: Shift-Left Secret Scanning (Pre-Commit & CI Gates)\n1. **Local Pre-Commit Entropy Scanning**:\n   - Configure tools like `gitleaks` or `trufflehog` in local git hooks:\n     ```bash\n     gitleaks protect --verbose --staged\n     ```\n2. **CI\u002FCD Scanning & Branch Gating**:\n   - Run automated secret scans on every pull request. If a secret pattern (e.g. `sk-proj-...`, `ghp_...`, `AKIA...`) is detected, fail the build immediately and block merging.\n\n### Step 4: Incident Response & Secret Eradication\n1. **The Tainted Secret Rule**:\n   - Once a secret is committed to Git (even for 30 seconds on a private branch), **it must be considered compromised**.\n   - Immediate Remediation Steps:\n     - 1. **Revoke & Rotate**: Revoke the credential in the source provider immediately and issue a new one.\n     - 2. **Audit Access Logs**: Check cloud provider access logs for unauthorized usage during the exposure window.\n     - 3. **Purge Git History**: Use `git-filter-repo` (never basic git commit amending) to rewrite repository history:\n       ```bash\n       git filter-repo --invert-paths --path-match .env\n       ```\n\n---\n\n## Deliverable Format: Secrets Management Specification (`SECRETS-SPEC.md`)\n\n```markdown\n# Secrets Management Architecture: [System \u002F Application]\n\n## 1. Centralized Vault & Key Topology\n- **Vault Provider**: AWS Secrets Manager \u002F HashiCorp Vault\n- **Authentication**: IAM Role-based Workload Identity (Zero static root keys)\n- **Rotation Cadence**: Automated 30-day rotation for database passwords\n\n## 2. Secrets Registry & Environment Mapping\n| Secret Key Name | Storage Vault Path | Scope | Rotation Method |\n|---|---|---|---|\n| `DATABASE_URL` | `prod\u002Fapi\u002Fdb_conn` | Backend Service | Automated RDS Master Rotation |\n| `STRIPE_SECRET_KEY` | `prod\u002Fapi\u002Fstripe` | Billing Worker | Manual Bi-annual Rotation |\n| `JWT_PRIVATE_KEY` | `prod\u002Fauth\u002Fjwt_rsa` | Auth Service | KMS Asymmetric Key Pair |\n\n## 3. Pre-Commit Secret Scanner Configuration (`.gitleaks.toml`)\n```toml\n[allowlist]\ndescription = \"Allowed mock keys in test suites\"\npaths = [\n  '''tests\u002Ffixtures\u002F.*'''\n]\n```\n\n## 4. Emergency Rotation Runbook\n1. Access AWS Secrets Manager console -> Select secret -> Click \"Rotate Secret Immediately\".\n2. Deploy rolling restart of ECS services to pick up new credential.\n3. Verify application health check returns 200 OK.\n```\n\n---\n\n## Worked Example: Automated Git Secret Eradication\n\n- **Incident**: A junior developer committed an AWS IAM Access Key to a feature branch.\n- **Response**:\n  1. Revoked key in AWS IAM within 4 minutes.\n  2. Executed `git-filter-repo` to permanently erase the commit from all branches and tags.\n  3. Force-pushed updated reflog to remote; notified all developers to prune local clones.\n  4. Installed `gitleaks` pre-commit hook across all team repositories.\n- **Outcome**: Zero unauthorized AWS access detected in CloudTrail; recurrence eliminated.\n\n---\n\n## Verification Checklist\n\n- [ ] `.gitignore` explicitly blocks `.env`, `.env.*`, and private key files.\n- [ ] `.env.example` provides an up-to-date manifest of all required keys with dummy values.\n- [ ] Pre-commit hook runs `gitleaks` or `trufflehog` on staged changes.\n- [ ] Production secrets are fetched at runtime via IAM-authenticated vaults.\n- [ ] Documented rotation runbook exists for all third-party API credentials.\n\n---\n\n## Anti-Patterns\n\n- **The \"Private Repo\" Fallacy**: Assuming hardcoded keys are safe because the GitHub repository is currently private.\n- **Committing and Amending**: Making a new commit that deletes the secret without purging the commit history where the key remains readable.\n- **Slack\u002FEmail Secret Sharing**: Pasting production passwords into Slack DMs or email threads.\n",{"name":5,"group":24,"description":7,"last_reviewed":25},"Security",1788652800000,"main","f6a053c46d4bf0f779ea766c929b6f6f92c51765","skills\u002Fsecrets-management","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskillary","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp","poorvithmp.com","Shipping tools for problems people notice too late.","2026-10-02 21:32:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add poorvith-mp\u002Fskills-developer --skill secrets-management",{"tool":41,"command":42},"bunx","bunx skills add poorvith-mp\u002Fskills-developer --skill secrets-management",{"tool":44,"command":45},"pnpm","pnpm dlx skills add poorvith-mp\u002Fskills-developer --skill secrets-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Frouting.yaml","REFERENCE","参考文档",914,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002Fevals\u002Frouting.yaml",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"secrets-management.skill","OTHER","其他",3425,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002Fsecrets-management.skill",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M792Q79X14YD94WXEEJY9GCW","workflow-optimizer","Moved to workflow-mapping in skills-agents. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-optimizer\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M792Q387DNC91VKEVM07SJM3","webhooks","Build webhook receivers with signature verification, idempotency, retries and dead letter queues. Use when implementing, verifying, or signing incoming\u002Foutgoing webhooks.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fwebhooks\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M792PZW0SM71X7V9709ZWHCR","webhook-handler-builder","Moved to webhooks in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fwebhook-handler-builder\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M792PW7XPB7J9S0QSS52JXZV","voice-ai-integration-engineer","Moved to speech-pipelines in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fvoice-ai-integration-engineer\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M792PRZ5GSAQ1P2999V9XAJ5","typescript-migrator","Moved to port-code in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Ftypescript-migrator\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M792PQDARKP00V8Z3GYD4QZP","trigger-dev","Moved to trigger-dev in skills-agents. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Ftrigger-dev\u002FSKILL.md",[],[]]