Compare commits

...

8 Commits

Author SHA1 Message Date
Kasper Svendsen
1d74d60a5f Java lib qlpack: Enable compileForOverlayEval 2025-06-24 09:18:13 +02:00
Jonas Jensen
c1214db5b3 DataFlow:Run overlay-informed if not diff-informed
To ensure good performance, always run data flow overlay-informed unless
the configuration has opted in to being diff-informed. This change
affects only databases with an overlay and therefore has no immediate
production consequences.
2025-06-24 09:00:56 +02:00
Kasper Svendsen
3c2c871a36 Java: Allow methods with empty bodies for overlay 2025-06-23 14:59:34 +02:00
Kasper Svendsen
ddaf0b2bd8 Java: Add entity discard predicates 2025-06-23 14:59:33 +02:00
Kasper Svendsen
4f497180ea Java: Add manual overlay annotations 2025-06-20 14:15:54 +02:00
Kasper Svendsen
052023efae rename overlay[caller] to overlay[caller?] 2025-06-20 13:58:59 +02:00
Kasper Svendsen
3cbaf51ce1 Run config/sync-files.py 2025-06-20 13:58:58 +02:00
Kasper Svendsen
bceb147d72 Overlay: Add overlay annotations to Java & shared libraries 2025-06-20 13:58:57 +02:00
443 changed files with 1177 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for representing abstract bounds for use in, for example, range analysis.
*/
overlay[local?]
module;
private import internal.rangeanalysis.BoundSpecific

View File

@@ -3,6 +3,8 @@
* an expression, `b` is a `Bound` (typically zero or the value of an SSA
* variable), and `v` is an integer in the range `[0 .. m-1]`.
*/
overlay[local?]
module;
private import internal.rangeanalysis.ModulusAnalysisSpecific::Private
private import Bound

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
newtype TSign =
TNeg() or
TZero() or

View File

@@ -5,6 +5,8 @@
* The analysis is implemented as an abstract interpretation over the
* three-valued domain `{negative, zero, positive}`.
*/
overlay[local?]
module;
private import SignAnalysisSpecific::Private
private import SsaReadPositionCommon

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for representing a position at which an SSA variable is read.
*/
overlay[local?]
module;
private import SsaReadPositionSpecific
import SsaReadPositionSpecific::Public

View File

@@ -8,5 +8,7 @@
* the `RemoteFlowSource` and `AdditionalTaintStep` classes associated with the security queries
* to model frameworks that are not covered by the standard library.
*/
overlay[local?]
module;
import java

View File

@@ -1,6 +1,8 @@
/**
* Provides shared predicates related to contextual queries in the code viewer.
*/
overlay[local?]
module;
import semmle.files.FileSystem
private import codeql.util.FileSystem

View File

