-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature cli (#56) #127
Feature cli (#56) #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @pxp928! This looks great, and I think we should borrow some things from here for the CLI in https://github.com/in-toto/in-toto. However, I've marked some changes I think we need for consistency etc...
cmd/in-toto/run.go
Outdated
func runPreRun(cmd *cobra.Command, args []string) error { | ||
key = intoto.Key{} | ||
cert = intoto.Key{} | ||
if err := key.LoadKeyDefaults(keyPath); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we better handle the error if neither key, nor cert is supplied? Right now, it looks like invalid key at : open : no such file or directory
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added check and error for file not found.
I think the |
Good point @mikhailswift. |
I will work through the fixes and changes today. Thanks for the feedback! |
@mikhailswift Should this just be changing the |
I think that should do it :) |
@mikhailswift I just did a replace to remove the empty |
If Also, I wonder if we can enhance it to output |
I'll take another look at the PR as a whole today afternoon, thanks for addressing the comments @pxp928. 😄 |
Updated such that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pxp928! This looks fine to me. I'm happy to merge tonight or so, but if you get a chance before then, could I ask you to squash some commits?
author pxp928 <[email protected]> 1631470550 -0400 committer pxp928 <[email protected]> 1631823796 -0400 go mod tidy using go version 1.17 updated record/run commands and readme added omitempty to private field removed omitempty as test fails added replace to remove empty private field in key layout updated key layout and added check for key or cert in run/record
Thanks for your work on this, @pxp928! |
Added CLI support for in-toto-golang. Updated Readme and added Makefile support. Supports ITE-7 implementation for certificate constraints. Functionality testing of the CLI done via the Makefile. Second PR of the Boxboat fork.
Please fill in the fields below to submit a pull request. The more
information that is provided, the better.
Fixes issue #: #106
Description of pull request:
Please verify and check that the pull request fulfills the following
requirements: