From 70df8fb88bd6b4db8d53a12731181ecb9f71efb0 Mon Sep 17 00:00:00 2001 From: Cyril Lay Date: Fri, 10 Jan 2025 10:08:26 +0100 Subject: [PATCH] Add codeQL analysis in CI/CD --- .github/workflows/build_and_deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 99382782..e6172469 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -6,8 +6,32 @@ on: - main jobs: + analyze: + name: CodeQL Analysis + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: python + queries: security-and-quality + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:python" + build-and-push: name: Build and push from ${{ github.ref_name }}/${{ github.sha }} + needs: analyze runs-on: ubuntu-latest env: APP_IMAGE_NAME: ghcr.io/${{ github.repository }}/app