Add CodeQL analysis workflow #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 | ||
with: | ||
categories: 'security' # Can be 'security' or 'security-and-quality' depending on the type of scan you need |