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

Hackaton: Experimental OpenAI-GPT code validation with tzap #130

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

academo
Copy link
Member

@academo academo commented Aug 9, 2023

This PR adds support for experimental validations using openai-gpt. It uses tzap (MIT License) to run validations against the plugin source code.

GPT models are not fully reliable in code analysis and thus a new "suspected" report category is introduced in this PR to prevent false positives to leak into a more deterministic analysis from the other analysis

@academo academo self-assigned this Aug 9, 2023
@academo academo requested a review from xnyo August 9, 2023 07:08
@academo academo added the enhancement New feature or request label Aug 9, 2023
Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

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

Awesome work!! 🥳 🥳 I really like this idea!

Some minor comments:

}

var Analyzer = &analysis.Analyzer{
Name: "go-sec",
Copy link
Member

Choose a reason for hiding this comment

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

Typo?

Suggested change
Name: "go-sec",
Name: "tzap",

Comment on lines 90 to 91
err = nil
retry--
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit confused by this. Won't this cause err to always be nil, and why is retry decreased if i is already increasing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I think I am mistaken in how the err object is assigned and the retry-- is a leftover from a previous logic. thanks!

@academo academo requested a review from xnyo August 10, 2023 07:00
Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

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

LGTM!! 🥳

@academo academo merged commit d593537 into main Aug 10, 2023
3 checks passed
@academo academo deleted the academo/gpt-validator-enhacements branch August 10, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants