-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to specify env vars for use in the plan
Add input `docker_env_vars` to allow to specify which env vars should be passed to the Docker container to be used by the plan. Signed-off-by: thc202 <[email protected]>
- Loading branch information
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
env: | ||
contexts: | ||
- name: "Context" | ||
urls: | ||
- TARGET_URL | ||
parameters: | ||
failOnError: true | ||
failOnWarning: true | ||
progressToStdout: true | ||
jobs: | ||
- requests: | ||
- url: TARGET_URL | ||
type: "requestor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,17 @@ A GitHub Action for running [ZAP Automation Framework](https://www.zaproxy.org/d | |
|
||
**Optional** if specified must not be empty. The name of the [ZAP Docker image](https://www.zaproxy.org/docs/docker/about/#install-instructions) to be used. By default the action runs the stable image. | ||
|
||
### `docker_env_vars` | ||
|
||
**Optional** The names of the environment variables that should be passed to the Docker container for use in the plan, e.g.: | ||
```yaml | ||
docker_env_vars: | | ||
MY_TARGET_URL | ||
MY_USER_NAME | ||
MY_USER_PASSWORD | ||
``` | ||
See also [Environment variables](#environment-variables). | ||
### `cmd_options` | ||
|
||
**Optional** Additional [command line options](https://www.zaproxy.org/docs/desktop/cmdline/) for ZAP. | ||
|
@@ -26,15 +37,15 @@ Files created with the plan that need to be used after the plan has finished sho | |
## Environment variables | ||
|
||
If set, the following [ZAP authentication environment variables](https://www.zaproxy.org/docs/authentication/handling-auth-yourself/#authentication-env-vars) | ||
will be copied into the docker container: | ||
will be copied into the Docker container: | ||
|
||
- `ZAP_AUTH_HEADER_VALUE` | ||
- `ZAP_AUTH_HEADER` | ||
- `ZAP_AUTH_HEADER_SITE` | ||
|
||
## Example usage | ||
|
||
``` | ||
```yaml | ||
steps: | ||
- name: ZAP Scan | ||
uses: zaproxy/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters