diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000..336c645 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,42 @@ +name: CodeQL + +on: + pull_request: + branches: + - dev + - main + push: + branches: + - dev + - main + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + actions: read + + strategy: + fail-fast: false + matrix: + language: ['python', 'javascript', 'actions'] + + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Initialize CodeQL + uses: github/codeql-action/init@1a818fd5f97ed0ee9a823421bd5b171add01227f # v4.36.2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@1a818fd5f97ed0ee9a823421bd5b171add01227f # v4.36.2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@1a818fd5f97ed0ee9a823421bd5b171add01227f # v4.36.2 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/validate-release.yaml b/.github/workflows/validate-release.yaml index ec030ae..30bc372 100644 --- a/.github/workflows/validate-release.yaml +++ b/.github/workflows/validate-release.yaml @@ -9,6 +9,8 @@ jobs: validate: name: Validate version and changelog runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout PR branch uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/config/urls.py b/config/urls.py index 24ccf49..86053fd 100644 --- a/config/urls.py +++ b/config/urls.py @@ -33,8 +33,8 @@ def healthz(request): try: connection.ensure_connection() return JsonResponse({"status": "ok"}) - except Exception as e: - return JsonResponse({"status": "error", "detail": str(e)}, status=503) + except Exception: + return JsonResponse({"status": "error"}, status=503) urlpatterns = [ path("healthz/", healthz, name="healthz"),