From 70e8f7efb552700bd8579c04c848b12918a6f1d1 Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Tue, 3 Jun 2025 10:58:23 -0400 Subject: [PATCH 1/6] ci/github: udpate CodeQL workflow --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9dd2de55..b30bd264 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,14 +30,14 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # â„šī¸ 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 @@ -50,4 +50,4 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From 4df297df6cc643cd12af32dc66b293cfb8b55064 Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Tue, 3 Jun 2025 11:05:29 -0400 Subject: [PATCH 2/6] ci/github: use autobuild mode --- .github/workflows/codeql-analysis.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b30bd264..e819d66a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,35 +19,15 @@ jobs: contents: read security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - 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 }} - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # â„šī¸ 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. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh + language: c-cpp + build-mode: autobuild - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 2d9d0761c965d92e283ed50b0d95f8a7ad37367a Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Tue, 3 Jun 2025 11:23:25 -0400 Subject: [PATCH 3/6] ci/github: use autobuild mode --- .github/workflows/codeql-analysis.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e819d66a..2f60400a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,6 +19,12 @@ jobs: contents: read security-events: write + strategy: + matrix: + include: + - language: c-cpp + build-mode: autobuild + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -26,8 +32,8 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: - language: c-cpp - build-mode: autobuild - + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 5dcb342308f562817261b28e6e6310f7cbc31ec5 Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Tue, 3 Jun 2025 11:29:07 -0400 Subject: [PATCH 4/6] ci/github: use autobuild mode --- .github/workflows/codeql-analysis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2f60400a..6f344bc2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,30 +1,28 @@ -name: "CodeQL" +name: "CodeQL Advanced" on: push: branches: [ "master" ] pull_request: - # The branches below must be a subset of the branches above branches: [ "master" ] jobs: analyze: - name: Analyze - runs-on: ubuntu-latest - container: - image: ghcr.io/savoirfairelinux/opendht/opendht-deps:latest - + name: Analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' permissions: + security-events: write + packages: read actions: read contents: read - security-events: write strategy: + fail-fast: false matrix: include: - - language: c-cpp - build-mode: autobuild - + - language: c-cpp + build-mode: autobuild + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -34,6 +32,8 @@ jobs: with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From f1ff618dc8e7f25567f8f12b24a14485e4997e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Tue, 3 Jun 2025 11:30:01 -0400 Subject: [PATCH 5/6] Create codeql.yml --- .github/workflows/codeql.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..6f344bc2 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,39 @@ +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: autobuild + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From fcf2e7f94e2d493f3a48d286c1be260041667ecc Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Tue, 3 Jun 2025 11:33:04 -0400 Subject: [PATCH 6/6] Create codeql.yml --- .github/workflows/codeql-analysis.yml | 39 --------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 6f344bc2..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: "CodeQL Advanced" - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: 'ubuntu-latest' - permissions: - security-events: write - packages: read - actions: read - contents: read - - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: autobuild - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}"