From 353fe98379ba764e5e7ff1f0fd919b1c2abb0dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Wed, 22 Jan 2025 13:30:53 +0100 Subject: [PATCH] chore(ci): add codeql code scanning (#169) --- .github/dependabot.yml | 4 --- .github/workflows/codeql.yaml | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/codeql.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0242ec3..01da370 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,3 @@ updates: directory: / schedule: interval: daily -- package-ecosystem: docker - directory: / - schedule: - interval: daily diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000..12202e8 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,50 @@ +name: codeql + +concurrency: + # Run only for most recent commit in PRs but for all tags and commits on main + # Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + schedule: + - cron: '27 0 * * 4' + workflow_dispatch: {} + +permissions: + contents: read + +jobs: + analyze: + timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT || 10) }} + name: analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install Go + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + with: + go-version-file: go.mod + - name: Initialize CodeQL + uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1