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

Make checkers use object oriented paradigm #656

Merged
merged 64 commits into from
May 13, 2020
Merged

Conversation

Niraj-Kamdar
Copy link
Contributor

No description provided.

@SaurabhK122
Copy link
Contributor

@Niraj-Kamdar, @terriko I am not sure whether this is the right time to address #638, since it directly affects my project, maybe I and @Niraj-Kamdar could have worked on it after the completion of our respective projects as a stretch goal. What do you think @terriko ?

@Niraj-Kamdar
Copy link
Contributor Author

@SaurabhK122 don't worry I won't block you. Once, Checkers get converted into classes it will make easy to create more checkers. There is two phases to issue #638. 1) convert every checker into classes and 2) remove binary dependency. I will complete 1st phase by tomorrow and second phase won't be a problem for you.

@terriko
Copy link
Contributor

terriko commented May 11, 2020

@SaurabhK122 I'd rather have this done before your project gets underway, since it'll mean a lot less conversion after the fact.

If you're already working on stuff, don't let this block you. It's fine to put up PRs for old style checkers until this is merged, and if you have any old ones still in queue we can convert them as we go.

@Niraj-Kamdar
Copy link
Contributor Author

@terriko If we want to avoid blocking and reduce effort of conversion we can create another branch on intel upstream repo and @SaurabhK122 can directly contribute to it and we can merge it ones everything is set to go.

@pdxjohnny
Copy link
Member

@Niraj-Kamdar Is there much left to do on this? Seems like it is pretty close to done. Creating another branch can cause a lot of overhead.

@Niraj-Kamdar
Copy link
Contributor Author

@pdxjohnny No, there isn't that much left here. I will complete the metaclass and other requested changes in less than two days.

@pdxjohnny
Copy link
Member

Sounds good. The metaclass should be pretty much drop in ready.

@@ -5,7 +5,7 @@ int main() {
printf("It outputs a few strings normally associated with gnutls-serv 2.1.6");
printf("They appear below this line.");
printf("------------------");
printf("gnutls-serv 2.1.6");
printf("gnutls-cli 2.1.6");
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this a mistake or does the filename need to be changed to also be gnutls-cli?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No previous version had it like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe both binary has same version signature.

Copy link
Member

Choose a reason for hiding this comment

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

I think I'd added this testcase when something wasn't working at one point...

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, no wasn't me. Ya I'm of the mind these probably need to be changed back, or we need to be sure of why they're chaging

Copy link
Member

Choose a reason for hiding this comment

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

Ah I found what I was thinking of though: ff14b13

Maybe I did something up with that change?

Or the next possibly relevant change after that is dbca3aa

git log -p -- cve_bin_tool/checkers/gnutls.py

Copy link
Contributor

Choose a reason for hiding this comment

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

That's weird. Let's just fix it now, then? or open an issue to fix it after if you want to get this PR merged ASAP?

@@ -5,7 +5,7 @@ int main() {
printf("It outputs a few strings normally associated with gnutls-serv 2.3.11");
printf("They appear below this line.");
printf("------------------");
printf("gnutls-serv 2.3.11");
printf("gnutls-cli 2.3.11");
Copy link
Contributor

Choose a reason for hiding this comment

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

As above -- contents and filename don't match.

@terriko
Copy link
Contributor

terriko commented May 12, 2020

BTW, I just want to say how nice it is to see this happening. This makes the checkers so much simpler and easier to read and I think it's going to make adding and maintaining them so much easier going forwards.

@Niraj-Kamdar
Copy link
Contributor Author

Finally docs are also done :)

@Niraj-Kamdar
Copy link
Contributor Author

I have also put FIXME and other warning comments where I thought contains_patterns isn't good even or we require more patterns.

@terriko
Copy link
Contributor

terriko commented May 13, 2020

I'll open up an issue for the gnutls-serv vs cli filename stuff so we can sort it out properly later, but the rest of this looks good to go and I don't want to have it hanging beacuse it affects other tests. Merge time!

@terriko terriko merged commit 11b9d7b into intel:master May 13, 2020
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.

5 participants