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
Add support for custom base registry in Checkmarx AST GitHub Action
- Introduced new input parameters: `base_registry`, `base_registry_username`, and `base_registry_password` for authenticating with a custom container registry.
- Updated action logic to build and run the Docker image from a specified base registry if provided, defaulting to Docker Hub otherwise.
- Enhanced documentation in README.md to include configuration details for using a custom base registry.
- Added a new workflow to test the custom registry feature, ensuring proper functionality and integration.
- Updated Dockerfile to support the new base registry argument.
- You have a Checkmarx One account and you have an OAuth **Client ID** and **Client Secret** for that account. To create an OAuth client, see [Creating an OAuth Client for Checkmarx One Integrations](https://checkmarx.com/resource/documents/en/34965-118315-authentication-for-checkmarx-one-cli.html#UUID-a4e31a96-1f36-6293-e95a-97b4b9189060_UUID-4123a2ff-32d0-2287-8dd2-3c36947f675e).
100
100
101
+
## Custom Base Registry
102
+
103
+
For environments with restricted access to public Docker registries (e.g., Docker Hub), you can configure the action to pull the `checkmarx/ast-cli` base image from an internal/enterprise registry.
104
+
105
+
### Configuration
106
+
107
+
Use the following input parameters:
108
+
109
+
| Parameter | Required | Description |
110
+
|-----------|----------|-------------|
111
+
|`base_registry`| No | Base container registry URL (e.g., `my-registry.example.com`). If not provided, defaults to Docker Hub. |
112
+
|`base_registry_username`| No | Username for authenticating with the base container registry. |
113
+
|`base_registry_password`| No | Password/token for authenticating with the base container registry. |
description: 'Simplify Checkmarx Scanning of source code along with Result consumption leveraging Checkmarx AST solution.'
3
3
author: 'Checkmarx'
4
4
inputs:
5
+
base_registry:
6
+
required: false
7
+
default: ''
8
+
description: 'Base container registry for pulling checkmarx/ast-cli image (e.g., my-registry.example.com). If not provided, defaults to Docker Hub (docker.io).'
9
+
base_registry_username:
10
+
required: false
11
+
default: ''
12
+
description: 'Username for authenticating with the base container registry'
13
+
base_registry_password:
14
+
required: false
15
+
default: ''
16
+
description: 'Password/token for authenticating with the base container registry'
5
17
base_uri:
6
18
required: true
7
19
description: 'Provide the AST portal URL'
@@ -62,51 +74,119 @@ inputs:
62
74
required: false
63
75
default: .
64
76
description: "Source directory"
65
-
outputs:
77
+
outputs:
66
78
cxcli:
67
79
description: output from cli
80
+
value: ${{ steps.run-scan.outputs.cxcli }}
68
81
cxScanID:
69
82
description: scan ID output from cli
83
+
value: ${{ steps.run-scan.outputs.cxScanID }}
70
84
runs:
71
-
using: 'docker'
72
-
image: 'Dockerfile'
73
-
args:
74
-
- ${{ inputs.base_uri }}
75
-
- ${{ inputs.cx_tenant }}
76
-
- ${{ inputs.cx_client_id }}
77
-
- ${{ inputs.cx_client_secret }}
78
-
- ${{ inputs.github_token }}
79
-
- ${{ inputs.project_name }}
80
-
- ${{ inputs.additional_params }}
81
-
- ${{ inputs.global_params }}
82
-
- ${{ inputs.scan_params }}
83
-
- ${{ inputs.utils_params }}
84
-
- ${{ inputs.results_params }}
85
-
- ${{ inputs.repo_name }}
86
-
- ${{ inputs.namespace }}
87
-
- ${{ inputs.pr_number }}
88
-
- ${{ inputs.source_dir }}
89
-
entrypoint: '/app/entrypoint.sh'
90
-
post-if: cancelled()
91
-
post-entrypoint: '/app/cleanup.sh'
85
+
using: 'composite'
86
+
steps:
87
+
# Step 1: Login to base registry if credentials are provided
0 commit comments