This repository was archived by the owner on Dec 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ handle_jar()
124124
125125log4j ()
126126{
127- echo " Script version: 2.2 (scans jar/war/ear/zip files)" ;
127+ echo " Script version: 2.3 (scans jar/war/ear/zip files)" ;
128128 echo " Scanning started.." > /usr/local/qualys/cloud-agent/log4j_findings.stderr ;
129129 date >> /usr/local/qualys/cloud-agent/log4j_findings.stderr ;
130130 id=` id` ;
180180if [ ! -f " /usr/local/qualys/cloud-agent/log4j_findings_disabled" ]; then
181181 log4j > /usr/local/qualys/cloud-agent/log4j_findings.stdout 2> /usr/local/qualys/cloud-agent/log4j_findings.stderr;
182182else
183- rm -rf /usr/local/qualys/cloud-agent/log4j_findings.stdout;
184- echo " Flag is disabled, skipping command execution" > /usr/local/qualys/cloud-agent/log4j_findings.stderr;
183+ prevFlag=` grep " Flag is disabled, skipping command execution" /usr/local/qualys/cloud-agent/log4j_findings.stderr 2> /dev/null`
184+ if [ -z " $prevFlag " ]; then
185+ echo " Checking log4j flag.." >> /usr/local/qualys/cloud-agent/log4j_findings.stderr ;
186+ date >> /usr/local/qualys/cloud-agent/log4j_findings.stderr ;
187+ echo " Flag is disabled, skipping command execution" >> /usr/local/qualys/cloud-agent/log4j_findings.stderr;
188+ fi ;
185189fi ;
186190
You can’t perform that action at this time.
0 commit comments