Skip to content

Commit cd9d58f

Browse files
authored
Merge pull request github#16772 from michaelnebel/java/taintedpermissionthreatmodel
Java: Opt-in `java/tainted-permissions-check` to threat models.
2 parents 0f98d9e + 5686efd commit cd9d58f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

java/ql/lib/semmle/code/java/security/TaintedPermissionsCheckQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private class WildCardPermissionConstruction extends ClassInstanceExpr, Permissi
5454
* A configuration for tracking flow from user input to a permissions check.
5555
*/
5656
module TaintedPermissionsCheckFlowConfig implements DataFlow::ConfigSig {
57-
predicate isSource(DataFlow::Node source) { source instanceof UserInput }
57+
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
5858

5959
predicate isSink(DataFlow::Node sink) {
6060
sink.asExpr() = any(PermissionsConstruction p).getInput()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* The query `java/tainted-permissions-check` now uses threat models. This means that `local` sources are no longer included by default for this query, but can be added by enabling the `local` threat model.

0 commit comments

Comments
 (0)