77
88
99"""
10- jar_updater.py updates json-smart, neo4j-java-driver, xalan to address CVEs on the taurus image. this is not DLT application code.
10+ jar_updater.py updates following jar files to address CVEs on the taurus image. this is not DLT application code.
1111the script may be removed once taurus updates the libraries on the image.
1212Affected Jmeter jars:
13- * json-smart v2.4.8 will be replaced with v2.4.9
13+ * json-smart v2.4.8 will be replaced with v2.4.10
1414 * neo4j-java-driver v4.12.0 will be replaced with v5.14.0
15- * xalan v2.7.2 will be replaced with v2.7.3
15+ * batik-script v1.14 will be replaced with v1.17
16+ * batik-bridge v1.14 will be replaced with v1.17
17+ * batik-transcoder v1.14 will be replaced with v1.17
18+ * lets-plot-batik v2.2.1 will be replaced with 4.2.0
19+
20+ Also jmeter plugins manager will be updated to v1.10 to address CVEs and cmdrunner will be updated to v2.3 to accomodate with plugins manager.
1621"""
1722
1823# these jars should be replaced with newer version in order to fix some vulnerabilities
1924# component name and download link in https://repo1.maven.org/maven2/
2025# These are Components with regards to JMETER
2126JMETER_COMPONENTS = {
22- "json-smart" : "net/minidev/json-smart/2.4.9 /json-smart-2.4.9 .jar" ,
27+ "json-smart" : "net/minidev/json-smart/2.4.10 /json-smart-2.4.10 .jar" ,
2328 "neo4j-java-driver" : "org/neo4j/driver/neo4j-java-driver/5.14.0/neo4j-java-driver-5.14.0.jar" ,
24- "xalan" : "xalan/xalan/2.7.3/xalan-2.7.3.jar" ,
29+ "batik-script" : "org/apache/xmlgraphics/batik-script/1.17/batik-script-1.17.jar" ,
30+ "batik-bridge" : "org/apache/xmlgraphics/batik-bridge/1.17/batik-bridge-1.17.jar" ,
31+ "batik-transcoder" : "org/apache/xmlgraphics/batik-transcoder/1.17/batik-transcoder-1.17.jar" ,
32+ "lets-plot-batik" : "org/jetbrains/lets-plot/lets-plot-batik/4.2.0/lets-plot-batik-4.2.0.jar"
2533}
26- JMETER_VERSION = "5.4.3"
27-
34+ JMETER_VERSION = "5.5"
35+ JMETER_PLUGINS_MANAGER_VERSION = "1.10"
36+ CMD_RUNNER_VERSION = "2.3"
2837# To add other platform, and what to update, add affected components and version HERE
2938
3039def download (url , target_path ):
@@ -45,11 +54,14 @@ def __init__(self, platform, version, affected_components=None):
4554 self .affected_components = affected_components
4655
4756 def install_jmeter_plugins (self ):
48- plugins_mgr_version = "1.10"
49- plugins_mgr_link = f'https://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/ { plugins_mgr_version } /jmeter-plugins-manager- { plugins_mgr_version } .jar'
57+ plugins_mgr_link = f'https://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/ { JMETER_PLUGINS_MANAGER_VERSION } /jmeter-plugins-manager- { JMETER_PLUGINS_MANAGER_VERSION } .jar'
58+ command_runner_link = f'https://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/ { CMD_RUNNER_VERSION } /cmdrunner- { CMD_RUNNER_VERSION } .jar'
5059 plugins_mgr_name = os .path .basename (plugins_mgr_link )
60+ command_runner_name = os .path .basename (command_runner_link )
5161 pm_installer_path = os .path .join (self .lib_dir , 'ext' , plugins_mgr_name )
62+ command_runner_path = os .path .join (self .lib_dir , command_runner_name )
5263 download (plugins_mgr_link , pm_installer_path )
64+ download (command_runner_link , command_runner_path )
5365 self .obj ._JMeter__install_plugins_manager (pm_installer_path )
5466 cleaner = JarCleaner (self .obj .log )
5567 cleaner .clean (os .path .join (self .lib_dir , 'ext' ))
0 commit comments