The most insecure secrets management you'll ever find
Find a file
Max Bossing c9efd3d31b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
added the ability to encrypt strings from the cli
2026-04-05 21:52:47 +02:00
src added the ability to encrypt strings from the cli 2026-04-05 21:52:47 +02:00
.gitignore init 2026-04-04 20:01:43 +02:00
.woodpecker.yaml init 2026-04-04 20:01:43 +02:00
Cargo.lock added the ability to encrypt strings from the cli 2026-04-05 21:52:47 +02:00
Cargo.toml added the ability to encrypt strings from the cli 2026-04-05 21:52:47 +02:00
LICENSE init 2026-04-04 20:01:43 +02:00
README.md [skip ci]docs: added ci badge 2026-04-04 22:05:25 +02:00

Confcrypt - The most unsafe secrets management you'll ever find

status-badge

Some time ago I created a tool called gitsync to sync single files from a git repo to my server for config management purposes. One thing I noticed was that these files often contained secrets and so I wanted a way to en- and decrypt them on the fly. SOPS springs to mind immediately, but it wasnt fit for my purpose because I wanted selective encryption (meaning I wanted to be able to control which values were encrypted) and I also wanted to allow editing the file without having to de- and re-encrypt it. So this barely working tool was born.

This tool currently only supports yaml and env files.

Installation

confcrypt is a binary without external dependencies except glibc. Grab yourself the newest version from releases and just put it in /usr/bin. No configuration needed

To decrypt, you must provide the process with an env var named CONFCRYPT_PRIVATE_KEY containing the private key to the public key used for encryption.

Usage

General

A path to a file may be specified as input using -i/--input or as output with -o/--output. If they are not present, it will read from stdin and write to stdout respectively.

Decrypting

The decryption process is the same regardless of filetype. confcrypt decrypt (-i FILE, -o FILE)

Encrypting

When encrypting you must provide the public key to encrypt for, and the file type. currently supported file types are yaml and env.

Encrypting a yaml file

confcrypt encrypt -i file.yaml -o file.crypt.yaml -f yaml -p <PUBLIC KEY>

Encrypting an env file

confcrypt encrypt -i file.yaml -o file.crypt.yaml -f yaml -p <PUBLIC KEY>

Known Problems

  • #@nocrypt doesnt work for List items, Because I do some weird shit to find out which lines are marked with it, and because serde_yaml doesn't preserve them so I'm kinda guessing lol

Documentation is due soon, I promise

License

Disclaimer: Don't use this. It's not very secure

MIT