[enhancement] github runner: support just-in-time (JIT) runner configuration

オープン
#957 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

@atishay-kasliwal がすでに取り組んでいます。

2026年11月16日 から。

  • #971 @atishay-kasliwal による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
aws, azure, github-actions, go
領域
cli, cloud, security

調査の方向性

Read the self-hosted runner documentation linked in the issue and trace the --install-ghactions-runner CLI options and the code that generates runner user data. Check how existing token, App and PAT options are validated and how runner startup differs across platforms. Done means the JIT config file option starts a one-job ephemeral runner, conflicting options return an error, and registration tokens do not appear in user data or Pulumi state.

索引モデルが issue の本文から書いたものです。

説明

Problem

Reading https://github.com/redhat-developer/mapt/blob/main/docs/self-hosted-runner.md, the GitHub runner is registered with a registration token written into the instance's cloud-init user data (config.sh --token … --replace). That token is valid for one hour and isn't bound to one runner. Any process on the host can read it from the instance metadata service, and so can anyone with access to the cloud account or the Pulumi state. Within the hour, they can register other runners on the same repository or organization, with any name and labels, or replace an existing runner of the same name.

This matters when the jobs on the runner aren't fully trusted, or when the cloud account and the GitHub organization belong to different parties.

Proposal

Support GitHub's just-in-time (JIT) runners (REST API, security hardening guide). A JIT config registers exactly one ephemeral runner, whose name, labels and runner group are set by whoever generated it. It can't register another runner, and it's useless once consumed.

  1. Add --ghactions-runner-jitconfig-file <path>: a JIT config generated by the caller, read from a file so it stays out of process listings. It excludes the token, App and PAT options, and --ghactions-runner-labels / --ghactions-runner-ephemeral (the config sets them).
  2. With it, the snippets start the runner with run.sh --jitconfig <config> instead of config.sh, on every platform.
  3. Optionally, with --ghactions-app-*, mapt generates a JIT config itself instead of a registration token, so App users get the same benefit.

Related: #851.

Acceptance
  • mapt aws rhel create --install-ghactions-runner --ghactions-runner-jitconfig-file jit.txt … brings up a runner that takes one job and is then removed by GitHub.
  • No registration token appears in the user data or the Pulumi state.
  • Combining the option with a token, App or PAT option exits with an error.
主要言語
Go
スター
25
フォーク
41
平均マージ
5日 3時間
マージ済み PR(30日)
16

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

redhat-developer/mapt のほかの issue

redhat-developer/mapt の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。