pre-commit hook to ensure that files that should be encrypted with sops are in fact encrypted
Project description
pre-commit-hook-ensure-sops
A pre-commit hook to ensure that users don't accidentally check-in unencrypted files into a repository that uses sops to safely store encrypted secrets.
By default, any file with the word secret
in its path is required to
be encrypted with sops
. This means any files under a directory
named secret
are also required to be encrypted. If you want to exempt
specific files or directories from this requirement in your repository,
use the exclude
option in your .pre-commit-config.yaml
. When pushing
secrets to a repo, better safe than sorry :)
Installation
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/yuvipanda/pre-commit-hook-ensure-sops
rev: v1.0
hooks:
- id: sops-encryption
# Uncomment to exclude all markdown files from encryption
# exclude: *.\.md
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
File details
Details for the file pre-commit-hook-ensure-sops-0.1.tar.gz
.
File metadata
- Download URL: pre-commit-hook-ensure-sops-0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c2e7aa4778646a30e2305ec38221cfa313172994e1620fff295d963d0181d14 |
|
MD5 | 354a756bf6f939bfd455b7d9b27ec2d8 |
|
BLAKE2b-256 | 67ce953ef29e0a7038868d8b9855512434fcef1887cc3400710a78b80befd458 |
Provenance
File details
Details for the file pre_commit_hook_ensure_sops-0.1-py3-none-any.whl
.
File metadata
- Download URL: pre_commit_hook_ensure_sops-0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c26b14f9fde984e0e4c68f160a2f3e4d853c5298e2f3b35e3572ef11f9ddcdee |
|
MD5 | 7ed5bdd34f3541792d8c1477b44d0e5a |
|
BLAKE2b-256 | e854e3d1af63c1d8c502cfc4468bedeee649ac5626166dc33d0344b7dce16faa |