https://github.com/ceejbot/octosecret
given a public key, seal a secret value in a box
https://github.com/ceejbot/octosecret
Last synced: 9 months ago
JSON representation
given a public key, seal a secret value in a box
- Host: GitHub
- URL: https://github.com/ceejbot/octosecret
- Owner: ceejbot
- License: mit
- Created: 2020-04-23T18:25:13.000Z (about 6 years ago)
- Default Branch: latest
- Last Pushed: 2021-06-25T21:03:09.000Z (about 5 years ago)
- Last Synced: 2025-10-10T21:27:36.583Z (9 months ago)
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# octosecret
Encrypt secrets using libsodium sealed boxes, via [sodiumoxide](https://docs.rs/sodiumoxide/0.2.5/sodiumoxide/). My use case is to set [Github secrets](https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository) in some automated workflows; you might find it similarly handy.
Takes one argument: a base64-encoded public key. Reads the secret value from stdin. It sends to stdout the base64-encoded result of encrypting the input with the public key.
```shell
printf "it's a secret to everyone" | octosecret
```
If you have administrative access to a github repo plus an api token handy, you can fetch its public key like this:
```shell
http GET https://api.github.com/repos/ceejbot/octosecret/actions/secrets/public-key Authorization:"token deadbeef" | jq .key
```
## Installing
Downloadable binaries for darwin & amd64 are provided on the releases page.
## License
MIT