Skip to content

Commit 1e1871e

Browse files
authored
Merge pull request #112 from thc202/auth-env-vars
2 parents 32502a8 + 22e8c71 commit 1e1871e

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ All notable changes to this GitHub action will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6-
## [Unreleased]
6+
## [0.10.0] - 2023-10-31
7+
### Added
8+
- Support for authentication environment variables.
9+
710
### Fixed
811
- Update Crowdin link.
912

@@ -75,7 +78,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7578

7679
First release to Marketplace.
7780

78-
[Unreleased]: https://github.com/zaproxy/action-baseline/compare/v0.9.0...HEAD
81+
[0.10.0]: https://github.com/zaproxy/action-baseline/compare/v0.9.0...v0.10.0
7982
[0.9.0]: https://github.com/zaproxy/action-baseline/compare/v0.8.2...v0.9.0
8083
[0.8.2]: https://github.com/zaproxy/action-baseline/compare/v0.8.1...v0.8.2
8184
[0.8.1]: https://github.com/zaproxy/action-baseline/compare/v0.8.0...v0.8.1

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,22 @@ if it identifies any alerts. Set this option to `true` if you want to fail the s
5656

5757
**Optional** By default the baseline action will attach the report to the build with the name `zap_scan`. Set this to a different string to name it something else. Consult [GitHub's documentation](https://github.com/actions/toolkit/blob/main/packages/artifact/docs/additional-information.md#non-supported-characters) for which artifact names are allowed.
5858

59+
## Environment variables
60+
61+
If set, the following [ZAP authentication environment variables](https://www.zaproxy.org/docs/authentication/handling-auth-yourself/#authentication-env-vars)
62+
will be copied into the docker container:
63+
64+
- `ZAP_AUTH_HEADER_VALUE`
65+
- `ZAP_AUTH_HEADER`
66+
- `ZAP_AUTH_HEADER_SITE`
67+
5968
## Example usage
6069

6170
** Basic **
6271
```
6372
steps:
6473
- name: ZAP Scan
65-
uses: zaproxy/action-baseline@v0.9.0
74+
uses: zaproxy/action-baseline@v0.10.0
6675
with:
6776
target: 'https://www.zaproxy.org'
6877
```
@@ -82,7 +91,7 @@ jobs:
8291
with:
8392
ref: master
8493
- name: ZAP Scan
85-
uses: zaproxy/action-baseline@v0.9.0
94+
uses: zaproxy/action-baseline@v0.10.0
8695
with:
8796
token: ${{ secrets.GITHUB_TOKEN }}
8897
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38370,7 +38370,7 @@ async function run() {
3837038370
await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
3837138371

3837238372
await exec.exec(`docker pull ${docker_name} -q`);
38373-
let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" ` +
38373+
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 ` +
3837438374
`-t ${docker_name} zap-baseline.py -t ${target} -J ${jsonReportName} -w ${mdReportName} -r ${htmlReportName} ${cmdOptions}`);
3837538375

3837638376
if (plugins.length !== 0) {

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async function run() {
5151
await exec.exec(`chmod a+w ${jsonReportName} ${mdReportName} ${htmlReportName}`);
5252

5353
await exec.exec(`docker pull ${docker_name} -q`);
54-
let command = (`docker run -v ${workspace}:/zap/wrk/:rw --network="host" ` +
54+
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 ` +
5555
`-t ${docker_name} zap-baseline.py -t ${target} -J ${jsonReportName} -w ${mdReportName} -r ${htmlReportName} ${cmdOptions}`);
5656

5757
if (plugins.length !== 0) {

0 commit comments

Comments
 (0)