diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f757eaf57..f3e5bafb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,37 @@ jobs: --no-deps \ --config "$RUST_CONFIG" + codeql: + name: CodeQL security analysis + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: rust + + - name: Install Rust ${{ env.rust_stable }} + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.rust_stable }} + + - uses: Swatinem/rust-cache@v2 + + - name: Build workspace + run: cargo build --workspace --locked --profile ci + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:rust" + # TODO: Re-enable docs check later # docs: # name: docs