Swift: Imprecise Taint Flows#14925
Merged
Merged
Conversation
Contributor
Author
|
DCA run looks clean. |
MathiasVP
reviewed
Nov 28, 2023
Contributor
MathiasVP
left a comment
There was a problem hiding this comment.
One comment, but otherwise this LGTM
Contributor
Author
|
DCA looks good to me. |
Contributor
I agree. I think the only remaining blocker is my comment here 🙂. |
Contributor
Author
|
Sorry. I'll get around to that change soon... |
Contributor
Author
|
I think this is ready to merge. |
MathiasVP
approved these changes
Dec 11, 2023
Contributor
MathiasVP
left a comment
There was a problem hiding this comment.
Yep. Thanks for addressing my comments!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small number of imprecise taint flow models. There's a lot more we could potentially do here, but lets start small for now:
Collection(which we can model and I think do model most of), but quite often these patterns are also copied in classes that do not derived fromCollection. By using an imprecise model, we can catch the latter as well.There's a contents / flow paths issue here - we only have flow path support on MAD flow models, not on QL flow models which these imprecise sinks have to be - so we can't have flow from the contents of the argument to the contents of the qualifier. That's why we don't catch the cases on lines 118 and 119 of the test where taint was introduced in the contents of the
taintedArrayargument rather than intaintedArrayitself. I'm keen to hear thoughts on how we could solve this.