Over in T2942, i describe a common pattern of people trying to use gpg
without an explicit command, and it has disastrous consequences.
if no command is given, gpg should warn that it is going to make a best-effort
at doing the right thing, but it should not be relied upon to do what the user
expects, since what it does will differ depending on the content of the data it
receives.
I'm imagining:
$ gpg info.gpg gpg: Warning: no command supplied! trying to guess what you mean... gpg: This looks like encrypted data, trying to decrypt. gpg: encrypted with 2048-bit RSA key, ID 356F4EAF96436D8F, created 2017-02-06 "Test user <test@example.net>" gpg: Created cleartext output file "info" $ $ gpg keys.gpg gpg: Warning: no command supplied! trying to guess what you mean... gpg: This looks like a keyring, listing: pub rsa2048 2017-02-06 [SC] [expires: 2019-02-06] 2086C93F8847A4D0FD543DE69E0D94DE6CCDC654 uid Test user <test@example.net> sub rsa2048 2017-02-06 [E] $
In particular, the GnuPG documentation should clearly state that automated tools
should never use gpg in this way over untrusted data.