2021-11-19 16:55:27 +01:00
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This is a basic workflow to help you get started with Using Checkmarx CxFlow Action
name : CxFlow
on :
push :
branches : [ $default-branch, $protected-branches ]
pull_request :
# The branches below must be a subset of the branches above
branches : [ $default-branch ]
schedule :
- cron : $cron-weekly
# A workflow run is made up of one or more jobs that can run sequentially or in parallel - this job is specifically configured to use the Checkmarx CxFlow Action
2022-06-08 06:39:55 +05:30
permissions :
contents : read
2021-11-19 16:55:27 +01:00
jobs :
# This workflow contains a single job called "build"
build :
# The type of runner that the job will run on - Ubuntu is required as Docker is leveraged for the action
2022-06-08 06:39:55 +05:30
permissions :
contents : read # for actions/checkout to fetch code
issues : write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to github issues
pull-requests : write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to PR
security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
2021-11-19 16:55:27 +01:00
runs-on : ubuntu-latest
# Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional)
steps :
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2022-06-08 06:39:55 +05:30
- uses : actions/checkout@v3
2021-11-19 16:55:27 +01:00
# Runs the Checkmarx Scan leveraging the latest version of CxFlow - REFER to Action README for list of inputs
- name : Checkmarx CxFlow Action
2022-06-06 11:45:21 +05:30
uses : checkmarx-ts/checkmarx-cxflow-github-action@49d8269b14ca87910ba003d47a31fa0c7a11f2fe
2021-11-19 16:55:27 +01:00
with :
2021-12-24 15:55:11 +05:30
project : ${{ secrets.CHECKMARX_PROJECT }}
team : ${{ secrets.CHECKMARX_TEAMS }}
2021-11-19 16:55:27 +01:00
checkmarx_url : ${{ secrets.CHECKMARX_URL }}
checkmarx_username : ${{ secrets.CHECKMARX_USERNAME }}
checkmarx_password : ${{ secrets.CHECKMARX_PASSWORD }}
checkmarx_client_secret : ${{ secrets.CHECKMARX_CLIENT_SECRET }}
2021-12-24 15:55:11 +05:30
scanners : sast
2022-06-08 06:39:55 +05:30
params : --namespace=${{ github.repository_owner }} --repo-name=${{ github.event.repository.name }} --branch=${{ github.ref }} --cx-flow.filter-severity --cx-flow.filter-category --checkmarx.disable-clubbing=true --repo-url=${{ github.event.repository.url }}
2021-11-19 16:55:27 +01:00
# Upload the Report for CodeQL/Security Alerts
- name : Upload SARIF file
2022-06-08 06:39:55 +05:30
uses : github/codeql-action/upload-sarif@v2
2021-11-19 16:55:27 +01:00
with :
sarif_file : cx.sarif