[dotnet] Missing Taint Flow from [WebMethod] Parameter Objects to Properties/Fields
#21567
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 15 replies
This comment was marked as duplicate.
This comment was marked as duplicate.
-
|
I think I found the issue but I don't know how to fix it, here this class does not have associated I found an example for ASP.NET Core here but it's not transitive. It's possible to have something like this: public class AddresDto
{
public string City {get; set;}
}
public class UserDto
{
public AddresDto Address {get; set;}
} Also the I tried to make a fix but it need some recursion to get a property of a property. So I think it would be easier to taint outputs of getters like in spring and Java. It's internal CodeQL code so I don't know how to approach this. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the question. You are right,
It is worth noting that all uses of types used as eg. a parameter type for an ASP.NET action method will have their members tainted with this logic. That is, introducing taint members logic can yield results other places in the code - as it is the use of the type in the ASP.NET context that decides whether we consider the members tainted (in all use-cases in a given database). I don't think the I will try and draft a PR for generally tainting members on types used in ASP.NET, but I am not sure that we will be able to merge it - as it might be considered a bit to controversial to introduce in general (in case we don't merge it, you are than welcome to use the code in your own query). |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the input. The PR has been merged and can be found here. |
Beta Was this translation helpful? Give feedback.


Thank you for the input. The PR has been merged and can be found here.