|
| 1 | +# This workflow uses actions that are not certified by GitHub. |
| 2 | +# They are provided by a third-party and are governed by |
| 3 | +# separate terms of service, privacy policy, and support |
| 4 | +# documentation. |
| 5 | + |
| 6 | +# This is a basic workflow to help you get started with Using Checkmarx CxFlow Action |
| 7 | + |
| 8 | +name: CxFlow |
| 9 | + |
| 10 | +on: |
| 11 | + push: |
| 12 | + branches: [ "main" ] |
| 13 | + pull_request: |
| 14 | + # The branches below must be a subset of the branches above |
| 15 | + branches: [ "main" ] |
| 16 | + schedule: |
| 17 | + - cron: '41 2 * * 1' |
| 18 | + |
| 19 | +# 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 |
| 20 | +permissions: |
| 21 | + contents: read |
| 22 | + |
| 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 | + permissions: |
| 28 | + contents: read # for actions/checkout to fetch code |
| 29 | + issues: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to github issues |
| 30 | + pull-requests: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to PR |
| 31 | + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results |
| 32 | + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status |
| 33 | + runs-on: ubuntu-latest |
| 34 | + |
| 35 | + # Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional) |
| 36 | + steps: |
| 37 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + # Runs the Checkmarx Scan leveraging the latest version of CxFlow - REFER to Action README for list of inputs |
| 40 | + - name: Checkmarx CxFlow Action |
| 41 | + uses: checkmarx-ts/checkmarx-cxflow-github-action@49d8269b14ca87910ba003d47a31fa0c7a11f2fe |
| 42 | + with: |
| 43 | + project: ${{ secrets.CHECKMARX_PROJECT }} |
| 44 | + team: ${{ secrets.CHECKMARX_TEAMS }} |
| 45 | + checkmarx_url: ${{ secrets.CHECKMARX_URL }} |
| 46 | + checkmarx_username: ${{ secrets.CHECKMARX_USERNAME }} |
| 47 | + checkmarx_password: ${{ secrets.CHECKMARX_PASSWORD }} |
| 48 | + checkmarx_client_secret: ${{ secrets.CHECKMARX_CLIENT_SECRET }} |
| 49 | + scanners: sast |
| 50 | + 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 }} |
| 51 | + # Upload the Report for CodeQL/Security Alerts |
| 52 | + - name: Upload SARIF file |
| 53 | + uses: github/codeql-action/upload-sarif@v3 |
| 54 | + with: |
| 55 | + sarif_file: cx.sarif |
0 commit comments