dependency-check / dependency-check/azuredevops

dependency-check-build-task@6 fails on windows-latest hosted agent since release of DependencyCheck 11.0.0

Open
#169 10 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
53
Forks
35
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
My pipeline was working as expected this morning, but is not failing with the error shown below, I had made YAML edits

```
C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tasks\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\6.2.3\dependency-check\bin\dependency-check.bat --version"
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/owasp/dependencycheck/App has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)
```

Looking at the [DependencyCheck project site](https://github.com/jeremylong/DependencyCheck/releases) it seems version 11.0.0 was shipped around 11am this morning, around the time the error started to appear.

It seems 11.0.0 requires a newer version of JAVA than 10.x.x required, and though the `windows-latest` hosted build agents have various version of JAVA installed, the task is defaulting to use JDK 8 (52.0)
 
**To Reproduce**
Steps to reproduce the behavior:
1. Use the task as documented in this repo

**Expected behavior**
Analysis should occur when the current V11.x.x of the underlying tool is automatically downloaded used.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.