From 993003e515fba314e22d9646609fe24832297d92 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 13 Nov 2024 00:28:56 -0800 Subject: [PATCH] Add CodeQL analysis workflow --- .github/workflows/codeql-analysis.yml | 31 +++++++++++---------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 921a2d8..6a56fc3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,27 +1,22 @@ -name: "CodeQL Analysis" - -on: - push: - branches: - - main # Runs the analysis when changes are pushed to the main branch - pull_request: - branches: - - main # Runs the analysis when a PR is opened to the main branch - -jobs: +name: "CodeQL Analysis" + on: + push: + branches: + - main # Runs the analysis when changes are pushed to the main branch + pull_request: + branches: + - main # Runs the analysis when a PR is opened to the main branch +jobs: analyze: - name: Analyze code with CodeQL + name: Analyze code with CodeQL runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout repository uses: actions/checkout@v3 - - name: Set up CodeQL uses: github/codeql-action/setup-codeql@v2 - - name: Run CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v2 with: - categories: 'security' # Can be 'security' or 'security-and-quality' - + categories: 'security' # Can be 'security' or 'security-and-quality' depending on the type of scan you need