Hi thc202,
I'm not sure how to check if it is executed with the same user or the home directory.
Attached is the job log from the runner when the ZAP scan is run via pipeline.
The bold sentence is the command used to execute the ZAP scan.
$ cd "C:\Program Files\OWASP\Zed Attack Proxy\"
$ .\zap.bat -cmd -config network.connection.timeoutInSecs=180 -config rules.domxss.browserid=chrome-headless -autorun File.yaml -session "C:\\Users\\Local User\\OWASP ZAP\\sessions\\path\\to\\session"
C:\Program Files\OWASP\Zed Attack Proxy>if exist "C:\WINDOWS\system32\config\systemprofile\OWASP ZAP\.ZAP_JVM.properties" (set /p jvmopts= 0<"C:\WINDOWS\system32\config\systemprofile\OWASP ZAP\.ZAP_JVM.properties" ) else (set jvmopts=-Xmx512m )
C:\Program Files\OWASP\Zed Attack Proxy>java -Xmx512m -jar zap-2.13.0.jar -cmd -config network.connection.timeoutInSecs=180 -config rules.domxss.browserid=chrome-headless -autorun File.yaml -session "C:\\Users\\Local User\\OWASP ZAP\\path\\to\\session"
Job authentication set method = form
Job authentication set parameters = {ommited}
Job verification set method = response
Job verification set loggedInRegex = body_onload();submitInitForm('1');UserLogin('','1');
Job verification set loggedOutRegex = <a href="JavaScript:Navigate('Login')"> <span id=>Click Here to Login</span></a>
Job verification set pollFrequency = 60
Job verification set pollUnits = requests
Job verification set pollUrl =
Job verification set pollPostData =
Job sessionManagement set method = cookie
Job sessionManagement set parameters = {}
Job users set name = ADMIN
Job users set credentials = {password=, username=}
Job import set type = url
Job import set fileName = C:\Program Files\OWASP\Zed Attack Proxy\URL_List.txt
Job activeScan set context = File
Job activeScan set user = USER
Job activeScan set policy =
Job activeScan set maxRuleDurationInMins = 0
Job activeScan set maxScanDurationInMins = 0
Job activeScan set addQueryParam = true
Job activeScan set delayInMs = 0
Job activeScan set handleAntiCSRFTokens = true
Job activeScan set injectPluginIdInHeader = false
Job activeScan set scanHeadersAllRequests = true
Job activeScan set threadPerHost = 16
Job activeScan set defaultStrength = high
Job activeScan set defaultThreshold = medium
Job report set template = traditional-pdf
Job report set reportDir = C:\GitLab-Runner\builds\3qC2hysoG\
Job report set reportFile = ZAP_REPORT
Job report set reportTitle = ZAP Scanning Report
Job report set reportDescription =
Job report set displayReport = false
Job import started
Job import finished, time taken: 00:00:00
Job activeScan started
Job activeScan set default strength to HIGH
Job activeScan set default threshold to MEDIUM