-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix Android logging signature #6711
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
Conversation
…/java/Logging.qll
Would a fix like this be a candidate for the One-For-All program? |
Simplified using a set-literal as suggested by @intrigus-lgtm
m.getDeclaringType().getASourceSupertype*() = t or | ||
m.getDeclaringType().extendsOrImplements*(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem like they're saying the same thing, are you aware of a case that means you need both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I just tried to keep this as close to the originally approved query as possible. Why are these both required in lines 24 and 25? My understanding is also that they are equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some differences in relation to generics, in particular how these relations deal with parameterizations, raw types, type variables, and wildcard types. But for something simple like this case, then I expect them to be equivalent (with some possible caveats if there are generic subclasses of android.util.Log
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized the Log class in Android is final, so neither is required. I will push the update in a minute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified the query considering the fact the Log class is final. All my test results remained the same.
Can someone, please, answer this question? I just want to know if fixes like this one are in scope for the One-for-All program. If the are, I will take the time to submit the required issue. I also would like to mention that I really like codeQL so I will keep contributing to the code any chance I have. Kudos to the team |
(NOTE: I'm not affiliated with lgtm.com or the codeql team in any way) I'd say that this PR should be eligible. And per the bounty rules:
So if you
it should indeed be eligible. It might also make sense to add tests for the |
Sorry I didn't notice the question; yes in principle I think it's eligible though I imagine the bounty would be smaller than most due to the low technical difficulty of the fix. However there's no harm in submitting an application! |
The method signature for the Android Logger methods in the java/ql/src/experimental/semmle/code/java/Logging.qll is wrong and prevents the proper identification of sensitive data logging in Android applications.