@@ -1,3 +1,5 @@
/** DEPRECATED: use `java.qll` instead. */
overlay[local?]
module;
import java

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates related to jump-to-definition links
* in the code viewer.
*/
overlay[local?]
module;
import java
import IDEContextual

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.dataflow.TaintTracking

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
private import java as Language
private import semmle.code.java.security.InsecureRandomnessQuery
private import semmle.code.java.security.RandomQuery

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
class ExternalData extends @externalDataElement {

View File

@@ -1,4 +1,6 @@
/** Provides all default Java QL imports. */
overlay[local?]
module;
import Customizations
import semmle.code.FileSystem

View File

@@ -23,3 +23,4 @@ dataExtensions:
- ext/generated/*.model.yml
- ext/experimental/*.model.yml
warnOnImplicitThis: true
compileForOverlayEval: true

View File

@@ -1,4 +1,6 @@
/** Provides classes for working with files and folders. */
overlay[local?]
module;
import Location
private import codeql.util.FileSystem

View File

@@ -3,9 +3,12 @@
*
* Locations represent parts of files and are used to map elements to their source location.
*/
overlay[local?]
module;
import FileSystem
import semmle.code.java.Element
private import semmle.code.java.Overlay
private import semmle.code.SMAP
/** Holds if element `e` has name `name`. */
@@ -219,3 +222,16 @@ private predicate fixedHasLocation(Top l, Location loc, File f) {
not hasSourceLocation(l, _, _) and
locations_default(loc, f, _, _, _, _)
}
overlay[local]
private predicate discardableLocation(string file, @location l) {
not isOverlay() and
file = getRawFileForLoc(l) and
not exists(@file f | hasLocation(f, l))
}
/** Discard base locations in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardLocation(@location l) {
exists(string file | discardableLocation(file, l) and extractedInOverlay(file))
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with SMAP files (see JSR-045).
*/
overlay[local?]
module;
import java

View File

@@ -1,3 +1,5 @@
/** Provides the `Unit` class. */
overlay[local?]
module;
import codeql.util.Unit

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for working with configuration files, such
* as Java `.properties` or `.ini` files.
*/
overlay[local?]
module;
import semmle.code.Location

View File

@@ -8,6 +8,8 @@
* Each annotation type has zero or more annotation elements that contain a
* name and possibly a value.
*/
overlay[local?]
module;
import Element
import Expr

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for reasoning about instances of
* `java.util.Collection` and their methods.
*/
overlay[local?]
module;
import java

View File

@@ -1,6 +1,8 @@
/**
* Provides a class representing individual compiler invocations that occurred during the build.
*/
overlay[local?]
module;
import semmle.code.FileSystem

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java compilation units.
*/
overlay[local?]
module;
import Element
import Package

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for representing completions.
*/
overlay[local?]
module;
/*
* A completion represents how a statement or expression terminates.

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
/**

View File

@@ -1,6 +1,8 @@
/**
* Provdides a module to calculate constant integer and boolean values.
*/
overlay[local?]
module;
import java

View File

@@ -7,6 +7,8 @@
* statement, an expression, or an exit node for a callable, indicating that
* execution of the callable terminates.
*/
overlay[local?]
module;
/*
* The implementation is centered around the concept of a _completion_, which

View File

@@ -4,6 +4,8 @@
*
* See the Java Language Specification, Section 5, for details.
*/
overlay[local?]
module;
import java
import semmle.code.java.arithmetic.Overflow

View File

@@ -1,6 +1,8 @@
/**
* Provides utility predicates for representing dependencies between types.
*/
overlay[local?]
module;
import Type
import Generics

View File

@@ -1,6 +1,8 @@
/**
* This library provides utility predicates for representing the number of dependencies between types.
*/
overlay[local?]
module;
import Type
import Generics

View File

@@ -1,6 +1,8 @@
/**
* Provides classes representing warnings generated during compilation.
*/
overlay[local?]
module;
import java

View File

@@ -1,6 +1,8 @@
/**
* Provides a class that represents named elements in Java programs.
*/
overlay[local?]
module;
import CompilationUnit
import semmle.code.Location

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java exceptions.
*/
overlay[local?]
module;
import Element
import Type

View File

@@ -1,10 +1,13 @@
/**
* Provides classes for working with Java expressions.
*/
overlay[local?]
module;
import java
private import semmle.code.java.frameworks.android.Compose
private import semmle.code.java.Constants
private import semmle.code.java.Overlay
/** A common super-class that represents all kinds of expressions. */
class Expr extends ExprParent, @expr {
@@ -2699,3 +2702,15 @@ class RecordPatternExpr extends Expr, @recordpatternexpr {
)
}
}
overlay[local]
private predicate discardableExpr(string file, @expr e) {
not isOverlay() and
file = getRawFile(e)
}
/** Discard base expressions in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardExpr(@expr e) {
exists(string file | discardableExpr(file, e) and extractedInOverlay(file))
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with the most common types of generated files.
*/
overlay[local?]
module;
import Type
private import semmle.code.java.frameworks.JavaxAnnotations

View File

@@ -30,6 +30,8 @@
*
* The terminology for generic methods is analogous.
*/
overlay[local?]
module;
import Type

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java imports.
*/
overlay[local?]
module;
import semmle.code.Location
import CompilationUnit

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with J2EE bean types.
*/
overlay[local?]
module;
import Type

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with standard classes and methods from the JDK.
*/
overlay[local?]
module;
import Member
import semmle.code.java.security.ExternalProcess

View File

