diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1de8c3be..91c79faf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ buildConfig = "3.0.3" owasp = "7.1.0.1" jacksonDatabind = "2.15.0" picocli = "4.6.3" -snakeYaml = "1.33" +snakeYaml = "2.0" #used for authz lib integration rundeck = "4.2.0-20220509" testcontainers = "1.17.2" diff --git a/gradle/verification-keyring.keys b/gradle/verification-keyring.keys index 642c74fc..346e73ce 100644 --- a/gradle/verification-keyring.keys +++ b/gradle/verification-keyring.keys @@ -8859,3 +8859,50 @@ H2Ir6RZpmqeY4NI6ujL41iUru20RzTNCAQA8jgmCMq9kDxaykpzdSvFHnyijywCZ B1jblPtxo2UqRO/qhPfqSkoVcpWmxgiPUFOr =w8k7 -----END PGP PUBLIC KEY BLOCK----- + +pub A9321EDAA5CB3202 +uid Werner Randelshofer + +sub D36DB5C489BAAC5B +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: BCPG v1.68 + +mQGNBGBoC2ABDACyCWLqqAo9NeThE90hBoYomtgLci5I8+7PxSYeQfzUYjXzZcnh +6d/zHaeC0zxGhT2LNe5i3p2e36xSeFDobjG2Il/nv+4jFCgbn3TZ2hEingPuPsg5 +isodOXHBSY9iHPTKInpiu+J79MWP9GVZ6GeOOgQaNSrNN3uDE1w3rukB2SrXGdfT +/6YZIOtwWZVzc2m9lalPmOAyI4KLI/s37C8Ozfv3c+Bx11WRVzWVpBTo94fU4DPu +Yzkx2Wxuc4TT5k6bQJI/GHi36M7xkUauXhkRCNvBz+LFVcFjtsv6S37L6RZib6mz +jZTW+iyD4h66gqzg3hSRxv4YzHgR/Os26Br2ioZNzH6hJFtNktR4oN/2kydmj5Od +WYjvdMmd/dMbZheZE3f8sziUKCyvWMIddnHAM81uDTXgWcMgYSa3npOGZhfk41z+ +w9o2f1kXIfdurqlA1n8np07PLw5Rfpjvbs7EZxPTJwcc1enaNyL64fb+YIUtFrcW +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a0QON/+Qj3p+OyW15f+FfLjHI/BkNAi4n +cNeeazAwuLCMJGMS+dLarHMbbAKLaH0UI062ch3Aq2Sa3io1gU6vYHvoKNMNfYdN +woGX85EkzX6A9fm9jBviios1RLkpfO70MoxpWjl/rwHG57GOItWZ7O53ebs6HrFP +dUYQs0Gz/lj+BaQPwDcMxADfYtGnYMepABEBAAGJAbwEGAEIACYWIQRurXUrPis4 +6OIjbXupMh7apcsyAgUCYGgLYAIbDAUJA8JnAAAKCRCpMh7apcsyAj39DACMEaGs +skfZBBbF9BHklmN9OHbGKK4qfwY6f3Pl+QEC4m2y5Uaxgx4n0SJZ/p4YdVopRj07 +cdVYEkqJC31co0XPvfbjyBfhcH1BXkKQiYAZMUTqc+ILGHrY/vzP27Je+vck6M+n +tQ/2rBBiPtD6Bj2RcuXupr6MiGavF5U5vzLUkYm49Oq2Wi5gIuBF8+6ipjnzrVl4 +HqGUlFEt8RK3W4I/ZWTJBlwxaIWoAIfkE54FtSqN4dY+LoNllMKbzjFBemXfZXHA +FEH9cjNh5EvFKm53ff8X+WNgodiVaH+qv2VMZZngEtmj2Y94v5x5z+Q3vcoGH6FU +dLjefYm5uwEhhBsTyz8gyBmoj8cBBnw3DZexyOPLGDj/3FSimww0HXf8RIR7Msc5 +GGMLXqSZ4WVZM59pFsqjmqfgl+C8WYWMLAt7sXJGuyl2LQoAtR5gpkPZqA0wQiIX +e7/RgIs6TpqdS4uLh52KzW7VUXqywr+qH53RFujkS0KijW96LbblENk54Kk= +=rtCH +-----END PGP PUBLIC KEY BLOCK----- diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index f0810dd6..847a23b8 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -32,6 +32,7 @@ + @@ -94,6 +95,7 @@ + @@ -216,6 +218,14 @@ + + + + + + + + @@ -412,6 +422,9 @@ + + + @@ -468,6 +481,9 @@ + + + @@ -516,6 +532,9 @@ + + + @@ -4545,6 +4564,14 @@ + + + + + + + + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832..943f0cbf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661e..50832291 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index a69d9cb6..65dcd68d 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# 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/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# 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"' @@ -143,12 +143,16 @@ fi 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 diff --git a/gradlew.bat b/gradlew.bat index 53a6b238..6689b85b 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,6 +26,7 @@ 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% diff --git a/rd-cli-tool/build.gradle b/rd-cli-tool/build.gradle index ba144671..2ed48321 100644 --- a/rd-cli-tool/build.gradle +++ b/rd-cli-tool/build.gradle @@ -105,13 +105,8 @@ set -e RD_CONF=${RD_CONF:-$HOME/.$APP_NAME/$APP_NAME.conf} test -f $RD_CONF && . $RD_CONF export RD_EXT_DIR=${RD_EXT_DIR:-$HOME/.$APP_NAME/extv2} -''' - ) - def setJ11AddOpens=appendConfigData.curry( - '^APP_ARGS=.*$', - ''' -if $JAVACMD --add-opens 2>&1 | grep 'requires modules' >/dev/null; then - JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED" +if [ ! -z "$(java --add-opens 2>&1 | grep 'requires modules')" ]; then + export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED" fi ''' ) @@ -126,7 +121,6 @@ fi .readLines() .collect(setE) .collect(setClasspath) - .collect(setJ11AddOpens) .join('\n') } diff --git a/rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java b/rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java index ede396d0..8011c03c 100644 --- a/rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java +++ b/rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java @@ -285,7 +285,7 @@ private static void configYamlFormat(final RdBuilder belt, final RdClientConfig DumperOptions.FlowStyle.FLOW ); dumperOptions.setPrettyFlow(config.getBool("RD_YAML_PRETTY", true)); - Representer representer = new Representer(); + Representer representer = new Representer(dumperOptions); representer.addClassTag(JobItem.class, Tag.MAP); representer.addClassTag(ScheduledJobItem.class, Tag.MAP); representer.addClassTag(DateInfo.class, Tag.MAP); diff --git a/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/Configure.java b/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/Configure.java index bdf86954..8162c572 100644 --- a/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/Configure.java +++ b/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/Configure.java @@ -27,6 +27,7 @@ import org.rundeck.client.tool.options.ProjectNameOptions; import org.rundeck.client.tool.options.ProjectRequiredNameOptions; import org.rundeck.client.tool.options.UnparsedConfigOptions; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; import picocli.CommandLine; @@ -157,7 +158,7 @@ public static Map loadConfig(final ConfigFileOptions opts, inputConfig.putAll(map); break; case yaml: - Yaml yaml = new Yaml(new SafeConstructor()); + Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); try (FileInputStream fis = new FileInputStream(input)) { Object load = yaml.load(fis); if (load instanceof Map) {