Skip to content
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

Support regex for expected_command verification #610

Open
aalsabag opened this issue Jun 15, 2023 · 0 comments
Open

Support regex for expected_command verification #610

aalsabag opened this issue Jun 15, 2023 · 0 comments

Comments

@aalsabag
Copy link

aalsabag commented Jun 15, 2023

Please fill in the fields below to submit an issue or feature request. The
more information that is provided, the better.

Description of issue or feature request:
I have read through some of the previous issues regarding this matter #46
I understand the idea behind only warning when a user command differs from an expected command. I am not proposing that we change this. All that I am proposing is adding a new optional parameter verify_command_alignment called regex that takes a string. If the regex is passed, we use that to perform a regex match. If they do not match, we print out a warning as we normally do.

I have already written this out in a branch and have written some unit tests to illustrate this.

I can change how we pass in the regex, but for now I thought to make expected_command optional as well as regex optional. I'm trying to thing of a better approach.

I'll add the documentation if you guys are ok with this. For now the PR is a draft
#611

aalsabag pushed a commit to aalsabag/in-toto that referenced this issue Jun 15, 2023
…ompare user commands to regex as opposed to a static string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant