mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Java: Refactor most of the logic out of the model editor query files
This commit is contained in:
@@ -8,12 +8,9 @@
|
||||
*/
|
||||
|
||||
private import java
|
||||
private import ApplicationModeEndpointsQuery
|
||||
private import ModelEditor
|
||||
|
||||
class ExternalEndpoint extends Endpoint {
|
||||
ExternalEndpoint() { not this.fromSource() }
|
||||
}
|
||||
|
||||
private Call aUsage(ExternalEndpoint endpoint) {
|
||||
result.getCallee().getSourceDeclaration() = endpoint
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
private import java
|
||||
private import ModelEditor
|
||||
|
||||
/**
|
||||
* A class of effectively public callables in library code.
|
||||
*/
|
||||
class ExternalEndpoint extends Endpoint {
|
||||
ExternalEndpoint() { not this.fromSource() }
|
||||
}
|
||||
@@ -8,11 +8,9 @@
|
||||
*/
|
||||
|
||||
private import java
|
||||
private import semmle.code.java.dataflow.internal.ModelExclusions
|
||||
private import FrameworkModeEndpointsQuery
|
||||
private import ModelEditor
|
||||
|
||||
class PublicEndpointFromSource extends Endpoint, ModelApi { }
|
||||
|
||||
from PublicEndpointFromSource endpoint, string apiName, boolean supported, string type
|
||||
where
|
||||
apiName = endpoint.getApiName() and
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
private import java
|
||||
private import semmle.code.java.dataflow.internal.ModelExclusions
|
||||
private import ModelEditor
|
||||
|
||||
/**
|
||||
* A class of effectively public callables from source code.
|
||||
*/
|
||||
class PublicEndpointFromSource extends Endpoint, ModelApi { }
|
||||
Reference in New Issue
Block a user