-
Notifications
You must be signed in to change notification settings - Fork 125
Add taint-tracking for packages inside net/*
(except for net/url
, which was left as-is)
#337
Conversation
net
net/*
(except for net/url
, which was left as-is)
90769be
to
3825c1f
Compare
That's exciting news! Thanks! |
Partial results: New true positives (I think): 5 The only FP attributable directly to this PR is regarding the results of ParseIP as dangerous. It's clearly dangerous to parse a user IP and then open a socket to it, for example, but it's not dangerous in most contexts (XSS, SQLi and so on), so I recommend functions like that which tightly constrain the possible form of the input string should not be modelled by default. A query looking for particular circumstances where a user-controlled IP or MAC address or similar is dangerous can re-include them. |
Performance comparison results are unremarkable. New hits from that run: 1x new allocation-size-overflow -- a marginal case (we're complaining about len(usersupplied) + 8 possibly overflowing), but this PR's contribution is in propagating taint across a regexreplaceall, which is correct. 1x new clear-text logging -- a false positive due to a bearer token that the service parses into a non-secret and a secret component, logging the non-secret. Probably too app-specific to fix. 1x new path injection -- allows an attacker to explore the FS by stat'ing any file they wish, without apparent escaping. Could be an FP if the server uses an OS-level mechanism to limit file accesses. 1x new request-forgery -- an open HTTP proxy |
Thanks @smowton and @max-schaefer for all your effort and help in bringing this project to life! I'll go ahead and submit the last 7 new PRs that will complete the standard library taint-tracking. Or I could wait for next week, but I have time today. |
Once this is resolved and the |
8420663
to
3667bd9
Compare
3667bd9
to
a784a25
Compare
codebox
commands:Part of #167