You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
Please consider the following code
MyClassmyInstance = newMyClass();
StringmyString = myInstance.myField;
myInstance.myField = source();
sink(myString); // Mariana Trench falsely reports this as issue
where public String source() and public void sink(String param) are defined as source and sink respectively in Marian Trenchs config and the implementation if MyClass is simply
classMyClass{
StringmyField = "";
}
Running Mariana Trench on this code returns one issue (as annotated in the code above), but actually no taint is leaked in this code.
I'm using mariana-trench Version: 1.0.6
The text was updated successfully, but these errors were encountered:
I understand why that could be confusing, but this is the expected behavior.
We consider that if an object is tainted, then any field from that object is also tainted.
Unfortunately, I would need to go into a lot of theoretical details to explain why, but basically, without that behavior, we would have a lot of false negatives. The design choice in our analyzers is to favor false positives (such as this one) rather than false negatives.
Note that the issue found here should have a feature called via-issue-broadening. You could consider excluding issues with that breadcrumb from your results (for instance, using sapp filters).
Bug
Bug description
Please consider the following code
where
public String source()
andpublic void sink(String param)
are defined as source and sink respectively in Marian Trenchs config and the implementation ifMyClass
is simplyRunning Mariana Trench on this code returns one issue (as annotated in the code above), but actually no taint is leaked in this code.
I'm using mariana-trench Version: 1.0.6
The text was updated successfully, but these errors were encountered: