mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
Compare commits
1 Commits
main
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
880011ce13 |
@@ -145,8 +145,6 @@ module Ast implements AstSig<Location> {
|
||||
final private class ParameterFinal = CS::Parameter;
|
||||
|
||||
class Parameter extends ParameterFinal {
|
||||
AstNode getPattern() { result = this }
|
||||
|
||||
Expr getDefaultValue() {
|
||||
// Avoid combinatorial explosions for callables with multiple bodies
|
||||
result = unique( | | super.getDefaultValue())
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Because no usable build tool (Gradle, Maven, etc) was found, build scripts could not be queried for guidance about the appropriate JDK version for the code being extracted, or precise dependency information. The default JDK will be used, and external dependencies will be inferred from the Java package names used.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "A Gradle process was aborted because it didn't write to the console for 5 seconds. Consider either lengthening the timeout if appropriate by setting CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT to a higher value or zero for no timeout, or else investigate why Gradle timed out. Java analysis will continue, but the analysis may be of reduced quality.",
|
||||
"severity": "note",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "A Maven process was aborted because it didn't write to the console for 5 seconds. Consider either lenghtening the timeout if appropriate by setting CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT to a higher value or zero for no timeout, or else investigate why Maven timed out. Java analysis will continue, but the analysis may be of reduced quality.",
|
||||
"severity": "note",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "At least one dependency JAR suggested by the build system could not be downloaded. This means the analysis will try to satisfy the dependency with its default choice for the required external package name, which may be the wrong version or the wrong package entirely. This may lead to partial analysis of code using this dependency. See the extraction log for full details. If the cause appears to be a temporary outage, consider retrying the analysis.",
|
||||
"severity": "note",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
def test(codeql, java, check_diagnostics_java):
|
||||
def test(codeql, java):
|
||||
codeql.database.create(
|
||||
build_mode="none",
|
||||
)
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis dropped the following dependencies because a sibling project depends on a higher version:\n\n* `junit/junit-4.11`",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Because no usable build tool (Gradle, Maven, etc) was found, build scripts could not be queried for guidance about the appropriate JDK version for the code being extracted, or precise dependency information. The default JDK will be used, and external dependencies will be inferred from the Java package names used.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -1,21 +1,3 @@
|
||||
{
|
||||
"attributes": {
|
||||
"java_vendor": "__REDACTED__",
|
||||
"java_version": "11.0.31"
|
||||
},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Analyzed a Gradle project without the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). This may use an incompatible version of Gradle.",
|
||||
"severity": "warning",
|
||||
|
||||
@@ -4,8 +4,7 @@ import pathlib
|
||||
|
||||
|
||||
# The version of gradle used doesn't work on java 17
|
||||
def test(codeql, use_java_11, java, environment, check_diagnostics):
|
||||
check_diagnostics.redact += ["attributes.java_vendor"]
|
||||
def test(codeql, use_java_11, java, environment):
|
||||
gradle_override_dir = pathlib.Path(tempfile.mkdtemp())
|
||||
if runs_on.windows:
|
||||
(gradle_override_dir / "gradle.bat").write_text("@echo off\nexit /b 2\n")
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
{
|
||||
"attributes": {},
|
||||
"markdownMessage": "Internal telemetry for the Java extractor.\n\nNo action needed.",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
"id": "java/extractor/summary",
|
||||
"name": "Java extractor telemetry"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": false,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
|
||||
"severity": "unknown",
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import os.path
|
||||
import shutil
|
||||
|
||||
def test(codeql, java, check_diagnostics_java):
|
||||
def test(codeql, java, check_diagnostics):
|
||||
|
||||
# Avoid shutil resolving mvn to the wrapper script in the test dir:
|
||||
os.environ["NoDefaultCurrentDirectoryInExePath"] = "0"
|
||||
|
||||
@@ -61,8 +61,6 @@ private module Ast implements AstSig<Location> {
|
||||
class Parameter extends AstNode {
|
||||
Parameter() { none() }
|
||||
|
||||
AstNode getPattern() { none() }
|
||||
|
||||
Expr getDefaultValue() { none() }
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ pluggy==1.5.0
|
||||
# via pytest
|
||||
pystache==0.6.8
|
||||
# via -r misc/codegen/requirements_in.txt
|
||||
pytest==8.3.5
|
||||
pytest==9.0.3
|
||||
# via -r misc/codegen/requirements_in.txt
|
||||
pyyaml==6.0.2
|
||||
# via -r misc/codegen/requirements_in.txt
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
flask
|
||||
pymongo==3.9
|
||||
pymongo==4.6.3
|
||||
|
||||
@@ -52,15 +52,6 @@ signature module AstSig<LocationSig Location> {
|
||||
|
||||
/** A parameter of a callable. */
|
||||
class Parameter extends AstNode {
|
||||
/**
|
||||
* Gets the pattern associated with this parameter.
|
||||
*
|
||||
* The pattern is included in the CFG while the parameter itself is not.
|
||||
* Although, in simple cases that do not involve destructuring, it is
|
||||
* allowed for the pattern to be equal to the parameter.
|
||||
*/
|
||||
AstNode getPattern();
|
||||
|
||||
/** Gets the default value of this parameter, if any. */
|
||||
Expr getDefaultValue();
|
||||
}
|
||||
@@ -640,7 +631,7 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
or
|
||||
n = any(Case case).getPattern(_)
|
||||
or
|
||||
exists(Parameter p | exists(p.getDefaultValue()) and n = p.getPattern())
|
||||
exists(n.(Parameter).getDefaultValue())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -812,27 +803,24 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
)
|
||||
}
|
||||
|
||||
private predicate hasCfg(AstNode n) {
|
||||
exists(getEnclosingCallable(n)) and
|
||||
(n instanceof Parameter implies n = n.(Parameter).getPattern())
|
||||
}
|
||||
|
||||
cached
|
||||
private newtype TNode =
|
||||
TBeforeNode(AstNode n) { Input1::cfgCachedStageRef() and hasCfg(n) } or
|
||||
TAstNode(AstNode n) { postOrInOrder(n) and hasCfg(n) } or
|
||||
TBeforeNode(AstNode n) { Input1::cfgCachedStageRef() and exists(getEnclosingCallable(n)) } or
|
||||
TAstNode(AstNode n) { postOrInOrder(n) and exists(getEnclosingCallable(n)) } or
|
||||
TAfterValueNode(AstNode n, ConditionalSuccessor t) {
|
||||
inConditionalContext(n, t.getKind()) and
|
||||
hasCfg(n) and
|
||||
exists(getEnclosingCallable(n)) and
|
||||
not constantCondition(n, t.getDual())
|
||||
} or
|
||||
TAfterNode(AstNode n) {
|
||||
hasCfg(n) and
|
||||
exists(getEnclosingCallable(n)) and
|
||||
not inConditionalContext(n, _) and
|
||||
not cannotTerminateNormally(n) and
|
||||
not simpleLeafNode(n)
|
||||
} or
|
||||
TAdditionalNode(AstNode n, string tag) { additionalNode(n, tag, _) and hasCfg(n) } or
|
||||
TAdditionalNode(AstNode n, string tag) {
|
||||
additionalNode(n, tag, _) and exists(getEnclosingCallable(n))
|
||||
} or
|
||||
TEntryNode(Callable c) { callableHasBodyPart(c, _) } or
|
||||
TAnnotatedExitNode(Callable c, Boolean normal) { callableHasBodyPart(c, _) } or
|
||||
TExitNode(Callable c) { callableHasBodyPart(c, _) }
|
||||
@@ -1402,8 +1390,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private AstNode getParameterPatternOrBodyEntry(Callable c, CallableContextOption ctx, int i) {
|
||||
result = getRankedParameter(c, ctx, i).getPattern()
|
||||
private AstNode getParameterOrBodyEntry(Callable c, CallableContextOption ctx, int i) {
|
||||
result = getRankedParameter(c, ctx, i)
|
||||
or
|
||||
(
|
||||
not exists(getRankedParameter(c, _, _)) and
|
||||
@@ -1421,18 +1409,18 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
or
|
||||
exists(Callable c |
|
||||
n1.(EntryNodeImpl).getEnclosingCallable() = c and
|
||||
n2.isBefore(getParameterPatternOrBodyEntry(c, _, 1))
|
||||
n2.isBefore(getParameterOrBodyEntry(c, _, 1))
|
||||
or
|
||||
exists(CallableContextOption ctx, Parameter p, int i | p = getRankedParameter(c, ctx, i) |
|
||||
exists(MatchingSuccessor t |
|
||||
n1.isAfterValue(p.getPattern(), t) and
|
||||
n1.isAfterValue(p, t) and
|
||||
if t.isMatch()
|
||||
then n2.isBefore(getParameterPatternOrBodyEntry(c, ctx, i + 1))
|
||||
then n2.isBefore(getParameterOrBodyEntry(c, ctx, i + 1))
|
||||
else n2.isBefore(p.getDefaultValue())
|
||||
)
|
||||
or
|
||||
n1.isAfter(p.getDefaultValue()) and
|
||||
n2.isBefore(getParameterPatternOrBodyEntry(c, ctx, i + 1))
|
||||
n2.isBefore(getParameterOrBodyEntry(c, ctx, i + 1))
|
||||
)
|
||||
or
|
||||
exists(Input1::CallableContext ctx, int i |
|
||||
@@ -1808,7 +1796,6 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
* and therefore should use default left-to-right evaluation.
|
||||
*/
|
||||
private predicate defaultCfg(AstNode ast) {
|
||||
hasCfg(ast) and
|
||||
not explicitStep(any(PreControlFlowNode n | n.isBefore(ast)), _)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user