07. References, Compliance Standards & Tooling
1. Industry Standards & Regulatory Frameworks
Secrets management is explicitly mandated by regulatory standards and security benchmarks worldwide.
+-------------------------------------------------------------------------------+
| REGULATORY & COMPLIANCE FRAMEWORKS |
+-------------------+-----------------------------------------------------------+
| STANDARD | MANDATED REQUIREMENT |
+-------------------+-----------------------------------------------------------+
| **NIST SP 800-57**| Recommendation for Key Management. Mandates cryptographically |
| | separate Key Encryption Keys (KEK) and Data Encryption |
| | Keys (DEK), short cryptoperiods, and emergency key |
| | revocation procedures. |
+-------------------+-----------------------------------------------------------+
| **PCI DSS v4.0** | - Requirement 3.5: Protect cryptographic keys against |
| | disclosure and modification. |
| | - Requirement 7.2: Target access controls based on |
| | least privilege and job function. |
| | - Requirement 8.6: Protect system accounts and machine |
| | authenticators. |
+-------------------+-----------------------------------------------------------+
| **CIS Kubernetes**| - Benchmark 1.1.13: Ensure encryption-provider-config is |
| **Benchmark** | configured on api-server. |
| | - Benchmark 5.1.2: Minimize access to Secret objects. |
+-------------------+-----------------------------------------------------------+
| **SOC 2 Type II** | Trust Services Criteria CC6.1 & CC6.3: Enforce logical |
| | access security over credentials and prevent secret |
| | exposure in configuration stores. |
+-------------------+-----------------------------------------------------------+
2. Common Weakness Enumeration (CWE) & CVE Catalog
CWE Taxonomy
- CWE-798: Use of Hard-coded Credentials: Hardcoding passwords, secret keys, or tokens in source code or binaries.
- CWE-312: Cleartext Storage of Sensitive Information: Storing unencrypted secrets in files, databases, or
etcd. - CWE-522: Insufficient Credentials Protection: Transmitting or storing credentials without strong encryption.
- CWE-532: Insertion of Sensitive Information into Log File: Printing API keys or tokens into stdout, stderr, or APM log files.
- CWE-256: Unprotected Storage of Credentials: Storing passwords in unprotected environment variables.
Notable Secret Exposure CVEs
- CVE-2023-28432 (MinIO): Information disclosure vulnerability exposing admin secret keys via diagnostic endpoints.
- CVE-2022-24765 (Git): Multi-user Git environment issue leading to secret execution context hijacking.
- CVE-2021-44228 (Log4j / Log4Shell): Unsanitized logging allowed arbitrary remote code execution, triggering massive environment secret dumping across Java ecosystems.
3. Open Source Security Tooling & Libraries
Secret Detection & Prevention
- Gitleaks: Fast, SAST-based secret scanner for developer workstations and CI/CD pipelines.
- TruffleHog: Active API verification engine for detecting and verifying leaked keys.
- pre-commit: Multi-language pre-commit hook framework for enforcing client-side guardrails.
Git History Cleanup
- git-filter-repo: Official recommended tool for rewriting Git commit history and purging leaked keys.
- BFG Repo-Cleaner: High-performance alternative for purging large files and credentials from Git repositories.
Orchestration & Kubernetes Add-ons
- External Secrets Operator (ESO): Kubernetes operator syncing secrets from external vaults to standard K8s secrets.
- Secrets Store CSI Driver: Mounts vault secrets as temporary in-memory files (
tmpfs). - Bitnami Sealed Secrets: One-way asymmetric encryption for GitOps secrets.
- Mozilla SOPS: Editor for encrypted files supporting AWS KMS, GCP KMS, Azure Key Vault, and Age.
Multi-Language SDKs
- Python:
hvac,boto3 - Node.js:
node-vault,@google-cloud/secret-manager - Go:
hashicorp/vault/api,azsecrets - Java:
spring-vault-core,azure-security-keyvault-secrets
4. Official Documentation & Further Reading
HashiCorp Vault
- Vault Production Hardening Guide
- Vault AppRole Authentication Engine
- Vault Transit Engine & Envelope Encryption
Cloud Provider Documentation
- AWS Secrets Manager Best Practices
- Google Cloud Secret Manager Architecture
- Azure Key Vault Developer's Guide