diff --git a/action.yml b/action.yml index 540f0e5..8ec154a 100644 --- a/action.yml +++ b/action.yml @@ -142,6 +142,15 @@ inputs: required: false description: 'Jira Closed Status' default: '' + #######CLI Parameters ########### + project_custom_field: + required: false + description: 'checkmarx project custom field' + default: '' + scan_custom_field: + required: false + description: 'checkmarx scan custom field' + default: '' runs: using: 'docker' @@ -179,6 +188,8 @@ runs: - ${{ inputs.jira_close_transition }} - ${{ inputs.jira_open_status }} - ${{ inputs.jira_closed_status }} + - ${{ inputs.project_custom_field }} + - ${{ inputs.scan_custom_field }} env: TEAM: "${{ inputs.team }}" @@ -215,6 +226,8 @@ runs: JIRA_CLOSE_TRANSITION: ${{ inputs.jira_close_transition }} JIRA_OPEN_STATUS: ${{ inputs.jira_open_status }} JIRA_CLOSED_STATUS: ${{ inputs.jira_closed_status }} + PROJECT_CUSTOM_FIELD : ${{ inputs.project_custom_field }} + SCAN_CUSTOM_FIELD: ${{ inputs.scan_custom_field }} branding: icon: 'check' diff --git a/entrypoint.sh b/entrypoint.sh index 0322b00..1897ec6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -19,7 +19,7 @@ else fi -java ${JAVA_OPTS} -jar /app/cx-flow.jar --SHA=$GITHUB_SHA --spring.profiles.active="${CX_FLOW_ENABLED_VULNERABILITY_SCANNERS}" --scan --github.api-url="${GITHUB_API_URL}/repos/" --cx-team="${TEAM}" --cx-project="${PROJECT}" --app="${APP}" --jira.url="${JIRA_URL}" --jira.username="${JIRA_USERNAME}" --jira.token="${JIRA_TOKEN}" --jira.project="${JIRA_PROJECT}" --jira.issue-type="${JIRA_ISSUE_TYPE}" --jira.open-transition="${JIRA_OPEN_TRANSITION}" --jira.close-transition="${JIRA_CLOSE_TRANSITION}" --jira.open-status="${JIRA_OPEN_STATUS}" --jira.closed-status="${JIRA_CLOSED_STATUS}" --f=. ${CXFLOW_PARAMS} 2> scanid$GITHUB_SHA.txt +java ${JAVA_OPTS} -jar /app/cx-flow.jar --SHA=$GITHUB_SHA --spring.profiles.active="${CX_FLOW_ENABLED_VULNERABILITY_SCANNERS}" --scan --github.api-url="${GITHUB_API_URL}/repos/" --cx-team="${TEAM}" --cx-project="${PROJECT}" --app="${APP}" --jira.url="${JIRA_URL}" --jira.username="${JIRA_USERNAME}" --jira.token="${JIRA_TOKEN}" --jira.project="${JIRA_PROJECT}" --jira.issue-type="${JIRA_ISSUE_TYPE}" --jira.open-transition="${JIRA_OPEN_TRANSITION}" --jira.close-transition="${JIRA_CLOSE_TRANSITION}" --jira.open-status="${JIRA_OPEN_STATUS}" --jira.closed-status="${JIRA_CLOSED_STATUS}" --project-custom-field="${PROJECT_CUSTOM_FIELD}" --scan-custom-field="${SCAN_CUSTOM_FIELD}" --f=. ${CXFLOW_PARAMS} 2> scanid$GITHUB_SHA.txt JAVA_RETURN_STATUS=$(echo $?) scanID=$(grep 'cxflowscanidextraction' scanid$GITHUB_SHA.txt | sed 's/.*cxflowscanidextractiongithubaction \(.*\)endofstatementscanidaction/\1/') echo "cxflowscanid=$scanID" >> $GITHUB_OUTPUT