Skip to content

ci: run CI on self-hosted runners - #36

Merged
fatherlinux merged 1 commit into
mainfrom
ci/self-hosted-runners
Nov 18, 2026
Merged

fatherlinux merged 1 commit into
mainfrom
ci/self-hosted-runners

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

Moves this repo's own CI gate jobs (sdlc ci and friends) from ubuntu-latest to the self-hosted runners, with the expression from crunchtools/trentina's security.yml:

  • same-repo, non-Dependabot pull requests → vars.CACHED_RUNNER_LABEL
  • pushes, schedules and dispatches → vars.UNCACHED_RUNNER_LABEL
  • fork and Dependabot pull requests → ubuntu-latest
  • either variable empty → ubuntu-latest (the kill switch)

Only runs-on changes. Untouched: pull_request_target jobs, agent workflows (ashigaru, code, fix, router), release/publish jobs that hold secrets, dependabot-automerge. Fleet sweep a275; squash auto-merge on.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7Y1jeWKZVB8rtVJ3TZsRc

Same-repo pull requests run on the cached self-hosted runner and pushes on
the uncached one; forks and Dependabot stay on GitHub's machines, and an
empty runner variable falls back to ubuntu-latest. The expression is
crunchtools/trentina's security.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jeWKZVB8rtVJ3TZsRc
@fatherlinux
fatherlinux enabled auto-merge (squash) November 18, 2026 03:10

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found 1 issues (1 high)

Full review.

1 finding(s) dropped: their evidence is not in the diff.

Comment thread .github/workflows/ci.yml
# Same-repo PRs run on our cached runner, pushes and schedules on the uncached
# one; forks and Dependabot stay on GitHub's. An empty variable falls back to
# ubuntu-latest (crunchtools/trentina security.yml).
runs-on: >-

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH (Security Scan): Same-repository pull requests from non-Dependabot users are routed to the cached runner. PR code can execute during CI, so a malicious or compromised contributor can target the runner’s cached state and any credentials or other resources available to that runner. The previous configuration used GitHub-hosted runners.

Suggestion: Run pull-request code on an isolated, ephemeral GitHub-hosted runner, or ensure the cached runner is ephemeral and isolated from credentials and other jobs. Restrict cached-runner use to trusted code if that isolation cannot be guaranteed.

Evidence:

runs-on: >-
  ${{ github.event_name == 'pull_request'
      && github.event.pull_request.head.repo.full_name == github.repository
      && github.event.pull_request.user.login != 'dependabot[bot]'
      && (vars.CACHED_RUNNER_LABEL || 'ubuntu-latest')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bug: only same-repo PRs reach the cached runner, and opening one needs write access to this repo, which is the same trust an org member already has to merge. Fork and Dependabot PRs stay on GitHub-hosted runners. The cached runner holds no registry or App secrets and nothing it builds is published: pushes and publishes run on the uncached, tmpfs-backed runner. This is the accepted design from crunchtools/trentina security.yml (fleet sweep a275).

@fatherlinux
fatherlinux merged commit 34b9faf into main Nov 18, 2026
17 of 18 checks passed
@fatherlinux
fatherlinux deleted the ci/self-hosted-runners branch November 18, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant