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

Go: Use value flow instead of taint flow for go/incorrect-integer-conversion #16305

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Apr 23, 2024

This should remove some FPs and also improve performance, especially on projects with lots of FPs. I have done a DCA run and the results look good. I will do a DCA QA run.

@github-actions github-actions bot added the Go label Apr 23, 2024
@smowton
Copy link
Contributor

smowton commented Apr 23, 2024

s/DCA/QA?

@owen-mc owen-mc marked this pull request as ready for review April 25, 2024 13:37
@owen-mc owen-mc requested a review from a team as a code owner April 25, 2024 13:37
@owen-mc
Copy link
Contributor Author

owen-mc commented Apr 25, 2024

Probably the best way of reviewing this is spot-checking some of the alert changes in QA. (I've checked the DCA ones and they're fine.)

@smowton
Copy link
Contributor

smowton commented Apr 25, 2024

Should we add back steps that are clearly taint-preserving for this query, like some arithmetic?

@owen-mc
Copy link
Contributor Author

owen-mc commented Apr 25, 2024

@smowton It's a bit complicated, as technically any arithmetic might change how many bits are required to represent the number in question. So it opens us up to false positives. Have you seen any examples of alerts which are lost which would be found if we added arithmetic taint steps? (Also, in the longer term we should probably use the shared range analysis, which will do this for us.)

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

No. I'm afraid I haven't the time to trawl results from the QA run, so if you've done so and are satisfied with the results I'll just take your word for it and approve.

@smowton
Copy link
Contributor

smowton commented Apr 26, 2024

(add a change note though)

@owen-mc owen-mc marked this pull request as draft May 8, 2024 15:40
@owen-mc
Copy link
Contributor Author

owen-mc commented May 8, 2024

On closer examination of the QA results, we are currently losing results because value flow through append isn't working correctly. I'm marking this as a draft until I can merge #16413, rebase and rerun QA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants