Skip to content

Update codeql.yml

Update codeql.yml #3

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Use macOS runner for Swift, and Ubuntu for others
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# Required for all workflows
security-events: write
# Required to fetch internal or private CodeQL packs
packages: read
# Only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: dart
build-mode: manual
# You can add other languages supported by CodeQL if needed.
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# queries: security-extended,security-and-quality
# Manually build the Flutter project (as autobuild might not work for Dart/Flutter)
- if: matrix.build-mode == 'manual'
name: Build Flutter project
run: |
flutter pub get
flutter build apk
# Perform CodeQL Analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"