You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/06/09 16:12:40 UTC

(tooling-trusted-releases) branch gh_runner_changes created (now fcb031cf)

This is an automated email from the ASF dual-hosted git repository.

alitheg pushed a change to branch gh_runner_changes
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


      at fcb031cf Security changes to workflows to ensure only trusted builds run on self-hosted runner

This branch includes the following new commits:

     new fcb031cf Security changes to workflows to ensure only trusted builds run on self-hosted runner

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org


(tooling-trusted-releases) 01/01: Security changes to workflows to ensure only trusted builds run on self-hosted runner

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

alitheg pushed a commit to branch gh_runner_changes
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit fcb031cfb0f56c8d806144fd788ca56fe8798482
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Tue Jun 9 17:12:10 2026 +0100

    Security changes to workflows to ensure only trusted builds run on self-hosted runner
---
 .github/workflows/allowlistchecker.yml |  3 ++-
 .github/workflows/analyze.yml          |  3 ++-
 .github/workflows/build.yml            | 12 ++++++++++--
 .github/workflows/codeql.yaml          |  3 ++-
 .github/workflows/generatesbom.yml     |  3 ++-
 5 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/allowlistchecker.yml b/.github/workflows/allowlistchecker.yml
index 8fc709be..2d80d1ae 100644
--- a/.github/workflows/allowlistchecker.yml
+++ b/.github/workflows/allowlistchecker.yml
@@ -27,7 +27,8 @@ permissions:
   contents: read
 jobs:
   asf-allowlist-check:
-    runs-on: ubuntu-latest
+    # Trusted sources on our own runner; fork PRs on the hosted runner.
+    runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }}
     steps:
       - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
         with:
diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml
index 99a32f7d..51db11ef 100644
--- a/.github/workflows/analyze.yml
+++ b/.github/workflows/analyze.yml
@@ -16,7 +16,8 @@ env:
 
 jobs:
   analyze:
-    runs-on: ubuntu-latest
+    # Trusted sources on our own runner; fork PRs on the hosted runner.
+    runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }}
     strategy:
       fail-fast: false
       matrix:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0296852d..2644db4f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,7 +4,7 @@ on:
   push:
     branches: [altera, arm, main, sbp, tertia]
   pull_request:
-    branches: [main]
+    branches: [arm, main]
   workflow_dispatch:
 
 permissions:
@@ -15,7 +15,15 @@ env:
 
 jobs:
   test:
-    runs-on: ubuntu-latest
+    # Run on our own runner for trusted sources (push/dispatch, or a same-repo
+    # PR); fork PRs fall back to the hosted runner so they never touch it.
+    runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }}
+    # Skip same-repo PRs from branches push already built - no point building the
+    # same commit twice.
+    if: >-
+      github.event_name != 'pull_request' ||
+      github.event.pull_request.head.repo.full_name != github.repository ||
+      !contains(fromJSON('["altera", "arm", "main", "sbp", "tertia"]'), github.event.pull_request.head.ref)
     strategy:
       fail-fast: false
       matrix:
diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml
index ec47672b..daa38e59 100644
--- a/.github/workflows/codeql.yaml
+++ b/.github/workflows/codeql.yaml
@@ -12,7 +12,8 @@ on:
 jobs:
   analyze:
     name: Analyze
-    runs-on: ubuntu-latest
+    # Trusted sources on our own runner; fork PRs on the hosted runner.
+    runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'self-hosted' || 'ubuntu-latest' }}
 
     permissions:
       actions: read
diff --git a/.github/workflows/generatesbom.yml b/.github/workflows/generatesbom.yml
index 636e467b..139823e0 100644
--- a/.github/workflows/generatesbom.yml
+++ b/.github/workflows/generatesbom.yml
@@ -11,7 +11,8 @@ permissions:
 
 jobs:
   generate-sbom:
-    runs-on: ubuntu-latest
+    # Only runs on push to main / dispatch, so always trusted - use our runner.
+    runs-on: self-hosted
     steps:
       - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
         with:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org