From 059949b80978b699e5757b6ae1bd42dacd9600e0 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Fri, 3 Nov 2023 18:28:49 -0400 Subject: [PATCH 1/9] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..91abb11 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From f0e5442df78f279ac2fd1bda870aa7cebfaf2362 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Fri, 3 Nov 2023 18:31:54 -0400 Subject: [PATCH 2/9] Create codeql.yml --- .github/workflows/codeql.yml | 94 ++++++++++++++++++++++++++++++++++++ 1 file changed, 94 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 0000000..37cc29d --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,94 @@ +# trac-github/.github/workflows/codeql.yml: GitHub Actions codeql workflow for trac-github +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: + - master + - github-stuff + - dependabot/* + - issue-sync + pull_request: + # The branches below must be a subset of the branches above + branches: + - master + - github-stuff + - dependabot/* + - issue-sync + schedule: + - cron: '37 17 * * 3' + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at: + # https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more 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 + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # 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 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 63f82ba93aef07176f5ad1f6a6c7eeecba105a25 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Fri, 3 Nov 2023 18:38:40 -0400 Subject: [PATCH 3/9] Update .gitignore ignore .env.local --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 07655ed..ec492af 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build dist htmlcov +.env.local From 65b6f3a2c7cbfd547f8790f26d6ca9211c7ab278 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Fri, 3 Nov 2023 18:46:17 -0400 Subject: [PATCH 4/9] Update codeql.yml remove irrelevant comments --- .github/workflows/codeql.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 37cc29d..5306007 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -73,21 +73,9 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v2 - # 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 - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 with: From 6456ab20288f156538a60fa31ab4bd671b6c6e88 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Tue, 28 Nov 2023 06:47:33 -0500 Subject: [PATCH 5/9] Update .github/dependabot.yml change weekly to monthly Co-authored-by: Clemens Lang --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 91abb11..3bf1101 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "pip" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "weekly" + interval: "monthly" From 596d887550f78024fedaf3466e2e3ba0385cfab5 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 6 Dec 2023 12:39:53 -0500 Subject: [PATCH 6/9] Update codeql.yml Install python2 before initializing CodeQL --- .github/workflows/codeql.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5306007..12a9ef2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -58,6 +58,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get -qq update && sudo apt-get install python2 + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 From 92924d9c3e4022bb913dc21d95d8cd24f223566a Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 18 Aug 2024 19:56:13 -0400 Subject: [PATCH 7/9] yamllint on submitted files --- .github/dependabot.yml | 5 +-- .github/workflows/codeql.yml | 68 ++++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3bf1101..2fc9d9f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: @@ -5,7 +6,7 @@ version: 2 updates: - - package-ecosystem: "pip" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests schedule: interval: "monthly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 12a9ef2..9d67041 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,4 +1,5 @@ -# trac-github/.github/workflows/codeql.yml: GitHub Actions codeql workflow for trac-github +--- +# trac-github/.github/workflows/codeql.yml: GHA codeql workflow for trac-github # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -20,7 +21,7 @@ on: - dependabot/* - issue-sync pull_request: - # The branches below must be a subset of the branches above + # The branches below must be a subset of the branches above: branches: - master - github-stuff @@ -37,8 +38,8 @@ jobs: # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + runs-on: 'ubuntu-latest' + timeout-minutes: 360 permissions: actions: read contents: read @@ -47,39 +48,46 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'python' ] - # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] - # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + language: ['python'] + # CodeQL supports the following languages: + # 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', + # 'python', 'ruby', 'swift' + # Use 'java-kotlin' to analyze code written in Java, Kotlin, or both + # Use 'javascript-typescript' to analyze code written in JavaScript, + # TypeScript, or both # Learn more about CodeQL language support at: # https://aka.ms/codeql-docs/language-support steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Install dependencies - run: sudo apt-get -qq update && sudo apt-get install python2 + - name: Install dependencies + run: sudo apt-get -qq update && sudo apt-get install python2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a + # config file. + # By default, queries listed here will override any specified in a + # config file. + # Prefix the list here with "+" to use these queries and those in the + # config file. - # For more 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 + # For more 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 - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Autobuild attempts to build any compiled languages + # (C/C++, C#, Go, Java, or Swift). + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 5b1f39d305c464f37811e218bbf5b1483c07de9f Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 30 Oct 2024 22:21:28 -0400 Subject: [PATCH 8/9] Update dependabot.yml Use github-actions ecosystem --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2fc9d9f..760993f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,7 @@ updates: directory: "/" # Location of package manifests schedule: interval: "monthly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" From 5628ebdd5ce118089f1b29f995855ae41291752a Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 30 Oct 2024 22:58:06 -0400 Subject: [PATCH 9/9] Update codeql.yml bump action versions used: - checkout: 3 to 4 - codeql-action: 2 to 3 --- .github/workflows/codeql.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9d67041..d3f3056 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -60,14 +60,14 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: sudo apt-get -qq update && sudo apt-get install python2 # 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 }} # If you wish to specify custom queries, you can do so here or in a @@ -85,9 +85,9 @@ jobs: # Autobuild attempts to build any compiled languages # (C/C++, C#, Go, Java, or Swift). - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}"