From a5c2503f75f32e645f54d511c8b100981e818c05 Mon Sep 17 00:00:00 2001 From: Ziv Riechman Date: Tue, 5 Mar 2024 10:58:45 +0200 Subject: [PATCH 1/2] Update log file location --- pom.xml | 2 +- tools/HCL/runBenchmark_wHCL.bat | 16 ++++++++-------- tools/HCL/runBenchmark_wHCL.sh | 10 ++-------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 9a05e3a784..9a6071ae22 100755 --- a/pom.xml +++ b/pom.xml @@ -584,7 +584,7 @@ -Xmx8G -javaagent:${basedir}/tools/HCL/secagent.jar=agent_path=${basedir}/tools/HCL/secagent.jar - -Dsecagent.log=${basedir}/tools/HCL/HCL-IAST.hcl + -Dsecagent.log=${basedir}/results/HCL-IAST.hcl 8443 https diff --git a/tools/HCL/runBenchmark_wHCL.bat b/tools/HCL/runBenchmark_wHCL.bat index 9b96579a86..9d27e96aec 100644 --- a/tools/HCL/runBenchmark_wHCL.bat +++ b/tools/HCL/runBenchmark_wHCL.bat @@ -1,8 +1,8 @@ @ECHO OFF IF EXIST .\secagent.jar ( - IF EXIST .\HCL-IAST.hcl ( + IF EXIST ..\..\results\HCL-IAST.hcl ( - DEL .\HCL-IAST.hcl + DEL ..\..\results\HCL-IAST.hcl ECHO. ECHO Previous results have been removed @@ -11,17 +11,17 @@ IF EXIST .\secagent.jar ( CD ..\.. - ECHO After Crawl is Complete, hit Ctrl-C to stop Benchmark Tomcat instance. - ECHO When it asks "Terminate batch job (Y/N)?" Enter N, so script will complete and copy results to /results directory. - ECHO. + @REM ECHO After Crawl is Complete, hit Ctrl-C to stop Benchmark Tomcat instance. + @REM ECHO When it asks "Terminate batch job (Y/N)?" Enter N, so script will complete and copy results to /results directory. + @REM ECHO. CALL mvn clean package cargo:run -Pdeploywhcl -Drunenv=remote - ECHO Copying HCL reports to results directory + @REM ECHO Copying HCL reports to results directory - COPY tools\HCL\HCL-IAST.hcl results\Benchmark_HCL-IAST.hcl + @REM COPY tools\HCL\HCL-IAST.hcl results\Benchmark_HCL-IAST.hcl - CD tools\HCL + @REM CD tools\HCL ) ELSE ( ECHO HCL is a commercial product, so you need a licensed version of HCL in order to run it on the Benchmark. If you have access to HCL, download the HCL Agent for Java ^(secagent.jar^), put it into the /tools/HCL folder, and then rerun this script. Please contact HCL at https://www.hcl.com/. diff --git a/tools/HCL/runBenchmark_wHCL.sh b/tools/HCL/runBenchmark_wHCL.sh index 5be2233b71..5c85d8f4ce 100755 --- a/tools/HCL/runBenchmark_wHCL.sh +++ b/tools/HCL/runBenchmark_wHCL.sh @@ -2,9 +2,9 @@ if [ -f ./secagent.jar ]; then - if [ -d ./HCL-IAST.hcl ]; then + if [ -d ../../results/HCL-IAST.hcl ]; then - rm ./HCL-IAST.hcl + rm ../../results/HCL-IAST.hcl echo "" echo "Previous results have been removed" echo "" @@ -14,12 +14,6 @@ if [ -f ./secagent.jar ]; then cd ../.. mvn clean package cargo:run -Pdeploywhcl -Drunenv=remote - echo "Copying report to results directory" - benchmark_version=$(scripts/getBenchmarkVersion.sh) - result_file="results/Benchmark_$benchmark_version-HCL-IAST.hcl" - cp tools/HCL/HCL-IAST.hcl "$result_file" - cd tools/HCL - else echo "secagent.jar is required to run the Benchmark with HCL IAST. Please contact HCL at https://www.hcl.com/." From 1c78656e732959afa1a061374abf0f915b724ba7 Mon Sep 17 00:00:00 2001 From: Ziv Riechman Date: Wed, 6 Mar 2024 09:21:38 +0200 Subject: [PATCH 2/2] Update runBenchmark_wHCL.bat --- tools/HCL/runBenchmark_wHCL.bat | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/HCL/runBenchmark_wHCL.bat b/tools/HCL/runBenchmark_wHCL.bat index 9d27e96aec..5204861c60 100644 --- a/tools/HCL/runBenchmark_wHCL.bat +++ b/tools/HCL/runBenchmark_wHCL.bat @@ -11,18 +11,8 @@ IF EXIST .\secagent.jar ( CD ..\.. - @REM ECHO After Crawl is Complete, hit Ctrl-C to stop Benchmark Tomcat instance. - @REM ECHO When it asks "Terminate batch job (Y/N)?" Enter N, so script will complete and copy results to /results directory. - @REM ECHO. - CALL mvn clean package cargo:run -Pdeploywhcl -Drunenv=remote - @REM ECHO Copying HCL reports to results directory - - @REM COPY tools\HCL\HCL-IAST.hcl results\Benchmark_HCL-IAST.hcl - - @REM CD tools\HCL - ) ELSE ( ECHO HCL is a commercial product, so you need a licensed version of HCL in order to run it on the Benchmark. If you have access to HCL, download the HCL Agent for Java ^(secagent.jar^), put it into the /tools/HCL folder, and then rerun this script. Please contact HCL at https://www.hcl.com/. )