[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7783KBWRMRKQJAC4KZA0BC5":3,"skill-same:01M7783KBWRMRKQJAC4KZA0BC5":74},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7783KBWRMRKQJAC4KZA0BC5","secrets-vault-manager",null,"Use when the user asks to set up secret management infrastructure, integrate HashiCorp Vault, configure cloud secret stores (AWS Secrets Manager, Azure Key Vault, GCP Secret Manager), implement secret rotation, or audit secret access patterns.","kruxshnx\u002Fclaude-skills-devin","kruxshnx","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F127938788?v=4","01M757YM3F96N4K1BSE7Z0NQK7","ARJANGI GOVINDA KRISHNA","01M757YM43H5T7MP2B3DC13GZ2",2,"MIT","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"secrets-vault-manager\"\ndescription: \"Use when the user asks to set up secret management infrastructure, integrate HashiCorp Vault, configure cloud secret stores (AWS Secrets Manager, Azure Key Vault, GCP Secret Manager), implement secret rotation, or audit secret access patterns.\"\n---\n\n# Secrets Vault Manager\n\n**Tier:** POWERFUL\n**Category:** Engineering\n**Domain:** Security \u002F Infrastructure \u002F DevOps\n\n---\n\n## Overview\n\nProduction secret infrastructure management for teams running HashiCorp Vault, cloud-native secret stores, or hybrid architectures. This skill covers policy authoring, auth method configuration, automated rotation, dynamic secrets, audit logging, and incident response.\n\n**Distinct from env-secrets-manager** which handles local `.env` file hygiene and leak detection. This skill operates at the infrastructure layer — Vault clusters, cloud KMS, certificate authorities, and CI\u002FCD secret injection.\n\n### When to Use\n\n- Standing up a new Vault cluster or migrating to a managed secret store\n- Designing auth methods for services, CI runners, and human operators\n- Implementing automated credential rotation (database, API keys, certificates)\n- Auditing secret access patterns for compliance (SOC 2, ISO 27001, HIPAA)\n- Responding to a secret leak that requires mass revocation\n- Integrating secrets into Kubernetes workloads or CI\u002FCD pipelines\n\n---\n\n## HashiCorp Vault Patterns\n\n### Architecture Decisions\n\n| Decision | Recommendation | Rationale |\n|----------|---------------|-----------|\n| Deployment mode | HA with Raft storage | No external dependency, built-in leader election |\n| Auto-unseal | Cloud KMS (AWS KMS \u002F Azure Key Vault \u002F GCP KMS) | Eliminates manual unseal, enables automated restarts |\n| Namespaces | One per environment (dev\u002Fstaging\u002Fprod) | Blast-radius isolation, independent policies |\n| Audit devices | File + syslog (dual) | Vault refuses requests if all audit devices fail — dual prevents outages |\n\n### Auth Methods\n\n**AppRole** — Machine-to-machine authentication for services and batch jobs.\n\n```hcl\n# Enable AppRole\npath \"auth\u002Fapprole\u002F*\" {\n  capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\"]\n}\n\n# Application-specific role\nvault write auth\u002Fapprole\u002Frole\u002Fpayment-service \\\n  token_ttl=1h \\\n  token_max_ttl=4h \\\n  secret_id_num_uses=1 \\\n  secret_id_ttl=10m \\\n  token_policies=\"payment-service-read\"\n```\n\n**Kubernetes** — Pod-native authentication via service account tokens.\n\n```hcl\nvault write auth\u002Fkubernetes\u002Frole\u002Fapi-server \\\n  bound_service_account_names=api-server \\\n  bound_service_account_namespaces=production \\\n  policies=api-server-secrets \\\n  ttl=1h\n```\n\n**OIDC** — Human operator access via SSO provider (Okta, Azure AD, Google Workspace).\n\n```hcl\nvault write auth\u002Foidc\u002Frole\u002Fengineering \\\n  bound_audiences=\"vault\" \\\n  allowed_redirect_uris=\"https:\u002F\u002Fvault.example.com\u002Fui\u002Fvault\u002Fauth\u002Foidc\u002Foidc\u002Fcallback\" \\\n  user_claim=\"email\" \\\n  oidc_scopes=\"openid,profile,email\" \\\n  policies=\"engineering-read\" \\\n  ttl=8h\n```\n\n### Secret Engines\n\n| Engine | Use Case | TTL Strategy |\n|--------|----------|-------------|\n| KV v2 | Static secrets (API keys, config) | Versioned, manual rotation |\n| Database | Dynamic DB credentials | 1h default, 24h max |\n| PKI | TLS certificates | 90d leaf certs, 5y intermediate CA |\n| Transit | Encryption-as-a-service | Key rotation every 90d |\n| SSH | Signed SSH certificates | 30m for interactive, 8h for automation |\n\n### Policy Design\n\nFollow least-privilege with path-based granularity:\n\n```hcl\n# payment-service-read policy\npath \"secret\u002Fdata\u002Fproduction\u002Fpayment\u002F*\" {\n  capabilities = [\"read\"]\n}\n\npath \"database\u002Fcreds\u002Fpayment-readonly\" {\n  capabilities = [\"read\"]\n}\n\n# Deny access to admin paths explicitly\npath \"sys\u002F*\" {\n  capabilities = [\"deny\"]\n}\n```\n\n**Policy naming convention:** `{service}-{access-level}` (e.g., `payment-service-read`, `api-gateway-admin`).\n\n---\n\n## Cloud Secret Store Integration\n\n### Comparison Matrix\n\n| Feature | AWS Secrets Manager | Azure Key Vault | GCP Secret Manager |\n|---------|--------------------|-----------------|--------------------|\n| Rotation | Built-in Lambda | Custom logic via Functions | Cloud Functions |\n| Versioning | Automatic | Manual or automatic | Automatic |\n| Encryption | AWS KMS (default or CMK) | HSM-backed | Google-managed or CMEK |\n| Access control | IAM policies + resource policy | RBAC + Access Policies | IAM bindings |\n| Cross-region | Replication supported | Geo-redundant by default | Replication supported |\n| Audit | CloudTrail | Azure Monitor + Diagnostic Logs | Cloud Audit Logs |\n| Pricing model | Per-secret + per-API call | Per-operation + per-key | Per-secret version + per-access |\n\n### When to Use Which\n\n- **AWS Secrets Manager**: RDS\u002FAurora credential rotation out of the box. Best when fully on AWS.\n- **Azure Key Vault**: Certificate management strength. Required for Azure AD integrated workloads.\n- **GCP Secret Manager**: Simplest API surface. Best for GKE-native workloads with Workload Identity.\n- **HashiCorp Vault**: Multi-cloud, dynamic secrets, PKI, transit encryption. Best for complex or hybrid environments.\n\n### SDK Access Patterns\n\n**Principle:** Always fetch secrets at startup or via sidecar — never bake into images or config files.\n\n```python\n# AWS Secrets Manager pattern\nimport boto3, json\n\ndef get_secret(secret_name, region=\"us-east-1\"):\n    client = boto3.client(\"secretsmanager\", region_name=region)\n    response = client.get_secret_value(SecretId=secret_name)\n    return json.loads(response[\"SecretString\"])\n```\n\n```python\n# GCP Secret Manager pattern\nfrom google.cloud import secretmanager\n\ndef get_secret(project_id, secret_id, version=\"latest\"):\n    client = secretmanager.SecretManagerServiceClient()\n    name = f\"projects\u002F{project_id}\u002Fsecrets\u002F{secret_id}\u002Fversions\u002F{version}\"\n    response = client.access_secret_version(request={\"name\": name})\n    return response.payload.data.decode(\"UTF-8\")\n```\n\n```python\n# Azure Key Vault pattern\nfrom azure.identity import DefaultAzureCredential\nfrom azure.keyvault.secrets import SecretClient\n\ndef get_secret(vault_url, secret_name):\n    credential = DefaultAzureCredential()\n    client = SecretClient(vault_url=vault_url, credential=credential)\n    return client.get_secret(secret_name).value\n```\n\n---\n\n## Secret Rotation Workflows\n\n### Rotation Strategy by Secret Type\n\n| Secret Type | Rotation Frequency | Method | Downtime Risk |\n|-------------|-------------------|--------|---------------|\n| Database passwords | 30 days | Dual-account swap | Zero (A\u002FB rotation) |\n| API keys | 90 days | Generate new, deprecate old | Zero (overlap window) |\n| TLS certificates | 60 days before expiry | ACME or Vault PKI | Zero (graceful reload) |\n| SSH keys | 90 days | Vault-signed certificates | Zero (CA-based) |\n| Service tokens | 24 hours | Dynamic generation | Zero (short-lived) |\n| Encryption keys | 90 days | Key versioning (rewrap) | Zero (version coexistence) |\n\n### Database Credential Rotation (Dual-Account)\n\n1. Two database accounts exist: `app_user_a` and `app_user_b`\n2. Application currently uses `app_user_a`\n3. Rotation rotates `app_user_b` password, updates secret store\n4. Application switches to `app_user_b` on next credential fetch\n5. After grace period, `app_user_a` password is rotated\n6. Cycle repeats\n\n### API Key Rotation (Overlap Window)\n\n1. Generate new API key with provider\n2. Store new key in secret store as `current`, move old to `previous`\n3. Deploy applications — they read `current`\n4. After all instances restarted (or TTL expired), revoke `previous`\n5. Monitoring confirms zero usage of old key before revocation\n\n---\n\n## Dynamic Secrets\n\nDynamic secrets are generated on-demand with automatic expiration. Prefer dynamic secrets over static credentials wherever possible.\n\n### Database Dynamic Credentials (Vault)\n\n```hcl\n# Configure database engine\nvault write database\u002Fconfig\u002Fpostgres \\\n  plugin_name=postgresql-database-plugin \\\n  connection_url=\"postgresql:\u002F\u002F{{username}}:{{password}}@db.example.com:5432\u002Fapp\" \\\n  allowed_roles=\"app-readonly,app-readwrite\" \\\n  username=\"vault_admin\" \\\n  password=\"\u003Cadmin-password>\"\n\n# Create role with TTL\nvault write database\u002Froles\u002Fapp-readonly \\\n  db_name=postgres \\\n  creation_statements=\"CREATE ROLE \\\"{{name}}\\\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \\\"{{name}}\\\";\" \\\n  default_ttl=1h \\\n  max_ttl=24h\n```\n\n### Cloud IAM Dynamic Credentials\n\nVault can generate short-lived AWS IAM credentials, Azure service principal passwords, or GCP service account keys — eliminating long-lived cloud credentials entirely.\n\n### SSH Certificate Authority\n\nReplace SSH key distribution with a Vault-signed certificate model:\n\n1. Vault acts as SSH CA\n2. Users\u002Fmachines request signed certificates with short TTL (30 min)\n3. SSH servers trust the CA public key — no `authorized_keys` management\n4. Certificates expire automatically — no revocation needed for normal operations\n\n---\n\n## Audit Logging\n\n### What to Log\n\n| Event | Priority | Retention |\n|-------|----------|-----------|\n| Secret read access | HIGH | 1 year minimum |\n| Secret creation\u002Fupdate | HIGH | 1 year minimum |\n| Auth method login | MEDIUM | 90 days |\n| Policy changes | CRITICAL | 2 years (compliance) |\n| Failed access attempts | CRITICAL | 1 year |\n| Token creation\u002Frevocation | MEDIUM | 90 days |\n| Seal\u002Funseal operations | CRITICAL | Indefinite |\n\n### Anomaly Detection Signals\n\n- Secret accessed from new IP\u002FCIDR range\n- Access volume spike (>3x baseline for a path)\n- Off-hours access for human auth methods\n- Service accessing secrets outside its policy scope (denied requests)\n- Multiple failed auth attempts from single source\n- Token created with unusually long TTL\n\n### Compliance Reporting\n\nGenerate periodic reports covering:\n\n1. **Access inventory** — Which identities accessed which secrets, when\n2. **Rotation compliance** — Secrets overdue for rotation\n3. **Policy drift** — Policies modified since last review\n4. **Orphaned secrets** — Secrets with no recent access (>90 days)\n\nUse `audit_log_analyzer.py` to parse Vault or cloud audit logs for these signals.\n\n---\n\n## Emergency Procedures\n\n### Secret Leak Response (Immediate)\n\n**Time target: Contain within 15 minutes of detection.**\n\n1. **Identify scope** — Which secret(s) leaked, where (repo, log, error message, third party)\n2. **Revoke immediately** — Rotate the compromised credential at the source (provider API, Vault, cloud SM)\n3. **Invalidate tokens** — Revoke all Vault tokens that accessed the leaked secret\n4. **Audit blast radius** — Query audit logs for usage of the compromised secret in the exposure window\n5. **Notify stakeholders** — Security team, affected service owners, compliance (if PII\u002Fregulated data)\n6. **Post-mortem** — Document root cause, update controls to prevent recurrence\n\n### Vault Seal Operations\n\n**When to seal:** Active security incident affecting Vault infrastructure, suspected key compromise.\n\n**Sealing** stops all Vault operations. Use only as last resort.\n\n**Unseal procedure:**\n1. Gather quorum of unseal key holders (Shamir threshold)\n2. Or confirm auto-unseal KMS key is accessible\n3. Unseal via `vault operator unseal` or restart with auto-unseal\n4. Verify audit devices reconnected\n5. Check active leases and token validity\n\nSee `references\u002Femergency_procedures.md` for complete playbooks.\n\n---\n\n## CI\u002FCD Integration\n\n### Vault Agent Sidecar (Kubernetes)\n\nVault Agent runs alongside application pods, handles authentication and secret rendering:\n\n```yaml\n# Pod annotation for Vault Agent Injector\nannotations:\n  vault.hashicorp.com\u002Fagent-inject: \"true\"\n  vault.hashicorp.com\u002Frole: \"api-server\"\n  vault.hashicorp.com\u002Fagent-inject-secret-db: \"database\u002Fcreds\u002Fapp-readonly\"\n  vault.hashicorp.com\u002Fagent-inject-template-db: |\n    {{- with secret \"database\u002Fcreds\u002Fapp-readonly\" -}}\n    postgresql:\u002F\u002F{{ .Data.username }}:{{ .Data.password }}@db:5432\u002Fapp\n    {{- end }}\n```\n\n### External Secrets Operator (Kubernetes)\n\nFor teams preferring declarative GitOps over agent sidecars:\n\n```yaml\napiVersion: external-secrets.io\u002Fv1beta1\nkind: ExternalSecret\nmetadata:\n  name: api-credentials\nspec:\n  refreshInterval: 1h\n  secretStoreRef:\n    name: vault-backend\n    kind: ClusterSecretStore\n  target:\n    name: api-credentials\n  data:\n    - secretKey: api-key\n      remoteRef:\n        key: secret\u002Fdata\u002Fproduction\u002Fapi\n        property: key\n```\n\n### GitHub Actions OIDC\n\nEliminate long-lived secrets in CI by using OIDC federation:\n\n```yaml\n- name: Authenticate to Vault\n  uses: hashicorp\u002Fvault-action@v2\n  with:\n    url: https:\u002F\u002Fvault.example.com\n    method: jwt\n    role: github-ci\n    jwtGithubAudience: https:\u002F\u002Fvault.example.com\n    secrets: |\n      secret\u002Fdata\u002Fci\u002Fdeploy api_key | DEPLOY_API_KEY ;\n      secret\u002Fdata\u002Fci\u002Fdeploy db_password | DB_PASSWORD\n```\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Risk | Correct Approach |\n|-------------|------|-----------------|\n| Hardcoded secrets in source code | Leak via repo, logs, error output | Fetch from secret store at runtime |\n| Long-lived static tokens (>30 days) | Stale credentials, no accountability | Dynamic secrets or short TTL + rotation |\n| Shared service accounts | No audit trail per consumer | Per-service identity with unique credentials |\n| No rotation policy | Compromised creds persist indefinitely | Automated rotation on schedule |\n| Secrets in environment variables on CI | Visible in build logs, process table | Vault Agent or OIDC-based injection |\n| Single unseal key holder | Bus factor of 1, recovery blocked | Shamir split (3-of-5) or auto-unseal |\n| No audit device configured | Zero visibility into access | Dual audit devices (file + syslog) |\n| Wildcard policies (`path \"*\"`) | Over-permissioned, violates least privilege | Explicit path-based policies per service |\n\n---\n\n## Tools\n\n| Script | Purpose |\n|--------|---------|\n| `vault_config_generator.py` | Generate Vault policy and auth config from application requirements |\n| `rotation_planner.py` | Create rotation schedule from a secret inventory file |\n| `audit_log_analyzer.py` | Analyze audit logs for anomalies and compliance gaps |\n\n---\n\n## Cross-References\n\n- **env-secrets-manager** — Local `.env` file hygiene, leak detection, drift awareness\n- **senior-secops** — Security operations, incident response, threat modeling\n- **ci-cd-pipeline-builder** — Pipeline design where secrets are consumed\n- **docker-development** — Container secret injection patterns\n- **helm-chart-builder** — Kubernetes secret management in Helm charts\n","# Secrets Vault Manager\n\n**Tier:** POWERFUL\n**Category:** Engineering\n**Domain:** Security \u002F Infrastructure \u002F DevOps\n\n---\n\n## Overview\n\nProduction secret infrastructure management for teams running HashiCorp Vault, cloud-native secret stores, or hybrid architectures. This skill covers policy authoring, auth method configuration, automated rotation, dynamic secrets, audit logging, and incident response.\n\n**Distinct from env-secrets-manager** which handles local `.env` file hygiene and leak detection. This skill operates at the infrastructure layer — Vault clusters, cloud KMS, certificate authorities, and CI\u002FCD secret injection.\n\n### When to Use\n\n- Standing up a new Vault cluster or migrating to a managed secret store\n- Designing auth methods for services, CI runners, and human operators\n- Implementing automated credential rotation (database, API keys, certificates)\n- Auditing secret access patterns for compliance (SOC 2, ISO 27001, HIPAA)\n- Responding to a secret leak that requires mass revocation\n- Integrating secrets into Kubernetes workloads or CI\u002FCD pipelines\n\n---\n\n## HashiCorp Vault Patterns\n\n### Architecture Decisions\n\n| Decision | Recommendation | Rationale |\n|----------|---------------|-----------|\n| Deployment mode | HA with Raft storage | No external dependency, built-in leader election |\n| Auto-unseal | Cloud KMS (AWS KMS \u002F Azure Key Vault \u002F GCP KMS) | Eliminates manual unseal, enables automated restarts |\n| Namespaces | One per environment (dev\u002Fstaging\u002Fprod) | Blast-radius isolation, independent policies |\n| Audit devices | File + syslog (dual) | Vault refuses requests if all audit devices fail — dual prevents outages |\n\n### Auth Methods\n\n**AppRole** — Machine-to-machine authentication for services and batch jobs.\n\n```hcl\n# Enable AppRole\npath \"auth\u002Fapprole\u002F*\" {\n  capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\"]\n}\n\n# Application-specific role\nvault write auth\u002Fapprole\u002Frole\u002Fpayment-service \\\n  token_ttl=1h \\\n  token_max_ttl=4h \\\n  secret_id_num_uses=1 \\\n  secret_id_ttl=10m \\\n  token_policies=\"payment-service-read\"\n```\n\n**Kubernetes** — Pod-native authentication via service account tokens.\n\n```hcl\nvault write auth\u002Fkubernetes\u002Frole\u002Fapi-server \\\n  bound_service_account_names=api-server \\\n  bound_service_account_namespaces=production \\\n  policies=api-server-secrets \\\n  ttl=1h\n```\n\n**OIDC** — Human operator access via SSO provider (Okta, Azure AD, Google Workspace).\n\n```hcl\nvault write auth\u002Foidc\u002Frole\u002Fengineering \\\n  bound_audiences=\"vault\" \\\n  allowed_redirect_uris=\"https:\u002F\u002Fvault.example.com\u002Fui\u002Fvault\u002Fauth\u002Foidc\u002Foidc\u002Fcallback\" \\\n  user_claim=\"email\" \\\n  oidc_scopes=\"openid,profile,email\" \\\n  policies=\"engineering-read\" \\\n  ttl=8h\n```\n\n### Secret Engines\n\n| Engine | Use Case | TTL Strategy |\n|--------|----------|-------------|\n| KV v2 | Static secrets (API keys, config) | Versioned, manual rotation |\n| Database | Dynamic DB credentials | 1h default, 24h max |\n| PKI | TLS certificates | 90d leaf certs, 5y intermediate CA |\n| Transit | Encryption-as-a-service | Key rotation every 90d |\n| SSH | Signed SSH certificates | 30m for interactive, 8h for automation |\n\n### Policy Design\n\nFollow least-privilege with path-based granularity:\n\n```hcl\n# payment-service-read policy\npath \"secret\u002Fdata\u002Fproduction\u002Fpayment\u002F*\" {\n  capabilities = [\"read\"]\n}\n\npath \"database\u002Fcreds\u002Fpayment-readonly\" {\n  capabilities = [\"read\"]\n}\n\n# Deny access to admin paths explicitly\npath \"sys\u002F*\" {\n  capabilities = [\"deny\"]\n}\n```\n\n**Policy naming convention:** `{service}-{access-level}` (e.g., `payment-service-read`, `api-gateway-admin`).\n\n---\n\n## Cloud Secret Store Integration\n\n### Comparison Matrix\n\n| Feature | AWS Secrets Manager | Azure Key Vault | GCP Secret Manager |\n|---------|--------------------|-----------------|--------------------|\n| Rotation | Built-in Lambda | Custom logic via Functions | Cloud Functions |\n| Versioning | Automatic | Manual or automatic | Automatic |\n| Encryption | AWS KMS (default or CMK) | HSM-backed | Google-managed or CMEK |\n| Access control | IAM policies + resource policy | RBAC + Access Policies | IAM bindings |\n| Cross-region | Replication supported | Geo-redundant by default | Replication supported |\n| Audit | CloudTrail | Azure Monitor + Diagnostic Logs | Cloud Audit Logs |\n| Pricing model | Per-secret + per-API call | Per-operation + per-key | Per-secret version + per-access |\n\n### When to Use Which\n\n- **AWS Secrets Manager**: RDS\u002FAurora credential rotation out of the box. Best when fully on AWS.\n- **Azure Key Vault**: Certificate management strength. Required for Azure AD integrated workloads.\n- **GCP Secret Manager**: Simplest API surface. Best for GKE-native workloads with Workload Identity.\n- **HashiCorp Vault**: Multi-cloud, dynamic secrets, PKI, transit encryption. Best for complex or hybrid environments.\n\n### SDK Access Patterns\n\n**Principle:** Always fetch secrets at startup or via sidecar — never bake into images or config files.\n\n```python\n# AWS Secrets Manager pattern\nimport boto3, json\n\ndef get_secret(secret_name, region=\"us-east-1\"):\n    client = boto3.client(\"secretsmanager\", region_name=region)\n    response = client.get_secret_value(SecretId=secret_name)\n    return json.loads(response[\"SecretString\"])\n```\n\n```python\n# GCP Secret Manager pattern\nfrom google.cloud import secretmanager\n\ndef get_secret(project_id, secret_id, version=\"latest\"):\n    client = secretmanager.SecretManagerServiceClient()\n    name = f\"projects\u002F{project_id}\u002Fsecrets\u002F{secret_id}\u002Fversions\u002F{version}\"\n    response = client.access_secret_version(request={\"name\": name})\n    return response.payload.data.decode(\"UTF-8\")\n```\n\n```python\n# Azure Key Vault pattern\nfrom azure.identity import DefaultAzureCredential\nfrom azure.keyvault.secrets import SecretClient\n\ndef get_secret(vault_url, secret_name):\n    credential = DefaultAzureCredential()\n    client = SecretClient(vault_url=vault_url, credential=credential)\n    return client.get_secret(secret_name).value\n```\n\n---\n\n## Secret Rotation Workflows\n\n### Rotation Strategy by Secret Type\n\n| Secret Type | Rotation Frequency | Method | Downtime Risk |\n|-------------|-------------------|--------|---------------|\n| Database passwords | 30 days | Dual-account swap | Zero (A\u002FB rotation) |\n| API keys | 90 days | Generate new, deprecate old | Zero (overlap window) |\n| TLS certificates | 60 days before expiry | ACME or Vault PKI | Zero (graceful reload) |\n| SSH keys | 90 days | Vault-signed certificates | Zero (CA-based) |\n| Service tokens | 24 hours | Dynamic generation | Zero (short-lived) |\n| Encryption keys | 90 days | Key versioning (rewrap) | Zero (version coexistence) |\n\n### Database Credential Rotation (Dual-Account)\n\n1. Two database accounts exist: `app_user_a` and `app_user_b`\n2. Application currently uses `app_user_a`\n3. Rotation rotates `app_user_b` password, updates secret store\n4. Application switches to `app_user_b` on next credential fetch\n5. After grace period, `app_user_a` password is rotated\n6. Cycle repeats\n\n### API Key Rotation (Overlap Window)\n\n1. Generate new API key with provider\n2. Store new key in secret store as `current`, move old to `previous`\n3. Deploy applications — they read `current`\n4. After all instances restarted (or TTL expired), revoke `previous`\n5. Monitoring confirms zero usage of old key before revocation\n\n---\n\n## Dynamic Secrets\n\nDynamic secrets are generated on-demand with automatic expiration. Prefer dynamic secrets over static credentials wherever possible.\n\n### Database Dynamic Credentials (Vault)\n\n```hcl\n# Configure database engine\nvault write database\u002Fconfig\u002Fpostgres \\\n  plugin_name=postgresql-database-plugin \\\n  connection_url=\"postgresql:\u002F\u002F{{username}}:{{password}}@db.example.com:5432\u002Fapp\" \\\n  allowed_roles=\"app-readonly,app-readwrite\" \\\n  username=\"vault_admin\" \\\n  password=\"\u003Cadmin-password>\"\n\n# Create role with TTL\nvault write database\u002Froles\u002Fapp-readonly \\\n  db_name=postgres \\\n  creation_statements=\"CREATE ROLE \\\"{{name}}\\\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \\\"{{name}}\\\";\" \\\n  default_ttl=1h \\\n  max_ttl=24h\n```\n\n### Cloud IAM Dynamic Credentials\n\nVault can generate short-lived AWS IAM credentials, Azure service principal passwords, or GCP service account keys — eliminating long-lived cloud credentials entirely.\n\n### SSH Certificate Authority\n\nReplace SSH key distribution with a Vault-signed certificate model:\n\n1. Vault acts as SSH CA\n2. Users\u002Fmachines request signed certificates with short TTL (30 min)\n3. SSH servers trust the CA public key — no `authorized_keys` management\n4. Certificates expire automatically — no revocation needed for normal operations\n\n---\n\n## Audit Logging\n\n### What to Log\n\n| Event | Priority | Retention |\n|-------|----------|-----------|\n| Secret read access | HIGH | 1 year minimum |\n| Secret creation\u002Fupdate | HIGH | 1 year minimum |\n| Auth method login | MEDIUM | 90 days |\n| Policy changes | CRITICAL | 2 years (compliance) |\n| Failed access attempts | CRITICAL | 1 year |\n| Token creation\u002Frevocation | MEDIUM | 90 days |\n| Seal\u002Funseal operations | CRITICAL | Indefinite |\n\n### Anomaly Detection Signals\n\n- Secret accessed from new IP\u002FCIDR range\n- Access volume spike (>3x baseline for a path)\n- Off-hours access for human auth methods\n- Service accessing secrets outside its policy scope (denied requests)\n- Multiple failed auth attempts from single source\n- Token created with unusually long TTL\n\n### Compliance Reporting\n\nGenerate periodic reports covering:\n\n1. **Access inventory** — Which identities accessed which secrets, when\n2. **Rotation compliance** — Secrets overdue for rotation\n3. **Policy drift** — Policies modified since last review\n4. **Orphaned secrets** — Secrets with no recent access (>90 days)\n\nUse `audit_log_analyzer.py` to parse Vault or cloud audit logs for these signals.\n\n---\n\n## Emergency Procedures\n\n### Secret Leak Response (Immediate)\n\n**Time target: Contain within 15 minutes of detection.**\n\n1. **Identify scope** — Which secret(s) leaked, where (repo, log, error message, third party)\n2. **Revoke immediately** — Rotate the compromised credential at the source (provider API, Vault, cloud SM)\n3. **Invalidate tokens** — Revoke all Vault tokens that accessed the leaked secret\n4. **Audit blast radius** — Query audit logs for usage of the compromised secret in the exposure window\n5. **Notify stakeholders** — Security team, affected service owners, compliance (if PII\u002Fregulated data)\n6. **Post-mortem** — Document root cause, update controls to prevent recurrence\n\n### Vault Seal Operations\n\n**When to seal:** Active security incident affecting Vault infrastructure, suspected key compromise.\n\n**Sealing** stops all Vault operations. Use only as last resort.\n\n**Unseal procedure:**\n1. Gather quorum of unseal key holders (Shamir threshold)\n2. Or confirm auto-unseal KMS key is accessible\n3. Unseal via `vault operator unseal` or restart with auto-unseal\n4. Verify audit devices reconnected\n5. Check active leases and token validity\n\nSee `references\u002Femergency_procedures.md` for complete playbooks.\n\n---\n\n## CI\u002FCD Integration\n\n### Vault Agent Sidecar (Kubernetes)\n\nVault Agent runs alongside application pods, handles authentication and secret rendering:\n\n```yaml\n# Pod annotation for Vault Agent Injector\nannotations:\n  vault.hashicorp.com\u002Fagent-inject: \"true\"\n  vault.hashicorp.com\u002Frole: \"api-server\"\n  vault.hashicorp.com\u002Fagent-inject-secret-db: \"database\u002Fcreds\u002Fapp-readonly\"\n  vault.hashicorp.com\u002Fagent-inject-template-db: |\n    {{- with secret \"database\u002Fcreds\u002Fapp-readonly\" -}}\n    postgresql:\u002F\u002F{{ .Data.username }}:{{ .Data.password }}@db:5432\u002Fapp\n    {{- end }}\n```\n\n### External Secrets Operator (Kubernetes)\n\nFor teams preferring declarative GitOps over agent sidecars:\n\n```yaml\napiVersion: external-secrets.io\u002Fv1beta1\nkind: ExternalSecret\nmetadata:\n  name: api-credentials\nspec:\n  refreshInterval: 1h\n  secretStoreRef:\n    name: vault-backend\n    kind: ClusterSecretStore\n  target:\n    name: api-credentials\n  data:\n    - secretKey: api-key\n      remoteRef:\n        key: secret\u002Fdata\u002Fproduction\u002Fapi\n        property: key\n```\n\n### GitHub Actions OIDC\n\nEliminate long-lived secrets in CI by using OIDC federation:\n\n```yaml\n- name: Authenticate to Vault\n  uses: hashicorp\u002Fvault-action@v2\n  with:\n    url: https:\u002F\u002Fvault.example.com\n    method: jwt\n    role: github-ci\n    jwtGithubAudience: https:\u002F\u002Fvault.example.com\n    secrets: |\n      secret\u002Fdata\u002Fci\u002Fdeploy api_key | DEPLOY_API_KEY ;\n      secret\u002Fdata\u002Fci\u002Fdeploy db_password | DB_PASSWORD\n```\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Risk | Correct Approach |\n|-------------|------|-----------------|\n| Hardcoded secrets in source code | Leak via repo, logs, error output | Fetch from secret store at runtime |\n| Long-lived static tokens (>30 days) | Stale credentials, no accountability | Dynamic secrets or short TTL + rotation |\n| Shared service accounts | No audit trail per consumer | Per-service identity with unique credentials |\n| No rotation policy | Compromised creds persist indefinitely | Automated rotation on schedule |\n| Secrets in environment variables on CI | Visible in build logs, process table | Vault Agent or OIDC-based injection |\n| Single unseal key holder | Bus factor of 1, recovery blocked | Shamir split (3-of-5) or auto-unseal |\n| No audit device configured | Zero visibility into access | Dual audit devices (file + syslog) |\n| Wildcard policies (`path \"*\"`) | Over-permissioned, violates least privilege | Explicit path-based policies per service |\n\n---\n\n## Tools\n\n| Script | Purpose |\n|--------|---------|\n| `vault_config_generator.py` | Generate Vault policy and auth config from application requirements |\n| `rotation_planner.py` | Create rotation schedule from a secret inventory file |\n| `audit_log_analyzer.py` | Analyze audit logs for anomalies and compliance gaps |\n\n---\n\n## Cross-References\n\n- **env-secrets-manager** — Local `.env` file hygiene, leak detection, drift awareness\n- **senior-secops** — Security operations, incident response, threat modeling\n- **ci-cd-pipeline-builder** — Pipeline design where secrets are consumed\n- **docker-development** — Container secret injection patterns\n- **helm-chart-builder** — Kubernetes secret management in Helm charts\n",{"name":5,"description":7},"devin\u002F1780503568-install-devin-skills","c1c6a7ac191f1fb795ae7f57f2fbfa600d3ef56b","engineering\u002Fskills\u002Fsecrets-vault-manager",0,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin","https:\u002F\u002Fgithub.com\u002Fkruxshnx","https:\u002F\u002Fgovinda-krishna.vercel.app\u002F","2026-06-04 00:21:41",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add kruxshnx\u002Fclaude-skills-devin --skill secrets-vault-manager",{"tool":38,"command":39},"bunx","bunx skills add kruxshnx\u002Fclaude-skills-devin --skill secrets-vault-manager",{"tool":41,"command":42},"pnpm","pnpm dlx skills add kruxshnx\u002Fclaude-skills-devin --skill secrets-vault-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002FSKILL.md",true,[46,52,56,60,66,70],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fcloud_secret_stores.md","REFERENCE","参考文档",11466,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Freferences\u002Fcloud_secret_stores.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Femergency_procedures.md",9939,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Freferences\u002Femergency_procedures.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fvault_patterns.md",10496,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Freferences\u002Fvault_patterns.md",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Faudit_log_analyzer.py","SCRIPT","脚本",12259,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Fscripts\u002Faudit_log_analyzer.py",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Frotation_planner.py",9101,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Fscripts\u002Frotation_planner.py",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Fvault_config_generator.py",10417,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fengineering\u002Fskills\u002Fsecrets-vault-manager\u002Fscripts\u002Fvault_config_generator.py",[75,82,89,96,103,110],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M779G0P3W78CJF700K9AHJ6M","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M779FBBF54JKVQAGBAYHWE0B","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M779EQ39CGK5Q4V78KC0HNMV","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M779EDS05MYFXBF7PGTVSDMA","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M779DVA52T5F0YC5HSM9BW4Z","notebooklm","Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M779D3SGW8FM1N8G0HK860WT","litreview","Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[]]