@@ -1,6 +1,8 @@
/**
* Provides classes that represent standard annotations from the JDK.
*/
overlay[local?]
module;
import java

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with JMX bean types.
*/
overlay[local?]
module;
import Type

View File

@@ -1,8 +1,11 @@
/**
* Provides classes and predicates for working with Javadoc documentation.
*/
overlay[local?]
module;
import semmle.code.Location
private import semmle.code.java.Overlay
/** A Javadoc parent is an element whose child can be some Javadoc documentation. */
class JavadocParent extends @javadocParent, Top {
@@ -194,3 +197,15 @@ class KtCommentSection extends @ktcommentsection {
/** Gets the string representation of this section. */
string toString() { result = this.getContent() }
}
overlay[local]
private predicate discardableJavadoc(string file, @javadoc d) {
not isOverlay() and
exists(@member m | file = getRawFile(m) and hasJavadoc(m, d))
}
/** Discard javadoc entities in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardJavadoc(@javadoc d) {
exists(string file | discardableJavadoc(file, d) and extractedInOverlay(file))
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Kotlin types.
*/
overlay[local?]
module;
import java

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for reasoning about instances of
* `java.util.Map` and their methods.
*/
overlay[local?]
module;
import java
import Collections

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for working with members of Java classes and interfaces,
* that is, methods, constructors, fields and nested types.
*/
overlay[local?]
module;
import Element
import Type
@@ -9,6 +11,7 @@ import Annotation
import Exception
import metrics.MetricField
private import dispatch.VirtualDispatch
private import semmle.code.java.Overlay
/**
* A common abstraction for type member declarations,
@@ -621,7 +624,13 @@ class SrcMethod extends Method {
then implementsInterfaceMethod(result, this)
else result.getASourceOverriddenMethod*() = this
) and
(exists(result.getBody()) or result.hasModifier("native"))
(
// We allow empty method bodies for the local overlay variant to allow
// calls to methods only fully extracted in base.
isOverlay() or
exists(result.getBody()) or
result.hasModifier("native")
)
}
}
@@ -895,3 +904,33 @@ class ExtensionMethod extends Method {
else result = 0
}
}
overlay[local]
private predicate discardableMethod(string file, @method m) {
not isOverlay() and
file = getRawFile(m) and
exists(@classorinterface c | methods(m, _, _, _, c, _) and isAnonymClass(c, _))
}
/** Discard base methods on anonymous classes in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardAnonMethod(@method m) {
exists(string file | discardableMethod(file, m) and extractedInOverlay(file))
}
overlay[local]
private predicate discardableBaseMethod(string file, @method m) {
not isOverlay() and
file = getRawFile(m)
}
overlay[local]
private predicate usedOverlayMethod(@method m) { isOverlay() and methods(m, _, _, _, _, _) }
/** Discard base methods in files fully extracted in the overlay that were not extracted in the overlay. */
overlay[discard_entity]
private predicate discardMethod(@method m) {
exists(string file |
discardableBaseMethod(file, m) and extractedInOverlay(file) and not usedOverlayMethod(m)
)
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java modifiers.
*/
overlay[local?]
module;
import Element

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for working with Java modules.
*/
overlay[local?]
module;
import CompilationUnit

View File

@@ -1,4 +1,6 @@
/** Provides classes and predicates for reasoning about `java.lang.NumberFormatException`. */
overlay[local?]
module;
import java

View File

@@ -0,0 +1,37 @@
overlay[local?]
module;
import java
/**
* A local predicate that always holds for the overlay variant and
* never holds for the base variant. This is used to define local
* predicates that behave differently for the base and overlay variant.
*/
overlay[local]
predicate isOverlay() { databaseMetadata("isOverlay", "true") }
/** Gets the raw file for a locatable. */
overlay[local]
string getRawFile(@locatable el) {
exists(@location loc, @file file |
hasLocation(el, loc) and
locations_default(loc, file, _, _, _, _) and
files(file, result)
)
}
/** Gets the raw file for a location. */
overlay[local]
string getRawFileForLoc(@location l) {
exists(@file f | locations_default(l, f, _, _, _, _) and files(f, result))
}
/** Holds for files fully extracted in the overlay. */
overlay[local]
predicate extractedInOverlay(string file) {
isOverlay() and
// numlines is used to restrict attention to fully extracted files and
// ignore skeleton extracted files in the overlay
exists(@locatable l | numlines(l, _, _, _) and file = getRawFile(l))
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java packages.
*/
overlay[local?]
module;
import Element
import Type

View File

@@ -2,6 +2,8 @@
* Provides pretty-printed representations of the AST, in particular top-level
* classes and interfaces.
*/
overlay[local?]
module;
import java

View File

@@ -5,6 +5,8 @@
* extend `PrintAstConfiguration` and override `shouldPrint` to hold for only the elements
* you wish to view the AST for.
*/
overlay[local?]
module;
import java
import semmle.code.java.regex.RegexTreeView as RegexTreeView

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java Reflection.
*/
overlay[local?]
module;
import java
import JDKAnnotations

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with Java Serialization.
*/
overlay[local?]
module;
import java
private import frameworks.jackson.JacksonSerializability

View File

@@ -1,9 +1,12 @@
/**
* Provides classes and predicates for working with Java statements.
*/
overlay[local?]
module;
import Expr
import metrics.MetricStmt
private import semmle.code.java.Overlay
/** A common super-class of all statements. */
class Stmt extends StmtParent, ExprParent, @stmt {
@@ -985,3 +988,15 @@ class SuperConstructorInvocationStmt extends Stmt, ConstructorCall, @superconstr
override string getAPrimaryQlClass() { result = "SuperConstructorInvocationStmt" }
}
overlay[local]
private predicate discardableStmt(string file, @stmt s) {
not isOverlay() and
file = getRawFile(s)
}
/** Discard base statements in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardStmt(@stmt s) {
exists(string file | discardableStmt(file, s) and extractedInOverlay(file))
}

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for reasoning about string formatting.
*/
overlay[local?]
module;
import java
import dataflow.DefUse

View File

@@ -9,6 +9,8 @@
* Classes and interfaces can also be local (`LocalClassOrInterface`, `LocalClass`) or anonymous (`AnonymousClass`).
* Enumerated types (`EnumType`) and records (`Record`) are special kinds of classes.
*/
overlay[local?]
module;
import Member
import Modifier
@@ -668,6 +670,7 @@ class RefType extends Type, Annotatable, Modifiable, @reftype {
*
* For the definition of the notion of *erasure* see JLS v8, section 4.6 (Type Erasure).
*/
overlay[caller?]
pragma[inline]
RefType commonSubtype(RefType other) {
result.getASourceSupertype*() = erase(this) and
@@ -1257,6 +1260,7 @@ private Type erase(Type t) {
*
* For the definition of the notion of *erasure* see JLS v8, section 4.6 (Type Erasure).
*/
overlay[caller?]
pragma[inline]
predicate haveIntersection(RefType t1, RefType t2) {
exists(RefType e1, RefType e2 | e1 = erase(t1) and e2 = erase(t2) |

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with test classes and methods.
*/
overlay[local?]
module;
import Type
import Member

View File

@@ -1,8 +1,11 @@
/**
* Provides classes and predicates for working with Java variables and their declarations.
*/
overlay[local?]
module;
import Element
private import semmle.code.java.Overlay
/** A variable is a field, a local variable or a parameter. */
class Variable extends @variable, Annotatable, Element, Modifiable {
@@ -131,3 +134,15 @@ class Parameter extends Element, @param, LocalScopeVariable {
/** Holds if this is an anonymous parameter, `_` */
predicate isAnonymous() { this.getName() = "" }
}
overlay[local]
private predicate discardableLocalVarDecl(string file, @localscopevariable l) {
not isOverlay() and
file = getRawFile(l)
}
/** Discard base local scoped variables in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardLocalVarDecl(@localscopevariable l) {
exists(string file | discardableLocalVarDecl(file, l) and extractedInOverlay(file))
}

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
/** A subclass of `PrimitiveType` with width-based ordering methods. */

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
/**

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for working with basic blocks in Java.
*/
overlay[local?]
module;
import java
import Dominance

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for control-flow graph dominance.
*/
overlay[local?]
module;
import java
@@ -93,6 +95,7 @@ predicate iDominates(ControlFlowNode dominator, ControlFlowNode node) {
}
/** Holds if `dom` strictly dominates `node`. */
overlay[caller?]
pragma[inline]
predicate strictlyDominates(ControlFlowNode dom, ControlFlowNode node) {
// This predicate is gigantic, so it must be inlined.
@@ -102,6 +105,7 @@ predicate strictlyDominates(ControlFlowNode dom, ControlFlowNode node) {
}
/** Holds if `dom` dominates `node`. (This is reflexive.) */
overlay[caller?]
pragma[inline]
predicate dominates(ControlFlowNode dom, ControlFlowNode node) {
// This predicate is gigantic, so it must be inlined.
@@ -111,6 +115,7 @@ predicate dominates(ControlFlowNode dom, ControlFlowNode node) {
}
/** Holds if `dom` strictly post-dominates `node`. */
overlay[caller?]
pragma[inline]
predicate strictlyPostDominates(ControlFlowNode dom, ControlFlowNode node) {
// This predicate is gigantic, so it must be inlined.
@@ -120,6 +125,7 @@ predicate strictlyPostDominates(ControlFlowNode dom, ControlFlowNode node) {
}
/** Holds if `dom` post-dominates `node`. (This is reflexive.) */
overlay[caller?]
pragma[inline]
predicate postDominates(ControlFlowNode dom, ControlFlowNode node) {
// This predicate is gigantic, so it must be inlined.

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for reasoning about guards and the control
* flow elements controlled by those guards.
*/
overlay[local?]
module;
import java
private import semmle.code.java.controlflow.Dominance

View File

@@ -2,6 +2,8 @@
* This library provides predicates for reasoning about the set of all paths
* through a callable.
*/
overlay[local?]
module;
import java
import semmle.code.java.dispatch.VirtualDispatch

View File

@@ -1,6 +1,8 @@
/**
* Provides different types of control flow successor types.
*/
overlay[local?]
module;
import java
private import codeql.util.Boolean

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for identifying unreachable blocks under a "closed-world" assumption.
*/
overlay[local?]
module;
import java
import semmle.code.java.controlflow.Guards

View File

@@ -2,6 +2,8 @@
* Provides predicates for working with the internal logic of the `Guards`
* library.
*/
overlay[local?]
module;
import java
import semmle.code.java.controlflow.Guards

View File

@@ -3,6 +3,8 @@
* `com.google.common.base.Preconditions` and
* `org.apache.commons.lang3.Validate`.
*/
overlay[local?]
module;
import java

View File

@@ -1,4 +1,6 @@
/** Provides utility predicates relating to switch cases. */
overlay[local?]
module;
import java

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
import semmle.code.java.controlflow.UnreachableBlocks

View File

@@ -1,4 +1,6 @@
/** Provides classes representing various flow sinks for data flow / taint tracking. */
overlay[local?]
module;
private import semmle.code.java.dataflow.FlowSinks as FlowSinks

View File

@@ -1,4 +1,6 @@
/** Provides classes representing various flow sources for data flow / taint tracking. */
overlay[local?]
module;
private import semmle.code.java.dataflow.FlowSources as FlowSources

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for representing abstract bounds for use in, for example, range analysis.
*/
overlay[local?]
module;
private import internal.rangeanalysis.BoundSpecific

View File

@@ -2,6 +2,8 @@
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses.
*/
overlay[local?]
module;
import java

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for def-use and use-use pairs. Built on top of the SSA library for
* maximal precision.
*/
overlay[local?]
module;
import java
private import SSA

View File

@@ -86,6 +86,8 @@
* This information is used in a heuristic for dataflow analysis to determine, if a
* model or source code should be used for determining flow.
*/
overlay[local?]
module;
import java
private import semmle.code.java.dataflow.DataFlow::DataFlow

View File

@@ -1,4 +1,6 @@
/** Provides classes representing various flow sinks for data flow / taint tracking. */
overlay[local?]
module;
private import java
private import semmle.code.java.dataflow.ExternalFlow

View File

@@ -1,6 +1,8 @@
/**
* Provides classes representing various flow sources for taint tracking.
*/
overlay[local?]
module;
import java
import semmle.code.java.dataflow.DataFlow

View File

@@ -1,6 +1,8 @@
/**
* Provides classes representing various flow steps for taint tracking.
*/
overlay[local?]
module;
private import java
private import semmle.code.java.dataflow.DataFlow

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for defining flow summaries.
*/
overlay[local?]
module;
import java
private import internal.FlowSummaryImpl as Impl

View File

@@ -2,6 +2,8 @@
* Provides classes and predicates for reasoning about explicit and implicit
* instance accesses.
*/
overlay[local?]
module;
import java

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for integer guards.
*/
overlay[local?]
module;
import java
private import SSA

View File

@@ -3,6 +3,8 @@
* an expression, `b` is a `Bound` (typically zero or the value of an SSA
* variable), and `v` is an integer in the range `[0 .. m-1]`.
*/
overlay[local?]
module;
private import internal.rangeanalysis.ModulusAnalysisSpecific::Private
private import Bound

View File

@@ -1,6 +1,8 @@
/**
* Provides classes and predicates for null guards.
*/
overlay[local?]
module;
import java
import SSA

View File

@@ -6,6 +6,8 @@
* hold, so results guarded by, for example, `assert x != null;` or
* `if (x == null) { assert false; }` are excluded.
*/
overlay[local?]
module;
/*
* Implementation details:

View File

@@ -8,6 +8,8 @@
* If an inferred bound relies directly on a condition, then this condition is
* reported as the reason for the bound.
*/
overlay[local?]
module;
/*
* This library tackles range analysis as a flow problem. Consider e.g.:

View File

@@ -1,6 +1,8 @@
/**
* Provides utility predicates for range analysis.
*/
overlay[local?]
module;
import java
private import SSA

View File

@@ -10,6 +10,8 @@
* of the field in case the field is not amenable to a non-trivial SSA
* representation.
*/
overlay[local?]
module;
import java
private import internal.SsaImpl

View File

@@ -5,5 +5,7 @@
* The analysis is implemented as an abstract interpretation over the
* three-valued domain `{negative, zero, positive}`.
*/
overlay[local?]
module;
import semmle.code.java.dataflow.internal.rangeanalysis.SignAnalysisCommon

View File

@@ -25,6 +25,8 @@
* String.format("%sfoo:%s", notSuffix, suffix4);
* ```
*/
overlay[local?]
module;
import java
private import semmle.code.java.dataflow.TaintTracking

View File

@@ -2,6 +2,8 @@
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) taint-tracking analyses.
*/
overlay[local?]
module;
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.dataflow.internal.TaintTrackingUtil::StringBuilderVarModule

View File

@@ -7,6 +7,8 @@
* type has a subtype or if an inferred upper bound passed through at least one
* explicit or implicit cast that lost type information.
*/
overlay[local?]
module;
import java as J
private import semmle.code.java.dispatch.VirtualDispatch

View File

@@ -10,6 +10,8 @@
* This is a restricted version of SSA.qll that only handles `LocalScopeVariable`s
* in order to not depend on virtual dispatch.
*/
overlay[local?]
module;
import java
private import codeql.ssa.Ssa as SsaImplCommon

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
import java
import semmle.code.java.Collections
import semmle.code.java.Maps

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
private import java
private import DataFlowImplSpecific
private import codeql.dataflow.internal.ContentDataFlowImpl

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
private import java
private import DataFlowPrivate
private import DataFlowUtil
@@ -210,6 +213,7 @@ private module DispatchImpl {
}
/** Holds if arguments at position `apos` match parameters at position `ppos`. */
overlay[caller?]
pragma[inline]
predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos }
}

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
private import DataFlowImplSpecific
private import codeql.dataflow.internal.DataFlowImpl
private import semmle.code.Location

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
private import DataFlowImplSpecific
private import semmle.code.Location
private import codeql.dataflow.internal.DataFlowImplCommon

View File

@@ -2,6 +2,8 @@
* Provides consistency queries for checking invariants in the language-specific
* data-flow classes and predicates.
*/
overlay[local?]
module;
private import java
private import DataFlowImplSpecific

Some files were not shown because too many files have changed in this diff Show More