File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ All notable changes to this GitHub action will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
66
7- ## [ Unreleased]
7+ ## [ 0.1.1] - 2022-05-23
8+
9+ ### Fixed
10+ - Use default zap user rather than root.
811
912## [ 0.1.0] - 2021-09-14
1013
1114First release to Marketplace.
1215
13- [ Unreleased ] : https://github.com/zaproxy/action-api-scan/compare/v0.1.0...HEAD
16+ [ 0.1.1 ] : https://github.com/zaproxy/action-api-scan/compare/v0.1.0...v0.1.1
1417[ 0.1.0 ] : https://github.com/zaproxy/action-api-scan/compare/12a34c296c603f7505336a7fc750363fa978d93e...v0.1.0
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ if it identifies any alerts. Set this option to `true` if you want to fail the s
6464```
6565steps:
6666 - name: ZAP Scan
67- 67+ 6868 with:
6969 target: 'https://www.zaproxy.org/'
7070```
8585 ref: master
8686
8787 - name: ZAP Scan
88- 88+ 8989 with:
9090 token: ${{ secrets.GITHUB_TOKEN }}
9191 docker_name: 'owasp/zap2docker-stable'
Original file line number Diff line number Diff line change @@ -3827,8 +3827,12 @@ async function run() {
38273827 plugins = await common.helper.processLineByLine(`${workspace}/${rulesFileLocation}`);
38283828 }
38293829
3830+ // Create the files so we can change the perms and allow the docker non root user to update them
3831+ await exec.exec(`touch ${jsonReportName} ${mdReportName} ${htmlReportName}`);
3832+ await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
3833+
38303834 await exec.exec(`docker pull ${docker_name} -q`);
3831- let command = (`docker run --user root - v ${workspace}:/zap/wrk/:rw --network="host" ` +
3835+ let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" ` +
38323836 `-t ${docker_name} zap-api-scan.py -t ${target} -f ${format} -J ${jsonReportName} -w ${mdReportName} -r ${htmlReportName} ${cmdOptions}`);
38333837
38343838 if (plugins.length !== 0) {
Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ async function run() {
4040 plugins = await common . helper . processLineByLine ( `${ workspace } /${ rulesFileLocation } ` ) ;
4141 }
4242
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+
4347 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" ` +
4549 `-t ${ docker_name } zap-api-scan.py -t ${ target } -f ${ format } -J ${ jsonReportName } -w ${ mdReportName } -r ${ htmlReportName } ${ cmdOptions } ` ) ;
4650
4751 if ( plugins . length !== 0 ) {
You can’t perform that action at this time.
0 commit comments