Skip to content
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

[Java] Dataflow through object #18680

Open
KylerKatz opened this issue Feb 5, 2025 · 2 comments
Open

[Java] Dataflow through object #18680

KylerKatz opened this issue Feb 5, 2025 · 2 comments
Labels
question Further information is requested

Comments

@KylerKatz
Copy link

Hello,

I am getting some false positives with some of my queries, which are usually centered around a source node flowing into an object and then other data from that object flowing into a sink node.

Here is a simple example,

env.put(Context.SECURITY_CREDENTIALS, password);
LOG.error("connection error [{}], failover connection to [{}]", env.get(Context.PROVIDER_URL), this.ldapURI.toString());

In this case, password is a source variable. While LOG.error is a sink. However, by having it flow into env, it now marks any use of the object as a detection eventough this case has nothing to do with password. Is there any way to reduce cases like this?

Thank you

@KylerKatz KylerKatz added the question Further information is requested label Feb 5, 2025
@aschackmull
Copy link
Contributor

Looks like a fairly simple case of storing a value in a map using one key and then getting false positive flow at the point where a value is taken from the map using a different key. This is a known problem and it's due to the level of precision at which we currently track container content for flow in Java. We have a solution lined up that we've been wanting to implement for some while now, but it's simply been a matter of priorities. Thank you for the report, though, signal like this helps us prioritise, and this is definitely on our radar. Unfortunately I cannot provide an estimate for when we'll be able to prioritise this at the moment, but I've linked this issue from our internal tracking issue on this, so I'll be able to give an update here once it's done.

@KylerKatz
Copy link
Author

Hello @aschackmull,

Thank you for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants