diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..e9a63709 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,45 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: "CodeQL check" + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '30 6 * * *' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + packages: read + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/pr-validate.yaml b/.github/workflows/pr-validate.yaml index e83d3c7e..ac94261f 100644 --- a/.github/workflows/pr-validate.yaml +++ b/.github/workflows/pr-validate.yaml @@ -12,6 +12,9 @@ concurrency: group: ${{ github.head_ref }}-pr-validate cancel-in-progress: true +permissions: + contents: read + jobs: prepare: name: Prepare data required for workflow