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
Docker secrets are used to securely store secrets needed during runtime.
@@ -245,25 +239,25 @@ The following runtime environment variables are required to configure the system
245
239
246
240
|Variable|Default|Description|
247
241
|-|-|-|
248
-
|`CXONE_REGION`|N/A|Required for use with multi-tenant Checkmarx One tenants. The endpoint region used by your Checkmarx One tenant. This can be one of the following values: `US`, `US2`, `EU`, `EU2`, `DEU`, `ANZ`, `India`, `Singapore`, or `UAE`. If this is not supplied, the `SINGLE_TENANT_` variables must be defined.|
242
+
|`CXONE_REGION`|N/A|Required for use with multi-tenant Checkmarx One tenants. The endpoint region used by your Checkmarx One tenant. This can be one of the following values: `US`, `US2`, `EU`, `EU2`, `DEU`, `ANZ`, `India`, `Singapore`, or `UAE`. If this is not supplied, the `SINGLE_TENANT_` variables must be defined.|
249
243
|`SINGLE_TENANT_AUTH`|N/A|The name of the single-tenant IAM endpoint host. (e.g. `myhost.cxone.cloud`)|
250
244
|`SINGLE_TENANT_API`|N/A|The name of the single-tenant API endpoint host. (e.g. `myhost.cxone.cloud`)|
251
245
|`DEFAULT_SCHEDULE`|N/A|This defines the default schedule policy to apply to projects that do not have `schedule` tags. If not provided, projects that do not meet scheduling criteria via tags or group schedules will not be scanned with the scheduler. The value of this environment variable must be a valid `<schedule>` policy name. The branch and engine configurations are not defined as part of the default schedule.|
252
-
|`GROUP_x`|N/A|`GROUP_` is considered a prefix with the remainder of the environment variable name being a key value. The key value is used to match `SCHEDULE_x` variables having the same key value. The value for this environment variable is a group path in the form of `/value/value/...` matching a group defined in Checkmarx One. This environment variable can be defined to apply a schedule to projects assigned to the defined group without the need to assign a `schedule` tag to the project.
246
+
|`GROUP_x`|N/A|`GROUP_` is considered a prefix with the remainder of the environment variable name being a key value. The key value is used to match `SCHEDULE_x` variables having the same key value. The value for this environment variable is a group path in the form of `/value/value/...` matching a group defined in Checkmarx One. This environment variable can be defined to apply a schedule to projects assigned to the defined group without the need to assign a `schedule` tag to the project.|
253
247
|`SCHEDULE_x`|N/A|`SCHEDULE_` is considered a prefix with the remainder of the environment variable name being a key value. The key value is used to match `GROUP_x` environment variables having the same key value. The value of this environment variable must be a valid `<schedule>` policy name.|
254
248
|`LOG_LEVEL`|INFO|The logging level to control how much logging is emitted. Set to `DEBUG` for more verbose logging output.|
255
-
|`SSL_VERIFY`|`True`|Set to `False` to turn off SSL certificate validation.|
256
-
|`PROXY`|N/A|Set to the URL for an unauthenticated proxy. All http/s traffic will route through the specified proxy.|
257
-
|`UPDATE_DELAY_SECONDS`|43200| The number of seconds to delay between checking for updates in the schedule.|
258
-
|`POLICY_<name>`|N/A|Define a custom policy with `<name>`. See [Policy Definitions](#policy-definitions) for a description. This must be a valid [crontab](https://crontab.guru/) string.|
259
-
|`TIMEZONE`|Etc/UTC|The [zoneinfo](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) string for the timezone. If the zoneinfo string is invalid or not set, the timezone will default to UTC.|
260
-
|`THREADS`| 2 | Set to an integer value > 0 to increase the number of threads used when starting scans. This also sets the max concurrent SCM clones executed if using `FETCH_THROTTLE`.
261
-
|`FETCH_THROTTLE`|False | Set to `True` to wait for the source code clone to complete before submitting another scan.
262
-
|`FETCH_WAIT_SECONDS`|300| The maximum number of seconds to wait for the source code clone to complete before abandoning the wait. This allows other scan submission activity to continue in cases where the repository clone takes an excessively long time.
263
-
|`RECENT_SCAN_HOURS`| 0 | This is used to set a policy of not performing a scheduled scan if a successful scan has been executed with the past hours indicated by this value. It is recommended that this value be less than your schedule cadence (e.g. if you scan every 24 hours, this should be a maximum of 23 hours). The check does not inspect the scan configuration, only that the scan has successfully completed. The value of 0 (default) disables this check.
264
-
|`API_TIMEOUT` | 60 | Set to the number of seconds to wait for the Checkmarx One API to respond to requests before failure.
265
-
|`API_RETRIES`| 3 | The number of times communicating with the Checkmarx One API will retry upon failure.
266
-
|`API_RETRY_DELAY`| 15 | The maximum number of seconds to wait before retrying a failure Checkmarx One API request.
249
+
|`SSL_VERIFY`|`True`|Set to `False` to turn off SSL certificate validation.|
250
+
|`PROXY`|N/A|Set to the URL for an unauthenticated proxy. All http/s traffic will route through the specified proxy.|
251
+
|`UPDATE_DELAY_SECONDS`|43200| The number of seconds to delay between checking for updates in the schedule.|
252
+
|`POLICY_<name>`|N/A|Define a custom policy with `<name>`. See [Policy Definitions](#policy-definitions) for a description. This must be a valid [crontab](https://crontab.guru/) string.|
253
+
|`TIMEZONE`|Etc/UTC|The [zoneinfo](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) string for the timezone. If the zoneinfo string is invalid or not set, the timezone will default to UTC.|
254
+
|`THREADS`|2|Set to an integer value > 0 to increase the number of threads used when starting scans. This also sets the max concurrent SCM clones executed if using `FETCH_THROTTLE`.|
255
+
|`FETCH_THROTTLE`|False|Set to `True` to wait for the source code clone to complete before submitting another scan.|
256
+
|`FETCH_WAIT_SECONDS`|300| The maximum number of seconds to wait for the source code clone to complete before abandoning the wait. This allows other scan submission activity to continue in cases where the repository clone takes an excessively long time.|
257
+
|`RECENT_SCAN_HOURS`|0|This is used to set a policy of not performing a scheduled scan if a successful scan has been executed with the past hours indicated by this value. It is recommended that this value be less than your schedule cadence (e.g. if you scan every 24 hours, this should be a maximum of 23 hours). The check does not inspect the scan configuration, only that the scan has successfully completed. The value of 0 (default) disables this check.|
258
+
|`API_TIMEOUT`|60|Set to the number of seconds to wait for the Checkmarx One API to respond to requests before failure.|
259
+
|`API_RETRIES`|3|The number of times communicating with the Checkmarx One API will retry upon failure.|
260
+
|`API_RETRY_DELAY`|15|The maximum number of seconds to wait before retrying a failure Checkmarx One API request.|
267
261
268
262
### Policy Definitions
269
263
@@ -280,25 +274,26 @@ The value assigned to the environment variable is a valid
280
274
#### Examples of Policy Definitions
281
275
282
276
Policy definition named `mypolicy` that scans at midnight on weekdays. It can be referenced with the tag `schedule:mypolicy`.
283
-
```
277
+
278
+
```text
284
279
POLICY_MYPOLICY=0 0 * * 1-5
285
280
```
286
281
287
282
Policy definition named `general-audit-policy` that scans every 30 minutes on weekdays. It can be referenced with
288
283
the tag `schedule:general-audit-policy` or `schedule:general_audit_policy`.
289
-
```
284
+
285
+
```text
290
286
POLICY_GENERAL_AUDIT_POLICY=0,30 * * * 1-5
291
287
```
292
288
293
-
## Execution
294
-
289
+
## Execution with Docker
295
290
296
291
### Obtaining the Container Image
297
292
298
293
The container image tag is `ghcr.io/checkmarx-ts/cxone/scan-scheduler:latest`. You can reference this image tag
299
294
when running the image. If running Docker locally, for example, you can retrieve the image with this command:
@@ -312,8 +307,7 @@ Execution methods may vary, but you must consider the following for execution:
312
307
If running locally with Docker, for example, this command would run the scheduler setting the configuration environment variables
313
308
and map `$(pwd)/run/secrets` to `/run/secrets`:
314
309
315
-
316
-
```
310
+
```bash
317
311
docker run -it -v $(pwd)/run/secrets/:/run/secrets --env-file .env ghcr.io/checkmarx-ts/cxone/scan-scheduler:latest
318
312
```
319
313
@@ -329,13 +323,13 @@ There are two other runtimes that can be specified: `audit` and
329
323
The `scanner` is the tool used by `Cron` to execute scans. It has some self-explanatory command line arguments that can be retrieved with the `-h` option.
330
324
Executing `scanner` to see the help, for example, could be done using the following command line if running Docker locally:
331
325
332
-
```
326
+
```bash
333
327
docker run -it -v $(pwd)/run/secrets/:/run/secrets --env-file .env ghcr.io/checkmarx-ts/cxone/scan-scheduler:latest scanner -h
334
328
```
335
329
336
330
Which would yield an output similar to the following:
337
331
338
-
```
332
+
```shell
339
333
A program to execute scans in CheckmarxOne as a Scheduler cron job.
340
334
341
335
options:
@@ -359,28 +353,71 @@ would create the schedule for all projects.
359
353
If running Docker locally, the following command line could be used
0 commit comments