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

Eval idea: Security code review for unicode attacks on code #787

Open
qrdlgit opened this issue Apr 24, 2023 · 0 comments
Open

Eval idea: Security code review for unicode attacks on code #787

qrdlgit opened this issue Apr 24, 2023 · 0 comments
Labels
Idea for Eval These issues keep track of requests for different kinds of eval PRs

Comments

@qrdlgit
Copy link
Contributor

qrdlgit commented Apr 24, 2023

Describe the feature or improvement you're requesting

One thing a lot of people are using GPT4 is security code review. Anyone with any experience in this area is astounded at its capabilities and the nuanced issues it rises. Companies are building products and features around this as we speak.

One area of security code review it seems to be a bit weak on though is unicode detection. For example, asking GPT4 for a list of unicode attacks and then re-feeding them back to GPT4 for a security code review, it only raises a concern on a few of them.

In that vein, I've come up with a few (what I believe to be) to be high quality and relevant examples, but it requires significant effort and expertise to make sure they are appropriately relevant and diverse, and I'm working on more to get to the 15 example bar.

There are relatively legitimate reasons why in certain cases GPT4 might ignore the issue and so just refeeding them in as I initially did above is not that helpful - though it was a useful proof of concept anyone can quickly do.

The approach I'm taking is to see if the word 'unicode' is included in the response when doing a sec review. I believe the term 'unicode' should very high be on the list of issues that it raises as the usages I've crafted don't make sense unless someone is actively attacking the code.

Would that be sufficient?

Also, it may be this is a limitation of the browser client and not the GPT4 API which goes through different processing - though pushing GPT4 to self-refine it does finally find the unicode character in the original query. Using the browser developer tool for both network and inspect, I can also see the unicode being displayed and sent to the backend.

Perhaps the API is much better at this task, I don't know.

Finally, I'm concerned this might be on the list of 'known issues' due to BPE or something else, which might make the effort not yet relevant, which is perfectly fair.

Additional context

No response

@andrew-openai andrew-openai added the Idea for Eval These issues keep track of requests for different kinds of eval PRs label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea for Eval These issues keep track of requests for different kinds of eval PRs
Projects
None yet
Development

No branches or pull requests

2 participants