-
Notifications
You must be signed in to change notification settings - Fork 135
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
fixes #610 add an optional regex parameter allowing users to compare … #611
base: develop
Are you sure you want to change the base?
Conversation
…ompare user commands to regex as opposed to a static string
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.
Many thanks for the contribution, @aalsabag! I like the idea, though I am not sure, if, at this moment, we want to improve the in-toto verification flow without a related ITE. (@adityasaky, @SantiagoTorres?)
Regardless, I am no fan of mutual exclusive function arguments. Assuming that we accept the proposal, what would you think about making regex
a boolean argument, which toggles whether expected_command
is interpreted as regex?
This was actually my original approach but I had abandoned it because of the complications of the expected_command being treated like a list. But I think I can make it work. I'll update the PR shortly! With regards to the ITE, I must confess, I didn't know it existed 😂. I can fill it out if that's what @SantiagoTorres would like. I tried to make the change such that it doesn't impact existing functionality at all (i.e only warns). |
Oh right, I forgot that |
But regardless of technical details, we should think this through in terms of the verification flow... The |
I think i understand what you mean. That's a very good point that I didn't think of. Essentially, how would one know that |
I quite like the idea! Indeed the list bit is to avoid any sort of |
…user commands to regex as opposed to a static string
Fixes issue #610:
Description of the changes being introduced by the pull request:
Users would be able to pass a regex to compare a user command to. An example would look like this. This would accept users using
vi
or/usr/bin/vi
Please verify and check that the pull request fulfills the following
requirements: