diff --git a/.github/workflows/codeql-scanning.yml b/.github/workflows/codeql-scanning.yml new file mode 100644 index 00000000..6858fbf7 --- /dev/null +++ b/.github/workflows/codeql-scanning.yml @@ -0,0 +1,43 @@ +name: "codeql-scanning" + +on: + push: + branches: + - main + - 'release/*' + pull_request: + branches: + - main + - 'release/*' + schedule: + - cron: '0 9 * * *' + +jobs: + CodeQL-Scanning: + + runs-on: ubuntu-latest + + permissions: + contents: read + security-events: write + pull-requests: read + + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + submodules: recursive + + - name: Install golang + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0 + with: + go-version: '1.21.13' + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a #3.28.8 + with: + languages: go + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a #3.28.8