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

fix: Backwards compatibility for vex triage #4421

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

terriko
Copy link
Contributor

@terriko terriko commented Sep 6, 2024

This adds a little bit of backwards compatibility for vex triage

  • If --triage-input-file is used, display deprecation warning and convert to --vex-file" so scan can continue.
  • If file extension in .vex, the first time, make a copy and scan anyhow. On subsequent times, print an error asking the user to use --vex-file

It might be more elegant to edit lib4vex to handle .vex filenames more seamlessly there, but I feel like "give people one chance and then error" is probably more likely to help people switch to the new arguments so we don't have to support the old ones forever and won't break as many CI jobs.

* related to intel#4417

This adds a little bit of backwards compatibility for vex triage
* If --triage-input-file is used, display deprecation warning and
  convert to --vex-file" so scan can continue.
* If file extension in .vex, the first time, make a copy and scan
  anyhow.  On subsequent times, print an error asking the user to
  use --vex-file <new file name>

It might be more elegant to edit lib4vex to handle .vex filenames more
seamlessly there, but I feel like "give people one chance and then
error" is probably more likely to help people switch to the new
arguments so we don't have to support the old ones forever and won't
break as many CI jobs.

Signed-off-by: Terri Oda <[email protected]>
Copy link
Contributor

@mastersans mastersans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@terriko Looks good! In my time exploring the VEX landscape, I haven't come across the .vex format being widely used. Interestingly, while writing the VEX parser class, I tested it by running the class with existing .vex files. I simply renamed them to .json, and it worked. I'm not sure why the .vex format exists since it's identical to .json. It seemed most logical to just use .json. However, I missed considering backward compatibility, so thanks for pointing that out!

@terriko terriko merged commit be55a81 into intel:main Sep 9, 2024
21 checks passed
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

Successfully merging this pull request may close these issues.

2 participants