Hardcode vulnerable artifact into Vuln Cache Proc
@@ -40,7 +40,6 @@ import org.pf4j.PluginWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.swing.text.Utilities;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -242,6 +241,20 @@ public class VulnerabilityCacheProcessorPlugin extends Plugin {
try {
var artifacts = json.getJSONArray("artifacts");
+
+ if (!new File(baseDir + "/c/com.tokbox/opentok-server-sdk/4.4.1.json").exists()) {
+ var extra = "{\n" +
+ " \"id\": 525072,\n" +
+ " \"version\": \"4.4.1\",\n" +
+ " \"groupId\": \"com.tokbox\",\n" +
+ " \"artifactId\": \"opentok-server-sdk\",\n" +
+ " \"created_at\": \"2021-02-09 20:23:19.0\"\n" +
+ "}";
+ var jsonExtra = new JSONObject(extra);
+ artifacts.put(jsonExtra);
+ }
+
+
for (int i = 0; i < json.length(); i++) {
var revisionObj = artifacts.getJSONObject(i);
var id = revisionObj.optLong("id", -1);
