Encrypt and decrypt a Kubernetes secret manifest with SOPS and age?
BeginnerProductionRapid-Fire Tool Questions
Answer
age-keygen -o key.txt
sops --encrypt --age age1qyx... --encrypted-regex '^(data|stringData)$' secret.yaml > secret.enc.yaml
SOPS_AGE_KEY_FILE=key.txt sops --decrypt secret.enc.yaml
--encrypted-regex keeps metadata readable in Git diffs while encrypting only the values.
More on Rapid-Fire Tool Questions
Gitleaks command to scan only staged changes before a commit?BeginnerTrivy command to fail a build only on fixable critical vulnerabilities?BeginnerGenerate a CycloneDX SBOM for an image with Syft and scan it with Grype?BeginnerCosign keyless verify command that pins the GitHub Actions workflow identity?IntermediateRun Checkov against a Terraform plan instead of raw HCL?BeginnerSemgrep command to scan with OWASP rules and fail on findings?Beginner