diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5832bbf..d3cc29c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,5 +1,4 @@ -name: "CodeQL" - +name: "CodeQL Advanced" on: push: branches: [ "master" ] @@ -23,51 +22,47 @@ on: # Manual trigger from Actions workflow_dispatch: branches: [ "master" ] - paths: + paths: - '**/Makefile' - '**/*.c' - '**/*.h' - '**/*.y' - '**/*.l' - - '**/*.sh' - schedule: + - '**/*.sh' + schedule: - cron: '18 15 * * 5' jobs: analyze: - name: Analyze - runs-on: ubuntu-latest + name: Analyze (${{ matrix.language }}) + 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 - security-events: write strategy: fail-fast: false matrix: - language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - + include: + - language: c-cpp + build-mode: autobuild steps: - name: Checkout repository uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. + # Initialises the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - + build-mode: ${{ matrix.build-mode }} - run: | git clone https://github.com/lcn2/dbg cd dbg