smallstep / cli

🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
https://smallstep.com/cli
Apache License 2.0
3.56k stars 248 forks source link

[Bug]: `step certificate inspect` no longer supports reading cert from piped out put #1173

Closed a1994sc closed 1 month ago

a1994sc commented 1 month ago

Steps to Reproduce

  1. step certificate inspect --format pem --insecure https://github.com > github.pem
  2. step certificate inspect github.pem This works
  3. cat github.pem | step certificate inspect This does not

Your Environment

Expected Behavior

Read the cert from the piped output

Actual Behavior

gives error reading -: no such file or directory

Additional Context

I have some certs in sops secrets and want to read the alternative names, so I run the following command with 0.26.1 and it errored out

sops -d secret/tls.yml | yq '.stringData."tls.crt"' | step certificate inspect --format json | yq -p=json .names | sort | yq

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

a1994sc commented 1 month ago

Minor comment, but step 3. does work with 0.25.2

dopey commented 1 month ago

Hey @a1994sc 👋. Thanks for opening the issue!

I believe this has already been resolved in the default branch - #1162. Should be part of a release within the next few weeks.

a1994sc commented 1 month ago

Oh, @dopey , sorry I must have missed that when I went looking for issues. Thank you very much! I will keep an eye out for it. For the time being I rolled back my version to 0.25.2