-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: False positive when use sync.Map #18916
Comments
Hi @sud0why 👋🏻 Thanks for reporting this! That does look like a FP to me. I am guessing that we don't currently have enough precision here to distinguish between the keys and values in the map during our taint flow analysis, so conservatively mark the whole map as tainted if either a tainted key or value is stored in it. We will track this issue internally, and will fix it when possible. However, fixing FPs isn't currently a product priority, so I can't say how quickly this may get fixed. |
I believe keys should not propagate through the map. The only way to achieve key propagation via Perhaps modifying the taint source parameters for |
Yes, that's right. We do not currently model |
Description
I think the sync.Map.Store operation should not propagate the key to the sync.Map, and the same applies to sync.Map.LoadOrStore and sync.Map.Swap. This could lead to situations where keys might propagate into values through the sync.Map.
Modifications may be needed in the ext/sync.model.yml model definition file within the go-all library.
Example Code
Result
The text was updated successfully, but these errors were encountered: