From 28652e01b0a31f6c9abb7d846fd59b564d3efb04 Mon Sep 17 00:00:00 2001 From: snapetech <71525329+snapetech@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:25:08 -0600 Subject: [PATCH 1/6] ci: remove CodeQL SARIF upload --- .github/workflows/semgrep-community.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/semgrep-community.yml b/.github/workflows/semgrep-community.yml index 1b439a2b..0dd86e78 100644 --- a/.github/workflows/semgrep-community.yml +++ b/.github/workflows/semgrep-community.yml @@ -17,7 +17,6 @@ on: permissions: contents: read - security-events: write concurrency: group: ng-scan-semgrep-community-${{ github.run_id }}-${{ github.run_attempt }} @@ -47,17 +46,9 @@ jobs: -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro \ -v "$GITHUB_WORKSPACE:/src" -w /src semgrep/semgrep:latest \ semgrep scan --config p/default --metrics=off --jobs 2 \ - --json-output semgrep.json --sarif-output semgrep.sarif . + --json-output semgrep.json . - name: Report finding count if: always() && hashFiles('semgrep.json') != '' run: | - jq -r '"Semgrep CE reported \(.results | length) finding(s). Review semgrep.sarif and the scan log."' semgrep.json - - - name: Upload findings to GitHub code scanning - if: always() && hashFiles('semgrep.sarif') != '' - uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 - with: - sarif_file: semgrep.sarif - category: semgrep-ce-community - + jq -r '"Semgrep CE reported \(.results | length) finding(s). Review the job log and JSON report."' semgrep.json From 02409f2941b23fc7c9f82d724965120f9b66b2eb Mon Sep 17 00:00:00 2001 From: snapetech <71525329+snapetech@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:25:10 -0600 Subject: [PATCH 2/6] ci: remove disabled CodeQL workflow --- .github/workflows/codeql.yml | 53 ------------------------------------ 1 file changed, 53 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 3594588a..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,53 +0,0 @@ -# ng-runner-policy: private-jit-only-v1 -# CodeQL runs only on explicit private-JIT dispatch. -# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors - -name: CodeQL - -on: - workflow_dispatch: - inputs: - action_tag: - description: Action to run - type: choice - required: true - options: [codeql] - runner_pool_tag: - description: Private ephemeral JIT runner pool - type: choice - required: true - options: [private] -concurrency: - group: ng-scan-codeql-${{ github.run_id }}-${{ github.run_attempt }} - cancel-in-progress: false - -jobs: - analyze: - if: inputs.action_tag == 'codeql' && inputs.runner_pool_tag == 'private' - runs-on: ${{ fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) }} - permissions: - security-events: write - actions: read - contents: read - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version-file: go.mod - - - name: Initialize CodeQL - uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 - with: - languages: go - build-mode: manual - - - name: Build for CodeQL - run: go build ./... - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 - From 18c22c49fe0a7681efd298e6a3049df68daeb2da Mon Sep 17 00:00:00 2001 From: snapetech Date: Fri, 30 Oct 2026 22:28:56 -0600 Subject: [PATCH 3/6] chore: keep Semgrep SARIF reporting [skip ci] --- .github/workflows/semgrep-community.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/semgrep-community.yml b/.github/workflows/semgrep-community.yml index 0dd86e78..e545c0c0 100644 --- a/.github/workflows/semgrep-community.yml +++ b/.github/workflows/semgrep-community.yml @@ -17,6 +17,7 @@ on: permissions: contents: read + security-events: write concurrency: group: ng-scan-semgrep-community-${{ github.run_id }}-${{ github.run_attempt }} @@ -46,9 +47,16 @@ jobs: -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro \ -v "$GITHUB_WORKSPACE:/src" -w /src semgrep/semgrep:latest \ semgrep scan --config p/default --metrics=off --jobs 2 \ - --json-output semgrep.json . + --json-output semgrep.json --sarif-output semgrep.sarif . - name: Report finding count if: always() && hashFiles('semgrep.json') != '' run: | - jq -r '"Semgrep CE reported \(.results | length) finding(s). Review the job log and JSON report."' semgrep.json + jq -r '"Semgrep CE reported \(.results | length) finding(s). Review semgrep.sarif and the scan log."' semgrep.json + + - name: Upload findings to GitHub code scanning + if: always() && hashFiles('semgrep.sarif') != '' + uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + with: + sarif_file: semgrep.sarif + category: semgrep-ce-community From 98d5f9dbf50a55add520c90060261a7a746a9a4f Mon Sep 17 00:00:00 2001 From: snapetech <71525329+snapetech@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:38:24 -0600 Subject: [PATCH 4/6] ci: retain Semgrep scan reports as artifacts --- .github/workflows/semgrep-community.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/semgrep-community.yml b/.github/workflows/semgrep-community.yml index e545c0c0..5ef7d9dc 100644 --- a/.github/workflows/semgrep-community.yml +++ b/.github/workflows/semgrep-community.yml @@ -17,7 +17,6 @@ on: permissions: contents: read - security-events: write concurrency: group: ng-scan-semgrep-community-${{ github.run_id }}-${{ github.run_attempt }} @@ -54,9 +53,13 @@ jobs: run: | jq -r '"Semgrep CE reported \(.results | length) finding(s). Review semgrep.sarif and the scan log."' semgrep.json - - name: Upload findings to GitHub code scanning - if: always() && hashFiles('semgrep.sarif') != '' - uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + - name: Retain scan report (semgrep) + if: always() && (hashFiles('semgrep.sarif') != '' || hashFiles('semgrep.json') != '') + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - sarif_file: semgrep.sarif - category: semgrep-ce-community + name: scan-report-semgrep-${{ github.job }}-${{ strategy.job-index }}-${{ github.run_id }}-${{ github.run_attempt }} + path: | + semgrep.sarif + semgrep.json + if-no-files-found: warn + retention-days: 14 From 6d6916031a0f739cf8e74fa5e2e98654ab29dda3 Mon Sep 17 00:00:00 2001 From: snapetech <71525329+snapetech@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:44:51 -0600 Subject: [PATCH 5/6] ci: keep scan reports with fork-safe artifacts --- .github/workflows/semgrep-community.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semgrep-community.yml b/.github/workflows/semgrep-community.yml index 5ef7d9dc..289277d4 100644 --- a/.github/workflows/semgrep-community.yml +++ b/.github/workflows/semgrep-community.yml @@ -54,7 +54,11 @@ jobs: jq -r '"Semgrep CE reported \(.results | length) finding(s). Review semgrep.sarif and the scan log."' semgrep.json - name: Retain scan report (semgrep) - if: always() && (hashFiles('semgrep.sarif') != '' || hashFiles('semgrep.json') != '') + if: >- + always() && + (hashFiles('semgrep.sarif') != '' || hashFiles('semgrep.json') != '') && + (github.event_name != 'pull_request' || + github.event.pull_request.head.repo.full_name == github.repository) uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: scan-report-semgrep-${{ github.job }}-${{ strategy.job-index }}-${{ github.run_id }}-${{ github.run_attempt }} From 32d17df20db0fe72de4467d90efb4eba2b7707dd Mon Sep 17 00:00:00 2001 From: snapetech Date: Sat, 31 Oct 2026 04:47:09 -0600 Subject: [PATCH 6/6] ci: restore third-party SARIF reporting --- .github/workflows/semgrep-community.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/semgrep-community.yml b/.github/workflows/semgrep-community.yml index 289277d4..e545c0c0 100644 --- a/.github/workflows/semgrep-community.yml +++ b/.github/workflows/semgrep-community.yml @@ -17,6 +17,7 @@ on: permissions: contents: read + security-events: write concurrency: group: ng-scan-semgrep-community-${{ github.run_id }}-${{ github.run_attempt }} @@ -53,17 +54,9 @@ jobs: run: | jq -r '"Semgrep CE reported \(.results | length) finding(s). Review semgrep.sarif and the scan log."' semgrep.json - - name: Retain scan report (semgrep) - if: >- - always() && - (hashFiles('semgrep.sarif') != '' || hashFiles('semgrep.json') != '') && - (github.event_name != 'pull_request' || - github.event.pull_request.head.repo.full_name == github.repository) - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + - name: Upload findings to GitHub code scanning + if: always() && hashFiles('semgrep.sarif') != '' + uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: - name: scan-report-semgrep-${{ github.job }}-${{ strategy.job-index }}-${{ github.run_id }}-${{ github.run_attempt }} - path: | - semgrep.sarif - semgrep.json - if-no-files-found: warn - retention-days: 14 + sarif_file: semgrep.sarif + category: semgrep-ce-community