Secrethelper
Simple command line utility for handling secrets.
Important: USE AT YOUR OWN RISK!
Use Case 1
Some commands are needed frequently but they contain secrets. Examples:
oathtool -b --totp "PV3YEM43I22ISNWK"(based on a secret key create a time based one time password for 2FA)git pull https://some.user%40host.org:foo-bar-password@git.myservice.com/reponame(git connection via https without being prompted for a password)
Obviously, it is insecure to store them unencrypted on your system (e.g. in your command history).
Solution: secrethelper reads a data file (secrets.toml) which contains encrypted versions of such commands, prompts for a password decrypts the relevant command, executes it and displays the result (and copies it into the clipboard). The actual secret is never shown.
Use Case 2
Some secrets (e. g.passwords) are important to memorize, but are needed only rarely. Thus, there are only few occations to practise them.
Solution: secrettrainer reads a data file (secrets.toml) which contains the (salted) hashes of such passwords. During a trainig session you are propted for some of them the correctness is determined by comparing the hashes.
Usage
secrethelper
secrethelper --help: Show help.- short version:
-h
- short version:
secrethelper --bootstrap-data: Createsecrets.tomlin suitable place. Example:~/.local/share/secrethelper/(depends on OS). The content is based onsrc/secrethelper/secrets-example.toml.- short version:
-b
- short version:
secrethelper --edit-data: Opensecrets.tomlin the default editor.- short version:
-ed
- short version:
secrethelper --edit-data [EDITOR]: Opensecrets.tomlin the specified editor.- short version:
-ed [EDITOR] - example:
--edit-data codium
- short version:
secrethelper --encrypt: Prompt for password, then prompt for some arbitrary string. Disyplay the encrypted version of the string (also copied to the clipboard). This string can be pasted directly insecrets.tomlsecrethelper --decrypt-and-execute [key]: Prompt for password, extract the encrypted command fromsecrets.toml, execute it and disyplay the result (also copied to the clipboard).- short version:
-d [key]
- short version:
secrettrainer
secrettrainer --help: Show help.- short version:
-h
- short version:
secrettrainer --create-training-data: Create training data: Prompt for password (salt), prompt for secret and display salted hash of the secret (also copied to clipboard). This string can be pasted directly insecrets.tomlin section[training]. An empty string quits the process.- short version:
-ctd
- short version:
secrettrainer(no options/arguments): Create a suffled list of keys from section[training], prompt for password (used as salt for hash), prompt for secrets, compare hash display ✓ or ✗. Train 10 rounds. Empty string quits this process.
Installation and Preparation
In first terminal:
pip install pysecrethelper: Install the software.secrethelper -bBootstrap data filesecrets.toml.secrethelper -edOpensecrets.tomlin default editor.
In another terminal:
secrethelper -e: Create and copy encrypted string → you can paste it intosecret.tomlin section[commands]. This is for use case 1 (see above).secrethelper -ctd: Create hashes and copy salted hashes for training → you can paste it intosecret.tomlin section[training]. This is for use case 2 (see above).
Metadata
Release files for pysecrethelper 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysecrethelper-0.1.1.tar.gz | 20.7 kB | Without provenance | Details for pysecrethelper-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysecrethelper-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pysecrethelper-0.1.1-py3-none-any.whl |
Total release size: 40.9 kB
Release files / pysecrethelper-0.1.1.tar.gz
| Download URL | pysecrethelper-0.1.1.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd52c3f66d17c9307206e6013a6b17f875e22f6ed9507907f7207791caa3baaa
|
|
BLAKE2b-256 checksum How to use checksums |
0a225bccbfbec52a23caa0ca21a02952376ce128a1ade6a97c74a45c83ed92ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pysecrethelper-0.1.1-py3-none-any.whl
| Download URL | pysecrethelper-0.1.1-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d93b9932b221615890ecc4ccec871207f90d3bce78a50986c61174256ccc02db
|
|
BLAKE2b-256 checksum How to use checksums |
5779471b9026a832ebe729959398792059b691ed2eb487e5283cb472e96135ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pysecrethelper 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.