Validate that files matched by .sops.yaml creation_rules are SOPS-encrypted.
Project description
sops-checker
sops-checker inspects the creation_rules in .sops.yaml and verifies that each matching file already looks SOPS-encrypted. It can optionally encrypt files in place via sops --encrypt --in-place. You can grab the latest release from PyPI.
Built collaboratively with OpenAI Codex to streamline packaging and release prep.
SOPS itself is maintained by the getsops community and contributors—huge thanks to them for the encryption tooling this checker relies on.
Installation
pip install sops-checker
For development:
uv pip install -e .
Prerequisites for local workflows
- sops – encrypts files when
--fixis used; install via Homebrew (brew install sops) or your package manager. - mise – optional toolchain manager if you rely on the provided
mise.tomlto install Python/uv/just (mise install). - uv – fast package manager used in the Just recipes and CI (
brew install uv). - just – task runner powering the commands in
Justfile(brew install just). - gitleaks – required for
just lintto run secrets scans (brew install gitleaks).
Usage
sops-checker [ROOT] [--fix]
ROOTdefaults to the current directory.--fixencrypts files that match the rules but are not SOPS-encrypted yet.
# Dry-run
sops-checker
# Automatically encrypt missing files
sops-checker --fix
The command exits non-zero when it finds unencrypted files (unless --fix succeeds).
Note: The current implementation inspects files described in
.sops.yamlcreation rules and only understands YAML/plaintext formats. Binary or non-YAML files are treated as unencrypted unless they have the SOPS magic header at the start of the file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sops_checker-0.2.0.tar.gz.
File metadata
- Download URL: sops_checker-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d191acae8ba299c2285aeed4b0957afca1db7ecd1f5aa7f188503838e6c1655
|
|
| MD5 |
fb84b8622074c18bbbb479ff41d67d08
|
|
| BLAKE2b-256 |
e8d1cbe1053595bf929488d6c380bcb41b91eb5948eff7547798adb857c98233
|
File details
Details for the file sops_checker-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sops_checker-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e4462993686d8756c95a46255227babdd62d08201fb9825914ef1f35868e16c
|
|
| MD5 |
4d4fca08939405e61b01c30e675a7471
|
|
| BLAKE2b-256 |
fb4fb92c45ebdf197960b5e74955b3b08155ba1dfd415884e3ea819e7d0dedd8
|