EFForg / EFForg/cryptobot-email
Key lookup is brittle
- Dominant language
- Python
- Stars
- 63
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Currently when bot.py looks for it's own key it matches very strictly against the configured name and email:
```
expected_uid = '{0} <{1}>'.format(config.PGP_NAME, config.PGP_EMAIL)
fingerprint = gpg.has_secret_key_with_uid(expected_uid)
```
If I happen to change cryptobot's pgp name in config.py it will fail to find its own key. Same if I generate a gpg key with something in the comment field, e.g., "Crypto Bot (TEST) cryptobot@eff.org".
Suggest modifying GnuPG::has_secret_key_with_uid to list all keys for config.PGP_EMAIL and take the first one. For bonus points, add a key id config, just in case you have generated multiple keys for cryptobot.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.