You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SUP-4329: Refactor to use WIZ_CLIENT_ID and WIZ_CLIENT_SECRET (#29)
* feat: produce additional output file for non-human output formats
* feat: update parameters and format
* docs: update README to reflect parameter changes
* feat: reflect paramter changes in hook
* test: reflect parameter changes in tests
* fix: add set -e to ensure hook doesn't silently fail
* chore: remove version, pin images and remove Read Only
* feat/fix: add shared lib for handling reading env vars correctly for strings or arrays parameters
* Revert "fix: add set -e to ensure hook doesn't silently fail"
This reverts commit f0bc975.
* fix/test: correct Env Var used to read and add test
* fix: make shared.bash executable for shellcheck
* fix: update pipeline for shellcheck shared.bash
* chore: re-add read-only for volume mounts as read-write not required
* feat: add check for duplicate file formats
* set a default output that will be used for the Build Annotations so that can be refactored separately
* added notes for future changes required for loop to support multiple output files with the same file format per Wiz CLI docs
Signed-off-by: Tom Watt <tom@buildkite.com>
* tests: add tests for duplicate file output formats
Signed-off-by: Tom Watt <tom@buildkite.com>
* docs/chore: file-output-format is optional with no default
Signed-off-by: Tom Watt <tom@buildkite.com>
* refactor: move setupWiz to separate file to run unit-tests
* feat: pass env vars to container instead of using flags to remove for job logs
* refactor: remove api-secret-env parameter in favour of using WIZ_CLIENT_SECRET
Signed-off-by: Tom Watt <tom@buildkite.com>
* feat: add check for Wiz Client Credentials
Signed-off-by: Tom Watt <tom@buildkite.com>
* tests: reflect usage of WIZ_CLIENT_* Credentials
* refactor: add teardown to cleanup dirs/files for authentication tests
Signed-off-by: Tom Watt <tom@buildkite.com>
* docs: Update README to reflect usage of WIZ_CLIENT_* credentials
---------
Signed-off-by: Tom Watt <tom@buildkite.com>
Co-authored-by: Shimon Ulewicz <sulewicz@groq.com>
Copy file name to clipboardExpand all lines: README.md
+13-20Lines changed: 13 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,19 @@ Scans your infrastructure-as-code Cloudformation stacks or docker images for sec
6
6
7
7
This plugin is forked from [blstrco/wiz-buildkite-plugin](https://github.com/blstrco/wiz-buildkite-plugin).
8
8
9
+
## Requirements
10
+
11
+
In order to use this plugin, you will need to have the following installed on your buildkite agent:
12
+
13
+
- Docker
14
+
15
+
And the following environment variables exported in the job (e.g. via an Agent hook or Plugin):
16
+
17
+
- WIZ_CLIENT_ID (Wiz service account's client ID)
18
+
- WIZ_CLIENT_SECRET (Wiz service account's secret)
19
+
20
+
Check out [Buildkite's documentation](https://buildkite.com/docs/pipelines/security/secrets/managing) for more information on how to manage secrets in Buildkite.
21
+
9
22
## Examples
10
23
11
24
### Docker Scanning
@@ -15,8 +28,6 @@ Add the following to your `pipeline.yml`, the plugin will pull the image, scan i
15
28
```yml
16
29
steps:
17
30
- command: ls
18
-
env:
19
-
- WIZ_API_ID: "<your-id-goes-here>"
20
31
plugins:
21
32
- wiz#v1.4.0:
22
33
scan-type: 'docker'
@@ -39,8 +50,6 @@ To avoid adding build time overhead, you can add IaC scanning to your `cdk diff`
39
50
```yml
40
51
steps:
41
52
- command: ls
42
-
env:
43
-
- WIZ_API_ID: "<your-id-goes-here>"
44
53
plugins:
45
54
- docker-compose#v4.16.0:
46
55
# to get the output of CDK diff, mount the volume in cdk diff stage
@@ -59,8 +68,6 @@ Add the following to your `pipeline.yml`, the plugin will scan a specific CloudF
59
68
steps:
60
69
- label: "Scan CloudFormation template file"
61
70
command: ls
62
-
env:
63
-
- WIZ_API_ID: "<your-id-goes-here>"
64
71
plugins:
65
72
- wiz#v1.4.0:
66
73
scan-type: 'iac'
@@ -79,8 +86,6 @@ Add the following to your `pipeline.yml`, the plugin will scan a specific Terraf
79
86
steps:
80
87
- label: "Scan Terraform File"
81
88
command: ls *.tf
82
-
env:
83
-
- WIZ_API_ID: "<your-id-goes-here>"
84
89
plugins:
85
90
- wiz#v1.4.0:
86
91
scan-type: 'iac'
@@ -96,8 +101,6 @@ To change the directory, add the following to your `pipeline.yml`, the plugin wi
96
101
steps:
97
102
- label: "Scan Terraform Files in Directory"
98
103
command: ls my-terraform-dir/*.tf
99
-
env:
100
-
- WIZ_API_ID: "<your-id-goes-here>"
101
104
plugins:
102
105
- wiz#v1.4.0:
103
106
scan-type: 'iac'
@@ -113,8 +116,6 @@ Add the following to your `pipeline.yml`, the plugin will scan a Terraform Plan.
113
116
steps:
114
117
- label: "Scan Terraform Plan"
115
118
command: terraform plan -out plan.tfplan && terraform show -json plan.tfplan | jq -er . > plan.tfplanjson
116
-
env:
117
-
- WIZ_API_ID: "<your-id-goes-here>"
118
119
plugins:
119
120
- wiz#v1.4.0:
120
121
scan-type: 'iac'
@@ -130,8 +131,6 @@ Add the following to your `pipeline.yml`, the plugin will scan a directory.
130
131
steps:
131
132
- label: "Scan Directory"
132
133
command: ls .
133
-
env:
134
-
- WIZ_API_ID: "<your-id-goes-here>"
135
134
plugins:
136
135
- wiz#v1.4.0:
137
136
scan-type: 'dir'
@@ -145,8 +144,6 @@ To change the directory, add the following to your `pipeline.yml`, the plugin wi
145
144
steps:
146
145
- label: "Scan Files in different Directory"
147
146
command: ls my-dir
148
-
env:
149
-
- WIZ_API_ID: "<your-id-goes-here>"
150
147
plugins:
151
148
- wiz#v1.4.0:
152
149
scan-type: 'dir'
@@ -155,10 +152,6 @@ steps:
155
152
156
153
## Configuration
157
154
158
-
### `api-secret-env` (Optional, string)
159
-
160
-
The environment variable that the Wiz API Secret is stored in. Defaults to using `WIZ_API_SECRET`. Refer to the [documentation](https://buildkite.com/docs/pipelines/secrets#using-a-secrets-storage-service) for more information about managing secrets on your Buildkite agents.
0 commit comments