From dd05bc5a8ba23d89577cd51e289fb69a86819d00 Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 11:40:31 -0400 Subject: [PATCH 1/7] fix(automation): Remove CodeQL for autobuild --- .github/workflows/codeql.yml | 38 ------------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 43ddc3f5..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "Code scanning - action" - -on: - push: - pull_request: - schedule: - - cron: '0 19 * * 0' - -jobs: - CodeQL-Build: - - # CodeQL runs on ubuntu-latest and windows-latest - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: go - - - run: | - make compile-only - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 From 9185625fd29ae676720a41675aa9e80d9416418b Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 14:01:55 -0400 Subject: [PATCH 2/7] fix(automation): Fix CodeQL and add config --- .github/codeql/codeql-config.yml | 3 +++ .github/workflows/codeql.yml | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/codeql/codeql-config.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 00000000..813f543d --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,3 @@ +name: "CodeQL config" +paths-ignore: + - pkg/**/*_test.go diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..281bc0d7 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,35 @@ +name: "Code scanning - action" + +on: + push: + pull_request: + schedule: + - cron: '0 19 * * 0' + +jobs: + CodeQL-Build: + + # CodeQL runs on ubuntu-latest and windows-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: go + config-file: ./.github/codeql/codeql-config.yml + build-mode: manual + + - run: | + make compile-only + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 From 0f3f1a7e3c9498ee98b1f615a90dea556669665a Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 14:05:06 -0400 Subject: [PATCH 3/7] fix(automation): Trying autobuild --- .github/workflows/codeql.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 281bc0d7..fcb2850c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,10 +26,6 @@ jobs: with: languages: go config-file: ./.github/codeql/codeql-config.yml - build-mode: manual - - - run: | - make compile-only - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 95edf442b53a6a88a62fc47e2aeb4d9beb6e4a92 Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 14:32:07 -0400 Subject: [PATCH 4/7] fix(automation): Codeql path ignores --- .github/codeql/codeql-config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 813f543d..19f6cd5e 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -1,3 +1,4 @@ name: "CodeQL config" paths-ignore: - - pkg/**/*_test.go + - **/*_test.go + - tools/tools.go From 0874a3a25142c5017485fbcb7dd1a5e472a90700 Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 14:34:01 -0400 Subject: [PATCH 5/7] fix(automation): Codeql path ignores --- .github/codeql/codeql-config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 19f6cd5e..8c31ec81 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -1,4 +1,4 @@ name: "CodeQL config" paths-ignore: - - **/*_test.go - - tools/tools.go + - '**/*_test.go' + - 'tools/tools.go' From dbd25267a179592d9b2ee2710938ebded6ec62f2 Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 15:00:45 -0400 Subject: [PATCH 6/7] fix(automation): Test removing codeql action --- .github/workflows/codeql.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index fcb2850c..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Code scanning - action" - -on: - push: - pull_request: - schedule: - - cron: '0 19 * * 0' - -jobs: - CodeQL-Build: - - # CodeQL runs on ubuntu-latest and windows-latest - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: go - config-file: ./.github/codeql/codeql-config.yml - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 From 4fc11433cb475a4843dec0ef48a25bb6c440ea20 Mon Sep 17 00:00:00 2001 From: Vaughn Woerpel Date: Fri, 11 Oct 2024 15:02:18 -0400 Subject: [PATCH 7/7] fix(automation): Add back CodeQL --- .github/workflows/codeql.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..73175d28 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,38 @@ +name: "Code scanning - action" + +on: + push: + pull_request: + schedule: + - cron: '0 19 * * 0' + +jobs: + CodeQL-Build: + + # CodeQL runs on ubuntu-latest and windows-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: go + + - run: | + make compile-only + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 +