Skip to content

Commit f00f834

Browse files
authored
Merge pull request #124 from thc202/write-all-dir
2 parents f40b787 + 809942e commit f00f834

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
### Changed
88
- Update dependencies.
99

10+
### Fixed
11+
- Allow to write any file from the Docker container. [#118](https://github.com/zaproxy/action-baseline/issues/118)
12+
1013
## [0.12.0] - 2024-04-02
1114
### Changed
1215
- Update dependencies.

dist/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59637,9 +59637,8 @@ async function run() {
5963759637
plugins = await common.helper.processLineByLine(`${workspace}/${rulesFileLocation}`);
5963859638
}
5963959639

59640-
// Create the files so we can change the perms and allow the docker non root user to update them
59641-
await exec.exec(`touch ${jsonReportName} ${mdReportName} ${htmlReportName}`);
59642-
await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
59640+
// Allow writing files from the Docker container.
59641+
await exec.exec(`chmod a+w ${workspace}`);
5964359642

5964459643
await exec.exec(`docker pull ${docker_name} -q`);
5964559644
let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" -e ZAP_AUTH_HEADER -e ZAP_AUTH_HEADER_VALUE -e ZAP_AUTH_HEADER_SITE ` +

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ async function run() {
4646
plugins = await common.helper.processLineByLine(`${workspace}/${rulesFileLocation}`);
4747
}
4848

49-
// Create the files so we can change the perms and allow the docker non root user to update them
50-
await exec.exec(`touch ${jsonReportName} ${mdReportName} ${htmlReportName}`);
51-
await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
49+
// Allow writing files from the Docker container.
50+
await exec.exec(`chmod a+w ${workspace}`);
5251

5352
await exec.exec(`docker pull ${docker_name} -q`);
5453
let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" -e ZAP_AUTH_HEADER -e ZAP_AUTH_HEADER_VALUE -e ZAP_AUTH_HEADER_SITE ` +

0 commit comments

Comments
 (0)