theupdateframework / go-tuf

Go implementation of The Update Framework (TUF)
https://theupdateframework.com
Apache License 2.0
625 stars 105 forks source link

add-signature to read from stdin #529

Closed ChevronTango closed 11 months ago

ChevronTango commented 1 year ago

Whilst working on https://github.com/theupdateframework/go-tuf/issues/525#issuecomment-1655807670 I found that I had to write the signature out to file and then read it in again when I called add-signature. It would be useful if I could avoid the disk IO and pipe the signature into the add-signature call.

# current approach
tuf add-signature --signature targets.json.signature targets.json

# proposed solution
cat targets.json.signature | tuf add-signature targets.json