mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge branch 'main' into post-release-prep/codeql-cli-2.12.3
This commit is contained in:
6
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/.gitattributes
vendored
Normal file
6
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# These are explicitly windows files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
BIN
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
244
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradlew
vendored
Executable file
244
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradlew
vendored
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradlew.bat
vendored
Normal file
92
java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,5 +1,7 @@
|
||||
import platform
|
||||
from create_database_utils import *
|
||||
|
||||
gradle_cmd = "gradlew.bat" if platform.system() == "Windows" else "./gradlew"
|
||||
|
||||
run_codeql_database_create(
|
||||
["gradle build --no-daemon --no-build-cache"], lang="java")
|
||||
runSuccessfully([get_cmd("gradle"), "clean"])
|
||||
["%s build --no-daemon --no-build-cache" % gradle_cmd], lang="java")
|
||||
|
||||
6
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/.gitattributes
vendored
Normal file
6
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# These are explicitly windows files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
BIN
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
244
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradlew
vendored
Executable file
244
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradlew
vendored
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradlew.bat
vendored
Normal file
92
java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,4 +1,7 @@
|
||||
import platform
|
||||
from create_database_utils import *
|
||||
|
||||
run_codeql_database_create(["gradle build --no-daemon --no-build-cache"], lang="java")
|
||||
runSuccessfully([get_cmd("gradle"), "clean"])
|
||||
gradle_cmd = "gradlew.bat" if platform.system() == "Windows" else "./gradlew"
|
||||
|
||||
run_codeql_database_create(
|
||||
["%s build --no-daemon --no-build-cache" % gradle_cmd], lang="java")
|
||||
|
||||
6
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/.gitattributes
vendored
Normal file
6
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# These are explicitly windows files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
244
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/gradlew
vendored
Executable file
244
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/gradlew
vendored
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/gradlew.bat
vendored
Normal file
92
java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,4 +1,7 @@
|
||||
import platform
|
||||
from create_database_utils import *
|
||||
|
||||
run_codeql_database_create(["gradle build --no-daemon --no-build-cache"], lang="java")
|
||||
runSuccessfully([get_cmd("gradle"), "clean"])
|
||||
gradle_cmd = "gradlew.bat" if platform.system() == "Windows" else "./gradlew"
|
||||
|
||||
run_codeql_database_create(
|
||||
["%s build --no-daemon --no-build-cache" % gradle_cmd], lang="java")
|
||||
|
||||
6
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/.gitattributes
vendored
Normal file
6
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# These are explicitly windows files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
BIN
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
244
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradlew
vendored
Executable file
244
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradlew
vendored
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradlew.bat
vendored
Normal file
92
java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,5 +1,7 @@
|
||||
import platform
|
||||
from create_database_utils import *
|
||||
|
||||
gradle_cmd = "gradlew.bat" if platform.system() == "Windows" else "./gradlew"
|
||||
|
||||
run_codeql_database_create(
|
||||
["gradle build --no-daemon --no-build-cache --rerun-tasks"], lang="java")
|
||||
runSuccessfully([get_cmd("gradle"), "clean"])
|
||||
["%s build --no-daemon --no-build-cache" % gradle_cmd], lang="java")
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* The query `java/hardcoded-credential-api-call` now recognizes methods that accept user and password from the SQLServerDataSource class of the Microsoft JDBC Driver for SQL Server.
|
||||
@@ -485,6 +485,10 @@ private predicate otherApiCallableCredentialParam(string s) {
|
||||
"com.mongodb.MongoCredential;createCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createMongoCRCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createPlainCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createScramSha1Credential(String, String, char[]);2"
|
||||
"com.mongodb.MongoCredential;createScramSha1Credential(String, String, char[]);2",
|
||||
"com.microsoft.sqlserver.jdbc.SQLServerDataSource;setUser(String);0",
|
||||
"com.microsoft.sqlserver.jdbc.SQLServerDataSource;setPassword(String);0",
|
||||
"com.microsoft.sqlserver.jdbc.SQLServerDataSource;getConnection(String, String);0",
|
||||
"com.microsoft.sqlserver.jdbc.SQLServerDataSource;getConnection(String, String);1",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ class TestCase extends TTestCase {
|
||||
*/
|
||||
Type getOutputType() {
|
||||
if baseOutput = SummaryComponentStack::return()
|
||||
then result = callable.getReturnType()
|
||||
then result = getReturnType(callable)
|
||||
else
|
||||
exists(int i |
|
||||
baseOutput = SummaryComponentStack::argument(i) and
|
||||
|
||||
@@ -16,6 +16,11 @@ Type getRootSourceDeclaration(Type t) {
|
||||
else result = t
|
||||
}
|
||||
|
||||
/** Gets the return type of the callable c, or the constructed tpe if it's a constructor */
|
||||
Type getReturnType(Callable c) {
|
||||
if c instanceof Constructor then result = c.getDeclaringType() else result = c.getReturnType()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if type `t` does not clash with another type we want to import that has the same base name.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import errno
|
||||
import json
|
||||
@@ -13,11 +13,14 @@ import tempfile
|
||||
|
||||
if any(s == "--help" for s in sys.argv):
|
||||
print("""Usage:
|
||||
GenerateFlowTestCase.py specsToTest.csv projectPom.xml outdir [--force]
|
||||
GenerateFlowTestCase.py specsToTest projectPom.xml outdir [--force]
|
||||
|
||||
This generates test cases exercising function model specifications found in specsToTest.csv
|
||||
This generates test cases exercising function model specifications found in specsToTest
|
||||
producing files Test.java, test.ql, test.ext.yml and test.expected in outdir.
|
||||
|
||||
specsToTest should either be a .csv file, a .yml file, or a directory of .yml files, containing the
|
||||
model specifications to test.
|
||||
|
||||
projectPom.xml should be a Maven pom sufficient to resolve the classes named in specsToTest.csv.
|
||||
Typically this means supplying a skeleton POM <dependencies> section that retrieves whatever jars
|
||||
contain the needed classes.
|
||||
@@ -40,14 +43,15 @@ if "--force" in sys.argv:
|
||||
|
||||
if len(sys.argv) != 4:
|
||||
print(
|
||||
"Usage: GenerateFlowTestCase.py specsToTest.csv projectPom.xml outdir [--force]", file=sys.stderr)
|
||||
print("specsToTest.csv should contain CSV rows describing method taint-propagation specifications to test", file=sys.stderr)
|
||||
print("projectPom.xml should import dependencies sufficient to resolve the types used in specsToTest.csv", file=sys.stderr)
|
||||
"Usage: GenerateFlowTestCase.py specsToTest projectPom.xml outdir [--force]", file=sys.stderr)
|
||||
print("specsToTest should contain CSV rows or YAML models describing method taint-propagation specifications to test", file=sys.stderr)
|
||||
print("projectPom.xml should import dependencies sufficient to resolve the types used in specsToTest", file=sys.stderr)
|
||||
print("\nRun with --help for more details.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.makedirs(sys.argv[3])
|
||||
except Exception as e:
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
print("Failed to create output directory %s: %s" % (sys.argv[3], e))
|
||||
sys.exit(1)
|
||||
@@ -75,38 +79,86 @@ except Exception as e:
|
||||
(sys.argv[2], e), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
commentRegex = re.compile("^\s*(//|#)")
|
||||
commentRegex = re.compile(r"^\s*(//|#)")
|
||||
|
||||
|
||||
def isComment(s):
|
||||
return commentRegex.match(s) is not None
|
||||
|
||||
|
||||
try:
|
||||
with open(sys.argv[1], "r") as f:
|
||||
specs = [l for l in f if not isComment(l)]
|
||||
except Exception as e:
|
||||
print("Failed to open %s: %s\n" % (sys.argv[1], e))
|
||||
def readCsv(file):
|
||||
try:
|
||||
with open(file, "r") as f:
|
||||
specs = [l.strip() for l in f if not isComment(l)]
|
||||
except Exception as e:
|
||||
print("Failed to open %s: %s\n" % (file, e))
|
||||
sys.exit(1)
|
||||
|
||||
specs = [row.split(";") for row in specs]
|
||||
return specs
|
||||
|
||||
|
||||
def readYml(file):
|
||||
try:
|
||||
import yaml
|
||||
with open(file, "r") as f:
|
||||
doc = yaml.load(f.read(), yaml.Loader)
|
||||
specs = []
|
||||
for ext in doc['extensions']:
|
||||
if ext['addsTo']['extensible'] == 'summaryModel':
|
||||
for row in ext['data']:
|
||||
if isinstance(row[2], bool):
|
||||
row[2] = str(row[2]).lower()
|
||||
specs.append(row)
|
||||
return specs
|
||||
except ImportError:
|
||||
print("PyYAML not found - try \n pip install pyyaml")
|
||||
sys.exit(1)
|
||||
except ValueError as e:
|
||||
print("Invalid yaml model in %s: %s\n" % (file, e))
|
||||
sys.exit(1)
|
||||
except OSError as e:
|
||||
print("Failed to open %s: %s\n" % (file, e))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def readYmlDir(dirname):
|
||||
specs = []
|
||||
for f in os.listdir(dirname):
|
||||
if f.endswith('.yml'):
|
||||
specs += readYml(f"{dirname}/{f}")
|
||||
return specs
|
||||
|
||||
|
||||
specsFile = sys.argv[1]
|
||||
if os.path.isdir(specsFile):
|
||||
specs = readYmlDir(specsFile)
|
||||
elif specsFile.endswith(".yml") or specsFile.endswith(".yaml"):
|
||||
specs = readYml(specsFile)
|
||||
elif specsFile.endswith(".csv"):
|
||||
specs = readCsv(specsFile)
|
||||
else:
|
||||
print(f"Invalid specs {specsFile}. Must be a csv file, a yml file, or a directory of yml files.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
projectTestPkgDir = os.path.join(projectDir, "src", "main", "java", "test")
|
||||
projectTestFile = os.path.join(projectTestPkgDir, "Test.java")
|
||||
|
||||
os.makedirs(projectTestPkgDir)
|
||||
|
||||
|
||||
def qualifiedOuterNameFromCsvRow(row):
|
||||
cells = row.split(";")
|
||||
if len(cells) < 2:
|
||||
def qualifiedOuterNameFromRow(row):
|
||||
if len(row) < 2:
|
||||
return None
|
||||
return cells[0] + "." + cells[1].replace("$", ".")
|
||||
return row[0] + "." + row[1].replace("$", ".")
|
||||
|
||||
|
||||
with open(projectTestFile, "w") as testJava:
|
||||
testJava.write("package test;\n\npublic class Test {\n\n")
|
||||
|
||||
for i, spec in enumerate(specs):
|
||||
outerName = qualifiedOuterNameFromCsvRow(spec)
|
||||
outerName = qualifiedOuterNameFromRow(spec)
|
||||
if outerName is None:
|
||||
print("A taint specification has the wrong format: should be 'package;classname;methodname....'", file=sys.stderr)
|
||||
print("Mis-formatted row: " + spec, file=sys.stderr)
|
||||
@@ -140,7 +192,7 @@ dependencies:
|
||||
with open(qlFile, "w") as f:
|
||||
f.write(
|
||||
"import java\nimport utils.flowtestcasegenerator.GenerateFlowTestCase\n\nclass GenRow extends TargetSummaryModelCsv {\n\n\toverride predicate row(string r) {\n\t\tr = [\n")
|
||||
f.write(",\n".join('\t\t\t"%s"' % spec.strip() for spec in specs))
|
||||
f.write(",\n".join('\t\t\t"%s"' % ';'.join(spec) for spec in specs))
|
||||
f.write("\n\t\t]\n\t}\n}\n")
|
||||
|
||||
print("Generating tests")
|
||||
@@ -221,7 +273,7 @@ if len(supportModelRows) != 0:
|
||||
# Make a test extension file
|
||||
with open(resultYml, "w") as f:
|
||||
models = "\n".join(' - [%s]' %
|
||||
modelSpecRow[0].strip() for modelSpecRow in supportModelRows)
|
||||
modelSpecRow[0].strip() for modelSpecRow in supportModelRows)
|
||||
dataextensions = f"""extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-tests
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
|
||||
|
||||
public class HardcodedMSSQLCredentials {
|
||||
public static void main(SQLServerDataSource ds) throws Exception {
|
||||
ds.setUser("Username"); // $ HardcodedCredentialsApiCall
|
||||
ds.setPassword("password"); // $ HardcodedCredentialsApiCall
|
||||
ds.getConnection("Username", null); // $ HardcodedCredentialsApiCall
|
||||
ds.getConnection(null, "password"); // $ HardcodedCredentialsApiCall
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/amazon-aws-sdk-1.11.700:${testdir}/../../../../../stubs/azure-sdk-for-java:${testdir}/../../../../../stubs/shiro-core-1.4.0:${testdir}/../../../../../stubs/jsch-0.1.55:${testdir}/../../../../../stubs/ganymed-ssh-2-260:${testdir}/../../../../../stubs/apache-mina-sshd-2.8.0:${testdir}/../../../../../stubs/sshj-0.33.0:${testdir}/../../../../../stubs/j2ssh-1.5.5:${testdir}/../../../../../stubs/trilead-ssh2-212:${testdir}/../../../../../stubs/apache-commons-net-3.8.0:${testdir}/../../../../../stubs/mongodbClient
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/amazon-aws-sdk-1.11.700:${testdir}/../../../../../stubs/azure-sdk-for-java:${testdir}/../../../../../stubs/shiro-core-1.4.0:${testdir}/../../../../../stubs/jsch-0.1.55:${testdir}/../../../../../stubs/ganymed-ssh-2-260:${testdir}/../../../../../stubs/apache-mina-sshd-2.8.0:${testdir}/../../../../../stubs/sshj-0.33.0:${testdir}/../../../../../stubs/j2ssh-1.5.5:${testdir}/../../../../../stubs/trilead-ssh2-212:${testdir}/../../../../../stubs/apache-commons-net-3.8.0:${testdir}/../../../../../stubs/mongodbClient:${testdir}/../../../../../stubs/mssql-jdbc-12.2.0
|
||||
|
||||
166
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java
generated
Normal file
166
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java
generated
Normal file
@@ -0,0 +1,166 @@
|
||||
// Generated automatically from com.microsoft.sqlserver.jdbc.ISQLServerDataSource for testing purposes
|
||||
|
||||
package com.microsoft.sqlserver.jdbc;
|
||||
|
||||
import com.microsoft.sqlserver.jdbc.SQLServerAccessTokenCallback;
|
||||
import javax.sql.CommonDataSource;
|
||||
import org.ietf.jgss.GSSCredential;
|
||||
|
||||
public interface ISQLServerDataSource extends CommonDataSource
|
||||
{
|
||||
GSSCredential getGSSCredentials();
|
||||
SQLServerAccessTokenCallback getAccessTokenCallback();
|
||||
String getAADSecurePrincipalId();
|
||||
String getAccessToken();
|
||||
String getApplicationIntent();
|
||||
String getApplicationName();
|
||||
String getAuthentication();
|
||||
String getClientCertificate();
|
||||
String getClientKey();
|
||||
String getColumnEncryptionSetting();
|
||||
String getDatabaseName();
|
||||
String getDatetimeParameterType();
|
||||
String getDescription();
|
||||
String getDomain();
|
||||
String getEnclaveAttestationProtocol();
|
||||
String getEnclaveAttestationUrl();
|
||||
String getEncrypt();
|
||||
String getFailoverPartner();
|
||||
String getHostNameInCertificate();
|
||||
String getIPAddressPreference();
|
||||
String getInstanceName();
|
||||
String getJAASConfigurationName();
|
||||
String getJASSConfigurationName();
|
||||
String getKeyStoreAuthentication();
|
||||
String getKeyStoreLocation();
|
||||
String getKeyStorePrincipalId();
|
||||
String getKeyVaultProviderClientId();
|
||||
String getMSIClientId();
|
||||
String getMaxResultBuffer();
|
||||
String getPrepareMethod();
|
||||
String getRealm();
|
||||
String getResponseBuffering();
|
||||
String getSSLProtocol();
|
||||
String getSelectMethod();
|
||||
String getServerCertificate();
|
||||
String getServerName();
|
||||
String getServerSpn();
|
||||
String getSocketFactoryClass();
|
||||
String getSocketFactoryConstructorArg();
|
||||
String getTrustManagerClass();
|
||||
String getTrustManagerConstructorArg();
|
||||
String getTrustStore();
|
||||
String getTrustStoreType();
|
||||
String getURL();
|
||||
String getUser();
|
||||
String getWorkstationID();
|
||||
boolean getDelayLoadingLobs();
|
||||
boolean getDisableStatementPooling();
|
||||
boolean getEnablePrepareOnFirstPreparedStatementCall();
|
||||
boolean getFIPS();
|
||||
boolean getLastUpdateCount();
|
||||
boolean getMultiSubnetFailover();
|
||||
boolean getReplication();
|
||||
boolean getSendStringParametersAsUnicode();
|
||||
boolean getSendTemporalDataTypesAsStringForBulkCopy();
|
||||
boolean getSendTimeAsDatetime();
|
||||
boolean getServerNameAsACE();
|
||||
boolean getTransparentNetworkIPResolution();
|
||||
boolean getTrustServerCertificate();
|
||||
boolean getUseBulkCopyForBatchInsert();
|
||||
boolean getUseFmtOnly();
|
||||
boolean getXopenStates();
|
||||
int getCancelQueryTimeout();
|
||||
int getConnectRetryCount();
|
||||
int getConnectRetryInterval();
|
||||
int getLockTimeout();
|
||||
int getMsiTokenCacheTtl();
|
||||
int getPacketSize();
|
||||
int getPortNumber();
|
||||
int getQueryTimeout();
|
||||
int getServerPreparedStatementDiscardThreshold();
|
||||
int getSocketTimeout();
|
||||
int getStatementPoolingCacheSize();
|
||||
void setAADSecurePrincipalId(String p0);
|
||||
void setAADSecurePrincipalSecret(String p0);
|
||||
void setAccessToken(String p0);
|
||||
void setAccessTokenCallback(SQLServerAccessTokenCallback p0);
|
||||
void setApplicationIntent(String p0);
|
||||
void setApplicationName(String p0);
|
||||
void setAuthentication(String p0);
|
||||
void setAuthenticationScheme(String p0);
|
||||
void setCancelQueryTimeout(int p0);
|
||||
void setClientCertificate(String p0);
|
||||
void setClientKey(String p0);
|
||||
void setClientKeyPassword(String p0);
|
||||
void setColumnEncryptionSetting(String p0);
|
||||
void setConnectRetryCount(int p0);
|
||||
void setConnectRetryInterval(int p0);
|
||||
void setDatabaseName(String p0);
|
||||
void setDatetimeParameterType(String p0);
|
||||
void setDelayLoadingLobs(boolean p0);
|
||||
void setDescription(String p0);
|
||||
void setDisableStatementPooling(boolean p0);
|
||||
void setDomain(String p0);
|
||||
void setEnablePrepareOnFirstPreparedStatementCall(boolean p0);
|
||||
void setEnclaveAttestationProtocol(String p0);
|
||||
void setEnclaveAttestationUrl(String p0);
|
||||
void setEncrypt(String p0);
|
||||
void setEncrypt(boolean p0);
|
||||
void setFIPS(boolean p0);
|
||||
void setFailoverPartner(String p0);
|
||||
void setGSSCredentials(GSSCredential p0);
|
||||
void setHostNameInCertificate(String p0);
|
||||
void setIPAddressPreference(String p0);
|
||||
void setInstanceName(String p0);
|
||||
void setIntegratedSecurity(boolean p0);
|
||||
void setJAASConfigurationName(String p0);
|
||||
void setJASSConfigurationName(String p0);
|
||||
void setKeyStoreAuthentication(String p0);
|
||||
void setKeyStoreLocation(String p0);
|
||||
void setKeyStorePrincipalId(String p0);
|
||||
void setKeyStoreSecret(String p0);
|
||||
void setKeyVaultProviderClientId(String p0);
|
||||
void setKeyVaultProviderClientKey(String p0);
|
||||
void setLastUpdateCount(boolean p0);
|
||||
void setLockTimeout(int p0);
|
||||
void setMSIClientId(String p0);
|
||||
void setMaxResultBuffer(String p0);
|
||||
void setMsiTokenCacheTtl(int p0);
|
||||
void setMultiSubnetFailover(boolean p0);
|
||||
void setPacketSize(int p0);
|
||||
void setPassword(String p0);
|
||||
void setPortNumber(int p0);
|
||||
void setPrepareMethod(String p0);
|
||||
void setQueryTimeout(int p0);
|
||||
void setRealm(String p0);
|
||||
void setReplication(boolean p0);
|
||||
void setResponseBuffering(String p0);
|
||||
void setSSLProtocol(String p0);
|
||||
void setSelectMethod(String p0);
|
||||
void setSendStringParametersAsUnicode(boolean p0);
|
||||
void setSendTemporalDataTypesAsStringForBulkCopy(boolean p0);
|
||||
void setSendTimeAsDatetime(boolean p0);
|
||||
void setServerCertificate(String p0);
|
||||
void setServerName(String p0);
|
||||
void setServerNameAsACE(boolean p0);
|
||||
void setServerPreparedStatementDiscardThreshold(int p0);
|
||||
void setServerSpn(String p0);
|
||||
void setSocketFactoryClass(String p0);
|
||||
void setSocketFactoryConstructorArg(String p0);
|
||||
void setSocketTimeout(int p0);
|
||||
void setStatementPoolingCacheSize(int p0);
|
||||
void setTransparentNetworkIPResolution(boolean p0);
|
||||
void setTrustManagerClass(String p0);
|
||||
void setTrustManagerConstructorArg(String p0);
|
||||
void setTrustServerCertificate(boolean p0);
|
||||
void setTrustStore(String p0);
|
||||
void setTrustStorePassword(String p0);
|
||||
void setTrustStoreType(String p0);
|
||||
void setURL(String p0);
|
||||
void setUseBulkCopyForBatchInsert(boolean p0);
|
||||
void setUseFmtOnly(boolean p0);
|
||||
void setUser(String p0);
|
||||
void setWorkstationID(String p0);
|
||||
void setXopenStates(boolean p0);
|
||||
}
|
||||
10
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SQLServerAccessTokenCallback.java
generated
Normal file
10
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SQLServerAccessTokenCallback.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from com.microsoft.sqlserver.jdbc.SQLServerAccessTokenCallback for testing purposes
|
||||
|
||||
package com.microsoft.sqlserver.jdbc;
|
||||
|
||||
import com.microsoft.sqlserver.jdbc.SqlAuthenticationToken;
|
||||
|
||||
public interface SQLServerAccessTokenCallback
|
||||
{
|
||||
SqlAuthenticationToken getAccessToken(String p0, String p1);
|
||||
}
|
||||
185
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java
generated
Normal file
185
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java
generated
Normal file
@@ -0,0 +1,185 @@
|
||||
// Generated automatically from com.microsoft.sqlserver.jdbc.SQLServerDataSource for testing purposes
|
||||
|
||||
package com.microsoft.sqlserver.jdbc;
|
||||
|
||||
import com.microsoft.sqlserver.jdbc.ISQLServerDataSource;
|
||||
import com.microsoft.sqlserver.jdbc.SQLServerAccessTokenCallback;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Connection;
|
||||
import java.util.logging.Logger;
|
||||
import javax.naming.Reference;
|
||||
import javax.naming.Referenceable;
|
||||
import javax.sql.DataSource;
|
||||
import org.ietf.jgss.GSSCredential;
|
||||
|
||||
public class SQLServerDataSource implements DataSource, ISQLServerDataSource, Referenceable, Serializable
|
||||
{
|
||||
public <T> T unwrap(Class<T> p0){ return null; }
|
||||
public Connection getConnection(){ return null; }
|
||||
public Connection getConnection(String p0, String p1){ return null; }
|
||||
public GSSCredential getGSSCredentials(){ return null; }
|
||||
public Logger getParentLogger(){ return null; }
|
||||
public PrintWriter getLogWriter(){ return null; }
|
||||
public Reference getReference(){ return null; }
|
||||
public SQLServerAccessTokenCallback getAccessTokenCallback(){ return null; }
|
||||
public SQLServerDataSource(){}
|
||||
public String getAADSecurePrincipalId(){ return null; }
|
||||
public String getAccessToken(){ return null; }
|
||||
public String getApplicationIntent(){ return null; }
|
||||
public String getApplicationName(){ return null; }
|
||||
public String getAuthentication(){ return null; }
|
||||
public String getClientCertificate(){ return null; }
|
||||
public String getClientKey(){ return null; }
|
||||
public String getColumnEncryptionSetting(){ return null; }
|
||||
public String getDatabaseName(){ return null; }
|
||||
public String getDatetimeParameterType(){ return null; }
|
||||
public String getDescription(){ return null; }
|
||||
public String getDomain(){ return null; }
|
||||
public String getEnclaveAttestationProtocol(){ return null; }
|
||||
public String getEnclaveAttestationUrl(){ return null; }
|
||||
public String getEncrypt(){ return null; }
|
||||
public String getFailoverPartner(){ return null; }
|
||||
public String getHostNameInCertificate(){ return null; }
|
||||
public String getIPAddressPreference(){ return null; }
|
||||
public String getInstanceName(){ return null; }
|
||||
public String getJAASConfigurationName(){ return null; }
|
||||
public String getJASSConfigurationName(){ return null; }
|
||||
public String getKeyStoreAuthentication(){ return null; }
|
||||
public String getKeyStoreLocation(){ return null; }
|
||||
public String getKeyStorePrincipalId(){ return null; }
|
||||
public String getKeyVaultProviderClientId(){ return null; }
|
||||
public String getMSIClientId(){ return null; }
|
||||
public String getMaxResultBuffer(){ return null; }
|
||||
public String getPrepareMethod(){ return null; }
|
||||
public String getRealm(){ return null; }
|
||||
public String getResponseBuffering(){ return null; }
|
||||
public String getSSLProtocol(){ return null; }
|
||||
public String getSelectMethod(){ return null; }
|
||||
public String getServerCertificate(){ return null; }
|
||||
public String getServerName(){ return null; }
|
||||
public String getServerSpn(){ return null; }
|
||||
public String getSocketFactoryClass(){ return null; }
|
||||
public String getSocketFactoryConstructorArg(){ return null; }
|
||||
public String getTrustManagerClass(){ return null; }
|
||||
public String getTrustManagerConstructorArg(){ return null; }
|
||||
public String getTrustStore(){ return null; }
|
||||
public String getTrustStoreType(){ return null; }
|
||||
public String getURL(){ return null; }
|
||||
public String getUser(){ return null; }
|
||||
public String getWorkstationID(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean getDelayLoadingLobs(){ return false; }
|
||||
public boolean getDisableStatementPooling(){ return false; }
|
||||
public boolean getEnablePrepareOnFirstPreparedStatementCall(){ return false; }
|
||||
public boolean getFIPS(){ return false; }
|
||||
public boolean getLastUpdateCount(){ return false; }
|
||||
public boolean getMultiSubnetFailover(){ return false; }
|
||||
public boolean getReplication(){ return false; }
|
||||
public boolean getSendStringParametersAsUnicode(){ return false; }
|
||||
public boolean getSendTemporalDataTypesAsStringForBulkCopy(){ return false; }
|
||||
public boolean getSendTimeAsDatetime(){ return false; }
|
||||
public boolean getServerNameAsACE(){ return false; }
|
||||
public boolean getTransparentNetworkIPResolution(){ return false; }
|
||||
public boolean getTrustServerCertificate(){ return false; }
|
||||
public boolean getUseBulkCopyForBatchInsert(){ return false; }
|
||||
public boolean getUseFmtOnly(){ return false; }
|
||||
public boolean getXopenStates(){ return false; }
|
||||
public boolean isWrapperFor(Class<? extends Object> p0){ return false; }
|
||||
public int getCancelQueryTimeout(){ return 0; }
|
||||
public int getConnectRetryCount(){ return 0; }
|
||||
public int getConnectRetryInterval(){ return 0; }
|
||||
public int getLockTimeout(){ return 0; }
|
||||
public int getLoginTimeout(){ return 0; }
|
||||
public int getMsiTokenCacheTtl(){ return 0; }
|
||||
public int getPacketSize(){ return 0; }
|
||||
public int getPortNumber(){ return 0; }
|
||||
public int getQueryTimeout(){ return 0; }
|
||||
public int getServerPreparedStatementDiscardThreshold(){ return 0; }
|
||||
public int getSocketTimeout(){ return 0; }
|
||||
public int getStatementPoolingCacheSize(){ return 0; }
|
||||
public void setAADSecurePrincipalId(String p0){}
|
||||
public void setAADSecurePrincipalSecret(String p0){}
|
||||
public void setAccessToken(String p0){}
|
||||
public void setAccessTokenCallback(SQLServerAccessTokenCallback p0){}
|
||||
public void setApplicationIntent(String p0){}
|
||||
public void setApplicationName(String p0){}
|
||||
public void setAuthentication(String p0){}
|
||||
public void setAuthenticationScheme(String p0){}
|
||||
public void setCancelQueryTimeout(int p0){}
|
||||
public void setClientCertificate(String p0){}
|
||||
public void setClientKey(String p0){}
|
||||
public void setClientKeyPassword(String p0){}
|
||||
public void setColumnEncryptionSetting(String p0){}
|
||||
public void setConnectRetryCount(int p0){}
|
||||
public void setConnectRetryInterval(int p0){}
|
||||
public void setDatabaseName(String p0){}
|
||||
public void setDatetimeParameterType(String p0){}
|
||||
public void setDelayLoadingLobs(boolean p0){}
|
||||
public void setDescription(String p0){}
|
||||
public void setDisableStatementPooling(boolean p0){}
|
||||
public void setDomain(String p0){}
|
||||
public void setEnablePrepareOnFirstPreparedStatementCall(boolean p0){}
|
||||
public void setEnclaveAttestationProtocol(String p0){}
|
||||
public void setEnclaveAttestationUrl(String p0){}
|
||||
public void setEncrypt(String p0){}
|
||||
public void setEncrypt(boolean p0){}
|
||||
public void setFIPS(boolean p0){}
|
||||
public void setFailoverPartner(String p0){}
|
||||
public void setGSSCredentials(GSSCredential p0){}
|
||||
public void setHostNameInCertificate(String p0){}
|
||||
public void setIPAddressPreference(String p0){}
|
||||
public void setInstanceName(String p0){}
|
||||
public void setIntegratedSecurity(boolean p0){}
|
||||
public void setJAASConfigurationName(String p0){}
|
||||
public void setJASSConfigurationName(String p0){}
|
||||
public void setKeyStoreAuthentication(String p0){}
|
||||
public void setKeyStoreLocation(String p0){}
|
||||
public void setKeyStorePrincipalId(String p0){}
|
||||
public void setKeyStoreSecret(String p0){}
|
||||
public void setKeyVaultProviderClientId(String p0){}
|
||||
public void setKeyVaultProviderClientKey(String p0){}
|
||||
public void setLastUpdateCount(boolean p0){}
|
||||
public void setLockTimeout(int p0){}
|
||||
public void setLogWriter(PrintWriter p0){}
|
||||
public void setLoginTimeout(int p0){}
|
||||
public void setMSIClientId(String p0){}
|
||||
public void setMaxResultBuffer(String p0){}
|
||||
public void setMsiTokenCacheTtl(int p0){}
|
||||
public void setMultiSubnetFailover(boolean p0){}
|
||||
public void setPacketSize(int p0){}
|
||||
public void setPassword(String p0){}
|
||||
public void setPortNumber(int p0){}
|
||||
public void setPrepareMethod(String p0){}
|
||||
public void setQueryTimeout(int p0){}
|
||||
public void setRealm(String p0){}
|
||||
public void setReplication(boolean p0){}
|
||||
public void setResponseBuffering(String p0){}
|
||||
public void setSSLProtocol(String p0){}
|
||||
public void setSelectMethod(String p0){}
|
||||
public void setSendStringParametersAsUnicode(boolean p0){}
|
||||
public void setSendTemporalDataTypesAsStringForBulkCopy(boolean p0){}
|
||||
public void setSendTimeAsDatetime(boolean p0){}
|
||||
public void setServerCertificate(String p0){}
|
||||
public void setServerName(String p0){}
|
||||
public void setServerNameAsACE(boolean p0){}
|
||||
public void setServerPreparedStatementDiscardThreshold(int p0){}
|
||||
public void setServerSpn(String p0){}
|
||||
public void setSocketFactoryClass(String p0){}
|
||||
public void setSocketFactoryConstructorArg(String p0){}
|
||||
public void setSocketTimeout(int p0){}
|
||||
public void setStatementPoolingCacheSize(int p0){}
|
||||
public void setTransparentNetworkIPResolution(boolean p0){}
|
||||
public void setTrustManagerClass(String p0){}
|
||||
public void setTrustManagerConstructorArg(String p0){}
|
||||
public void setTrustServerCertificate(boolean p0){}
|
||||
public void setTrustStore(String p0){}
|
||||
public void setTrustStorePassword(String p0){}
|
||||
public void setTrustStoreType(String p0){}
|
||||
public void setURL(String p0){}
|
||||
public void setUseBulkCopyForBatchInsert(boolean p0){}
|
||||
public void setUseFmtOnly(boolean p0){}
|
||||
public void setUser(String p0){}
|
||||
public void setWorkstationID(String p0){}
|
||||
public void setXopenStates(boolean p0){}
|
||||
}
|
||||
16
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SqlAuthenticationToken.java
generated
Normal file
16
java/ql/test/stubs/mssql-jdbc-12.2.0/com/microsoft/sqlserver/jdbc/SqlAuthenticationToken.java
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// Generated automatically from com.microsoft.sqlserver.jdbc.SqlAuthenticationToken for testing purposes
|
||||
|
||||
package com.microsoft.sqlserver.jdbc;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class SqlAuthenticationToken implements Serializable
|
||||
{
|
||||
protected SqlAuthenticationToken() {}
|
||||
public Date getExpiresOn(){ return null; }
|
||||
public SqlAuthenticationToken(String p0, Date p1){}
|
||||
public SqlAuthenticationToken(String p0, long p1){}
|
||||
public String getAccessToken(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
}
|
||||
11
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/crypto/SecretKey.java
generated
Normal file
11
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/crypto/SecretKey.java
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from javax.crypto.SecretKey for testing purposes
|
||||
|
||||
package javax.crypto;
|
||||
|
||||
import java.security.Key;
|
||||
import javax.security.auth.Destroyable;
|
||||
|
||||
public interface SecretKey extends Destroyable, Key
|
||||
{
|
||||
static long serialVersionUID = 0;
|
||||
}
|
||||
18
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/crypto/spec/SecretKeySpec.java
generated
Normal file
18
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/crypto/spec/SecretKeySpec.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from javax.crypto.spec.SecretKeySpec for testing purposes
|
||||
|
||||
package javax.crypto.spec;
|
||||
|
||||
import java.security.spec.KeySpec;
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
public class SecretKeySpec implements KeySpec, SecretKey
|
||||
{
|
||||
protected SecretKeySpec() {}
|
||||
public SecretKeySpec(byte[] p0, String p1){}
|
||||
public SecretKeySpec(byte[] p0, int p1, int p2, String p3){}
|
||||
public String getAlgorithm(){ return null; }
|
||||
public String getFormat(){ return null; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public byte[] getEncoded(){ return null; }
|
||||
public int hashCode(){ return 0; }
|
||||
}
|
||||
17
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/RefAddr.java
generated
Normal file
17
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/RefAddr.java
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// Generated automatically from javax.naming.RefAddr for testing purposes
|
||||
|
||||
package javax.naming;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
abstract public class RefAddr implements Serializable
|
||||
{
|
||||
protected RefAddr() {}
|
||||
protected RefAddr(String p0){}
|
||||
protected String addrType = null;
|
||||
public String getType(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public abstract Object getContent();
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public int hashCode(){ return 0; }
|
||||
}
|
||||
36
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/Reference.java
generated
Normal file
36
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/Reference.java
generated
Normal file
@@ -0,0 +1,36 @@
|
||||
// Generated automatically from javax.naming.Reference for testing purposes
|
||||
|
||||
package javax.naming;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
import javax.naming.RefAddr;
|
||||
|
||||
public class Reference implements Cloneable, Serializable
|
||||
{
|
||||
protected Reference() {}
|
||||
protected String classFactory = null;
|
||||
protected String classFactoryLocation = null;
|
||||
protected String className = null;
|
||||
protected Vector<RefAddr> addrs = null;
|
||||
public Enumeration<RefAddr> getAll(){ return null; }
|
||||
public Object clone(){ return null; }
|
||||
public Object remove(int p0){ return null; }
|
||||
public RefAddr get(String p0){ return null; }
|
||||
public RefAddr get(int p0){ return null; }
|
||||
public Reference(String p0){}
|
||||
public Reference(String p0, RefAddr p1){}
|
||||
public Reference(String p0, RefAddr p1, String p2, String p3){}
|
||||
public Reference(String p0, String p1, String p2){}
|
||||
public String getClassName(){ return null; }
|
||||
public String getFactoryClassLocation(){ return null; }
|
||||
public String getFactoryClassName(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public int hashCode(){ return 0; }
|
||||
public int size(){ return 0; }
|
||||
public void add(RefAddr p0){}
|
||||
public void add(int p0, RefAddr p1){}
|
||||
public void clear(){}
|
||||
}
|
||||
10
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/Referenceable.java
generated
Normal file
10
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/naming/Referenceable.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from javax.naming.Referenceable for testing purposes
|
||||
|
||||
package javax.naming;
|
||||
|
||||
import javax.naming.Reference;
|
||||
|
||||
public interface Referenceable
|
||||
{
|
||||
Reference getReference();
|
||||
}
|
||||
10
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/security/auth/Destroyable.java
generated
Normal file
10
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/security/auth/Destroyable.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from javax.security.auth.Destroyable for testing purposes
|
||||
|
||||
package javax.security.auth;
|
||||
|
||||
|
||||
public interface Destroyable
|
||||
{
|
||||
default boolean isDestroyed(){ return false; }
|
||||
default void destroy(){}
|
||||
}
|
||||
17
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/sql/CommonDataSource.java
generated
Normal file
17
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/sql/CommonDataSource.java
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// Generated automatically from javax.sql.CommonDataSource for testing purposes
|
||||
|
||||
package javax.sql;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.ShardingKeyBuilder;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public interface CommonDataSource
|
||||
{
|
||||
Logger getParentLogger();
|
||||
PrintWriter getLogWriter();
|
||||
default ShardingKeyBuilder createShardingKeyBuilder(){ return null; }
|
||||
int getLoginTimeout();
|
||||
void setLogWriter(PrintWriter p0);
|
||||
void setLoginTimeout(int p0);
|
||||
}
|
||||
20
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/sql/DataSource.java
generated
Normal file
20
java/ql/test/stubs/mssql-jdbc-12.2.0/javax/sql/DataSource.java
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
// Generated automatically from javax.sql.DataSource for testing purposes
|
||||
|
||||
package javax.sql;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ConnectionBuilder;
|
||||
import java.sql.Wrapper;
|
||||
import javax.sql.CommonDataSource;
|
||||
|
||||
public interface DataSource extends CommonDataSource, Wrapper
|
||||
{
|
||||
Connection getConnection();
|
||||
Connection getConnection(String p0, String p1);
|
||||
PrintWriter getLogWriter();
|
||||
default ConnectionBuilder createConnectionBuilder(){ return null; }
|
||||
int getLoginTimeout();
|
||||
void setLogWriter(PrintWriter p0);
|
||||
void setLoginTimeout(int p0);
|
||||
}
|
||||
27
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/GSSCredential.java
generated
Normal file
27
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/GSSCredential.java
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
// Generated automatically from org.ietf.jgss.GSSCredential for testing purposes
|
||||
|
||||
package org.ietf.jgss;
|
||||
|
||||
import org.ietf.jgss.GSSName;
|
||||
import org.ietf.jgss.Oid;
|
||||
|
||||
public interface GSSCredential extends Cloneable
|
||||
{
|
||||
GSSName getName();
|
||||
GSSName getName(Oid p0);
|
||||
Oid[] getMechs();
|
||||
boolean equals(Object p0);
|
||||
int getRemainingAcceptLifetime(Oid p0);
|
||||
int getRemainingInitLifetime(Oid p0);
|
||||
int getRemainingLifetime();
|
||||
int getUsage();
|
||||
int getUsage(Oid p0);
|
||||
int hashCode();
|
||||
static int ACCEPT_ONLY = 0;
|
||||
static int DEFAULT_LIFETIME = 0;
|
||||
static int INDEFINITE_LIFETIME = 0;
|
||||
static int INITIATE_AND_ACCEPT = 0;
|
||||
static int INITIATE_ONLY = 0;
|
||||
void add(GSSName p0, int p1, int p2, Oid p3, int p4);
|
||||
void dispose();
|
||||
}
|
||||
24
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/GSSName.java
generated
Normal file
24
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/GSSName.java
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
// Generated automatically from org.ietf.jgss.GSSName for testing purposes
|
||||
|
||||
package org.ietf.jgss;
|
||||
|
||||
import org.ietf.jgss.Oid;
|
||||
|
||||
public interface GSSName
|
||||
{
|
||||
GSSName canonicalize(Oid p0);
|
||||
Oid getStringNameType();
|
||||
String toString();
|
||||
boolean equals(GSSName p0);
|
||||
boolean equals(Object p0);
|
||||
boolean isAnonymous();
|
||||
boolean isMN();
|
||||
byte[] export();
|
||||
int hashCode();
|
||||
static Oid NT_ANONYMOUS = null;
|
||||
static Oid NT_EXPORT_NAME = null;
|
||||
static Oid NT_HOSTBASED_SERVICE = null;
|
||||
static Oid NT_MACHINE_UID_NAME = null;
|
||||
static Oid NT_STRING_UID_NAME = null;
|
||||
static Oid NT_USER_NAME = null;
|
||||
}
|
||||
18
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/Oid.java
generated
Normal file
18
java/ql/test/stubs/mssql-jdbc-12.2.0/org/ietf/jgss/Oid.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.ietf.jgss.Oid for testing purposes
|
||||
|
||||
package org.ietf.jgss;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Oid
|
||||
{
|
||||
protected Oid() {}
|
||||
public Oid(InputStream p0){}
|
||||
public Oid(String p0){}
|
||||
public Oid(byte[] p0){}
|
||||
public String toString(){ return null; }
|
||||
public boolean containedIn(Oid[] p0){ return false; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public byte[] getDER(){ return null; }
|
||||
public int hashCode(){ return 0; }
|
||||
}
|
||||
Reference in New Issue
Block a user