AI Tools & Scripts
SOPS Secrets Config Check
Check SOPS, age, Sealed Secrets and External Secrets setups before you commit: plaintext files your .sops.yaml should encrypt, decrypted copies, committed decryption keys and key backups, and broken creation rules.
What you get: 1 file · 50.99 KB · ZIP
See purchase optionsProduct description
A quick sops -d secrets.enc.yaml > secrets.dec.yaml leaves a plaintext copy next to the encrypted file, and the next git add -A commits it. A value added to an encrypted file with a normal editor stays in clear text while the file still looks encrypted. A .sops.yaml key written as path-regex or hc_vault_uris is ignored by SOPS without an error. And a Flux sops-age Secret or a Sealed Secrets main.key backup in the repository hands out the key to every secret at once. This skill finds those patterns and the others listed below, and tells you how to fix each one.
Your agent runs a scanner on the repository. It reads .sops.yaml files and applies their creation rules much as SOPS does (first matching path_regex from the folder of the .sops.yaml, a rule without path_regex matches everything, the encrypted_regex, unencrypted_regex and suffix selectors, and the _unencrypted suffix when a rule sets no selector), reads SOPS metadata in YAML, JSON, dotenv and INI files (a sops: block, sops_ keys or a [sops] section, ENC[...] values, one block per YAML document), and opens age identity files, Kubernetes Secret, SealedSecret, ExternalSecret, SecretStore and ClusterSecretStore manifests (also kind: List exports), and Makefiles and scripts that run sops decrypt. It skips files that a .gitignore rule ignores; it does not read the git index, so a file that is already tracked is judged by .gitignore alone. Public age1... recipients, SealedSecret ciphertext, ENC[...] values, ${VAR} and {{ }} placeholders, Helm templates and test folders are not reported. It never runs sops, age, kubeseal, kubectl or git, and never decrypts anything. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK (fix before shipping)
- S01: a decryption key in the repository: an age identity (also post-quantum AGE-SECRET-KEY-PQ-1...), a PGP private key block, SOPS_AGE_KEY set to a literal value, a Flux decryption Secret (.agekey or sops.asc) with its value, a private key inside base64 Secret data, or an identity pasted where .sops.yaml needs the public age1... recipient
- S02: a Sealed Secrets controller key backup (a Secret labelled sealedsecrets.bitnami.com/sealed-secrets-key, or the legacy sealed-secrets-key Secret, with tls.key), as YAML, JSON or a kind: List export such as main.key
- S03: a file a .sops.yaml creation rule selects that has no SOPS metadata and holds plaintext secrets in the keys that rule would encrypt
- S04: a SOPS-encrypted file with a plaintext secret value: added with an editor, appended as a plain YAML document, or left plain by the file's selector
- S05: a decrypted copy beside its encrypted twin (db.dec.yaml beside db.enc.yaml, app.env beside app.sops.env) with plain values at the twin's encrypted keys and no .gitignore rule
REVIEW (check before release)
- S11: a .sops.yaml SOPS refuses or partly ignores: a .sops.yml file name, unknown keys (path-regex, hc_vault_uris), a rule with no key or an empty key group, two of the six selectors in one rule, a shamir_threshold of 1 or above the number of key groups, a path_regex with lookahead or backreferences that Go RE2 cannot compile, an age entry that is not a recipient, or a rule after a catch-all rule
- S12: a selector that leaves common secret keys plain (unencrypted_regex or unencrypted_suffix matching password, token, secret, data or stringData, or an encrypted_regex matching none of them)
- S13: mac_only_encrypted: true, which lets plain values change without breaking the integrity check
- S14: a plaintext Kubernetes Secret in a repository that already uses SOPS, Sealed Secrets or External Secrets
- S15: a SealedSecret sealed with the cluster-wide scope
- S16: a ClusterSecretStore with no conditions limiting which namespaces may use it
- S17: an External Secrets store with the fake provider or a plain http:// backend outside dev and test paths, or a literal credential in the provider
- S18: sops decrypt output written into the repository (> file, --output, decrypt -i) by a Makefile or script, or a file named as a decrypted copy, with no .gitignore rule (CI files are not reported)
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason, safer approach and official source for each rule
- A risky and a safe example GitOps repository (Flux cluster folder, app settings, Sealed Secrets and External Secrets), and the real report the scanner produces on the risky one
Limits
SOPS looks for .sops.yaml from the folder it runs in; the scanner uses the nearest .sops.yaml above each file, which matches the usual layout. path_regex is matched with Python regular expressions, so rare Go-only syntax is skipped. Secrets are recognised by key names and by Secret data, so a secret under a neutral key name is not seen, and comment-based selectors are not evaluated. ENC[...] values are trusted as encrypted; nothing is decrypted and MACs are not checked. Whether a file is committed is decided from .gitignore files only. Hard-coded credentials in application code are outside this check. NOT FLAGGED is not a guarantee.
Contents
One ZIP file with 30 files: SKILL.md, the scanner in scripts/ (7 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (20 example files plus report.md, the real scanner output on the risky example).
How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.
What you get
1 file · 50.99 KB
- sops-secrets-config-check-1.0.0.zipZIP · 50.99 KB
AI Tools & Scripts
SOPS Secrets Config Check
Check SOPS, age, Sealed Secrets and External Secrets setups before you commit: plaintext files your .sops.yaml should encrypt, decrypted copies, committed decryption keys and key backups, and broken creation rules.
Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 50.99 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$5.00



