Skip to content

Commit 5c8ef15

Browse files
committed
Java: Add bi-directional imports of some abstract class extensions.
1 parent 65f242c commit 5c8ef15

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

java/ql/lib/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ abstract class RemoteFlowSource extends DataFlow::Node {
3636
abstract string getSourceType();
3737
}
3838

39+
/**
40+
* A module for importing frameworks that define remote flow sources.
41+
*/
42+
private module RemoteFlowSources {
43+
private import semmle.code.java.frameworks.android.Widget
44+
private import semmle.code.java.security.TemplateInjection
45+
}
46+
3947
private class ExternalRemoteFlowSource extends RemoteFlowSource {
4048
ExternalRemoteFlowSource() { sourceNode(this, "remote") }
4149

java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ private module Frameworks {
2121
private import semmle.code.java.frameworks.guava.Guava
2222
private import semmle.code.java.frameworks.apache.Lang
2323
private import semmle.code.java.frameworks.ApacheHttp
24+
private import semmle.code.java.frameworks.ratpack.RatpackExec
25+
private import semmle.code.java.frameworks.android.Slice
2426
}
2527

2628
/**

java/ql/lib/semmle/code/java/dataflow/FlowSummary.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ abstract class SyntheticCallable extends string {
9797
Type getReturnType() { none() }
9898
}
9999

100+
/**
101+
* A module for importing frameworks that define synthetic callables.
102+
*/
103+
private module SyntheticCallables {
104+
private import semmle.code.java.frameworks.android.Intent
105+
private import semmle.code.java.frameworks.Stream
106+
}
107+
100108
private newtype TSummarizedCallableBase =
101109
TSimpleCallable(Callable c) { c.isSourceDeclaration() } or
102110
TSyntheticCallable(SyntheticCallable c)

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ private import semmle.code.java.dataflow.internal.AccessPathSyntax as AccessPath
1414

1515
class SummarizedCallableBase = FlowSummary::SummarizedCallableBase;
1616

17+
/**
18+
* A module for importing frameworks that define synthetic globals.
19+
*/
20+
private module SyntheticGlobals {
21+
private import semmle.code.java.frameworks.android.Intent
22+
}
23+
1724
DataFlowCallable inject(SummarizedCallable c) { result.asSummarizedCallable() = c }
1825

1926
/** Gets the parameter position of the instance parameter. */

0 commit comments

Comments
 (0)