File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7
7
### Changed
8
8
- Update dependencies.
9
9
10
+ ### Fixed
11
+ - Use default zap user rather than root to allow the Ajax Spider to run.
12
+
10
13
## [ 0.6.1] - 2021-10-08
11
14
### Changed
12
15
- Revert previous change (not into effect), no longer needed.
Original file line number Diff line number Diff line change @@ -3859,8 +3859,12 @@ async function run() {
3859
3859
plugins = await common.helper.processLineByLine(`${workspace}/${rulesFileLocation}`);
3860
3860
}
3861
3861
3862
+ // Create the files so we can change the perms and allow the docker non root user to update them
3863
+ await exec.exec(`touch ${jsonReportName} ${mdReportName} ${htmlReportName}`);
3864
+ await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
3865
+
3862
3866
await exec.exec(`docker pull ${docker_name} -q`);
3863
- let command = (`docker run --user root - v ${workspace}:/zap/wrk/:rw --network="host" ` +
3867
+ let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" ` +
3864
3868
`-t ${docker_name} zap-baseline.py -t ${target} -J ${jsonReportName} -w ${mdReportName} -r ${htmlReportName} ${cmdOptions}`);
3865
3869
3866
3870
if (plugins.length !== 0) {
Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ async function run() {
40
40
plugins = await common . helper . processLineByLine ( `${ workspace } /${ rulesFileLocation } ` ) ;
41
41
}
42
42
43
+ // Create the files so we can change the perms and allow the docker non root user to update them
44
+ await exec . exec ( `touch ${ jsonReportName } ${ mdReportName } ${ htmlReportName } ` ) ;
45
+ await exec . exec ( `chmod a+w ${ jsonReportName } ${ mdReportName } ${ htmlReportName } ` ) ;
46
+
43
47
await exec . exec ( `docker pull ${ docker_name } -q` ) ;
44
- let command = ( `docker run --user root - v ${ workspace } :/zap/wrk/:rw --network="host" ` +
48
+ let command = ( `docker run -v ${ workspace } :/zap/wrk/:rw --network="host" ` +
45
49
`-t ${ docker_name } zap-baseline.py -t ${ target } -J ${ jsonReportName } -w ${ mdReportName } -r ${ htmlReportName } ${ cmdOptions } ` ) ;
46
50
47
51
if ( plugins . length !== 0 ) {
You can’t perform that action at this time.
0 commit comments