Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pre-commit-hook-ensure-sops-1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pre-commit-hook-ensure-sops-1.0.tar.gz.

File metadata

File hashes

Hashes for pre-commit-hook-ensure-sops-1.0.tar.gz
Algorithm Hash digest
SHA256 721357a2a5e03df13ca4430ae58892e16bde35e1eaa0492c875f7b3e64299af2
MD5 43666b890051637262c9168d852e482b
BLAKE2b-256 1cd8d06fc470a6dc16c7f18d991548b657693cd3b2835d7a1ec6e1496399df66

See more details on using hashes here.

Provenance

File details

Details for the file pre_commit_hook_ensure_sops-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pre_commit_hook_ensure_sops-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29504fbeccdae083e738e15649317164463d54b01d8bbee597e42cdae55d76a1
MD5 736eba47b0e91030ae89121d3cfa86e9
BLAKE2b-256 52ad8f51be4a6a7d7e9d36793ba2f1faab970ff9a94d6b29bbd6e2094ba3041f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page