|
| 1 | +# This is a basic workflow to create GitHub Issues using the Checkmarx CxFlow GitHub Action. It runs on a push to the main branch. |
| 2 | +# |
| 3 | +# The following GitHub Secrets must be first defined: |
| 4 | +# - CHECKMARX_URL |
| 5 | +# - CHECKMARX_USERNAME |
| 6 | +# - CHECKMARX_PASSWORD |
| 7 | +# - CHECKMARX_CLIENT_SECRET |
| 8 | +# - GH_TOKEN |
| 9 | +# |
| 10 | +# Update the 'team' field to reflect the team name used in Checkmarx. |
| 11 | +# |
| 12 | +# For full documentation, including a list of all inputs, please refer to the README https://github.com/checkmarx-ts/checkmarx-cxflow-github-action |
| 13 | + |
| 14 | +name: CxFlow-GitHub-Issue-Push |
| 15 | +# Controls when the action will run. Triggers the workflow on push or pull request events but only for the master branch |
| 16 | +on: |
| 17 | + push: |
| 18 | + branches: |
| 19 | + - main |
| 20 | + - master |
| 21 | + |
| 22 | +# 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 |
| 23 | +jobs: |
| 24 | + # This workflow contains a single job called "build" |
| 25 | + build: |
| 26 | + # The type of runner that the job will run on - Ubuntu is required as Docker is leveraged for the action |
| 27 | + runs-on: ubuntu-latest |
| 28 | + # Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional) |
| 29 | + steps: |
| 30 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 31 | + - uses: actions/checkout@v2 |
| 32 | + - name: Checkmarx CxFlow Action |
| 33 | + uses: checkmarx-ts/checkmarx-cxflow-github-action@v1.4 |
| 34 | + with: |
| 35 | + project: ${{ github.event.repository.name }} |
| 36 | + team: /CxServer |
| 37 | + checkmarx_url: ${{ secrets.CHECKMARX_URL }} # To be stored in GitHub Secrets. |
| 38 | + checkmarx_username: ${{ secrets.CHECKMARX_USERNAME }} # To be stored in GitHub Secrets. |
| 39 | + checkmarx_password: ${{ secrets.CHECKMARX_PASSWORD }} # To be stored in GitHub Secrets. |
| 40 | + checkmarx_client_secret: ${{ secrets.CHECKMARX_CLIENT_SECRET }} # To be stored in GitHub Secrets. |
| 41 | + sca_api_url: https://api.scacheckmarx.com |
| 42 | + sca_app_url: https://sca.scacheckmarx.com |
| 43 | + sca_access_control_url: https://platform.checkmarx.net |
| 44 | + sca_tenant: SCA-champions # <-- Insert Checkmarx CxSCA Tenant |
| 45 | + sca_username: ${{ secrets.CHECKMARX_SCA_USERNAME }} # To be stored in GitHub Secrets. |
| 46 | + sca_password: ${{ secrets.CHECKMARX_SCA_PASSWORD }} # To be stored in GitHub Secrets. |
| 47 | + github_token: ${{secrets.GH_TOKEN}} # To be stored in GitHub Secrets. |
| 48 | + incremental: false |
| 49 | + scanners: sast, sca |
| 50 | + bug_tracker: Sarif |
| 51 | + params: --cx-flow.zip-exclude=".github/" --namespace=${{ github.repository_owner }} --repo-name=${{ github.event.repository.name }} --branch=${{ github.ref }} --checkmarx.settings-override=true |
| 52 | + |
| 53 | + # Upload the Report for CodeQL/Security Alerts |
| 54 | + - name: Upload SARIF file |
| 55 | + uses: github/codeql-action/upload-sarif@v1 |
| 56 | + with: |
| 57 | + sarif_file: cx.sarif |
0 commit comments