Skip to content

Commit

Permalink
added project and scan custom fields parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
itsKedar committed Sep 19, 2024
1 parent 21abae3 commit 799fae9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 799fae9

Please sign in to comment.