@olegkoval/agent-skills 1.54.2 → 1.54.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/prompts/nas-actions-migration.prompt.md +18 -14
- package/adapters/claude/olko-github-pr/skills/nas-actions-migration/SKILL.md +18 -14
- package/adapters/cursor/olko-github-pr/skills/nas-actions-migration/SKILL.md +18 -14
- package/adapters/grok/olko-github-pr/skills/nas-actions-migration/SKILL.md +18 -14
- package/package.json +1 -1
- package/plugins/olko-apple-kit/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-creative/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-garmin-kit/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-git-tools/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-github-pr/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-github-pr/skills/nas-actions-migration/SKILL.md +18 -14
- package/plugins/olko-obsidian/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-product/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-reflection/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-release/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-skill-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-web-ops/.claude-plugin/plugin.json +1 -1
|
@@ -37,35 +37,39 @@ Use when asked to move Actions/CI jobs to a NAS, copy the Roazon/Funda Radar run
|
|
|
37
37
|
4. **Route through an explicit opt-in variable.** Use a repository variable such as `CI_RUNNER=nas`, with a hosted-runner fallback until activation:
|
|
38
38
|
|
|
39
39
|
```yaml
|
|
40
|
-
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || '
|
|
40
|
+
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || 'ORIGINAL_HOSTED_RUNNER' }}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Replace `ORIGINAL_HOSTED_RUNNER` with the job's exact existing hosted `runs-on` value; do not silently substitute `ubuntu-latest`. Required fork checks must remain non-skipped on the hosted fallback. If a required check cannot safely run on NAS, keep that job hosted or add a separate non-skipped required gate that blocks until the trusted check runs.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
For every job that can execute repository-controlled code on the NAS, never use `github.event_name != 'pull_request'` as a trust predicate: it treats privileged events as trusted merely because they are not `pull_request`. Choose the origin check for the actual trigger:
|
|
46
|
+
|
|
47
|
+
- `pull_request`: allow NAS only for a verified trusted origin; keep fork PRs on the hosted fallback.
|
|
48
|
+
- `pull_request_target`: keep the job hosted unless the workflow is base-controlled, never checks out the PR head, and independently verifies a trusted origin.
|
|
49
|
+
- `workflow_run`: verify `github.event.workflow_run.head_repository.full_name`, the triggering workflow, and the trusted ref before allowing NAS execution.
|
|
50
|
+
- `merge_group`: keep NAS off unless the merge-queue source is explicitly verified as trusted; do not infer trust from the event name.
|
|
51
|
+
- `issue_comment`: resolve the referenced PR and verify its origin and the comment actor through the API before running any PR-controlled code; otherwise keep it hosted.
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
For a simple `pull_request` workflow whose fork checks must remain enabled on hosted runners, scope the NAS restriction to NAS routing and guard each job independently:
|
|
52
54
|
|
|
53
55
|
```yaml
|
|
54
56
|
if: >-
|
|
55
57
|
vars.CI_RUNNER != 'nas'
|
|
56
|
-
||
|
|
57
|
-
|
|
58
|
+
|| (
|
|
59
|
+
github.event_name == 'pull_request'
|
|
60
|
+
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
61
|
+
)
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
64
|
+
Never rely on a downstream job's guard to protect an unguarded dependency. Same-repository automation PRs still require an explicit trust policy; repository identity alone is not sufficient. Treat dependency-update and other bot-authored PRs as untrusted by default; keep them hosted unless their login, ref, workflow, and required approvals are explicitly allowlisted. Keep NAS routing in a base-controlled workflow or protected runner-group policy that PR changes cannot weaken. A fork-controlled workflow must not be able to select the NAS runner. Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
61
65
|
|
|
62
|
-
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write
|
|
66
|
+
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write only for the runner registration service. Store it in a root-only secret file that the job execution identity cannot read; do not expose it through the job service environment, shared workspace, process arguments, or inherited workflow variables. Set `UNSET_CONFIG_VARS=true` and verify after registration that `ACCESS_TOKEN` and registration credentials are absent from the job environment and readable files. Keep the runner service and job execution in separate identities or containers with no shared credential access. Rotate the PAT before expiry and monitor registration failures so the runner is disabled or rolled back rather than left routing jobs to a dead NAS. Add a preflight check before running downloaded or repository-controlled tooling to fail if a runner credential reached job steps. Do not print, commit, message, or substitute a short-lived registration token for a restart-persistent credential. Never reuse another repo's `/_work` or token.
|
|
63
67
|
|
|
64
|
-
Document rollback as
|
|
68
|
+
Document rollback as a reversible operation: before activation, record whether the chosen variable already exists and which workflows consume it. Prefer a migration-specific variable such as `NAS_CI_RUNNER`; if an existing variable must be reused, save its prior value and restore it instead of deleting it. Removing or changing the variable affects only new workflow runs. After rollback, identify and cancel queued or in-progress runs whose `runs-on` was already resolved to the NAS, then start replacement runs on the hosted fallback through a trusted trigger. State that the hosted fallback still depends on GitHub Actions billing being available.
|
|
65
69
|
|
|
66
70
|
6. **Provision before activation.** Confirm the target repository runner is online and has `self-hosted`, `Linux`, and the exact repo label. If there is no approved NAS access/token, stop before registration and leave the variable unset. Never create a fake runner or assume an online runner in another repo is usable.
|
|
67
71
|
|
|
68
|
-
7. **Activate and exercise the real path.**
|
|
72
|
+
7. **Activate and exercise the real path.** Before activation, inspect each affected workflow's available triggers. Use `workflow_dispatch` only when that trigger exists on the default branch and the workflow exposes the required inputs; otherwise use an existing trusted trigger on a trusted branch, or add `workflow_dispatch` before requiring a manual verification run. Dispatch or trigger each affected workflow on a trusted ref, then inspect run/job details and confirm every moved job reports the intended `runner_name`, expected runner labels, and passes. A green result on `ubuntu-latest`, a skipped job, or a successful deployment-provider status does not verify NAS execution.
|
|
69
73
|
|
|
70
74
|
8. **Recheck safety and report.** Review the final diff, validate workflow syntax, run any local lint/tests available, and inspect for unsafe fork access, missing setup, accidental secret exposure, and unintended deploy changes. Report changed workflows, moved and intentionally unmoved jobs, runner readiness, verification run URLs and runner names, rollback command, and blockers. Do not say “migrated” while registration or NAS execution remains unverified.
|
|
71
75
|
|
|
@@ -48,35 +48,39 @@ Use when asked to move Actions/CI jobs to a NAS, copy the Roazon/Funda Radar run
|
|
|
48
48
|
4. **Route through an explicit opt-in variable.** Use a repository variable such as `CI_RUNNER=nas`, with a hosted-runner fallback until activation:
|
|
49
49
|
|
|
50
50
|
```yaml
|
|
51
|
-
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || '
|
|
51
|
+
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || 'ORIGINAL_HOSTED_RUNNER' }}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Replace `ORIGINAL_HOSTED_RUNNER` with the job's exact existing hosted `runs-on` value; do not silently substitute `ubuntu-latest`. Required fork checks must remain non-skipped on the hosted fallback. If a required check cannot safely run on NAS, keep that job hosted or add a separate non-skipped required gate that blocks until the trusted check runs.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
For every job that can execute repository-controlled code on the NAS, never use `github.event_name != 'pull_request'` as a trust predicate: it treats privileged events as trusted merely because they are not `pull_request`. Choose the origin check for the actual trigger:
|
|
57
|
+
|
|
58
|
+
- `pull_request`: allow NAS only for a verified trusted origin; keep fork PRs on the hosted fallback.
|
|
59
|
+
- `pull_request_target`: keep the job hosted unless the workflow is base-controlled, never checks out the PR head, and independently verifies a trusted origin.
|
|
60
|
+
- `workflow_run`: verify `github.event.workflow_run.head_repository.full_name`, the triggering workflow, and the trusted ref before allowing NAS execution.
|
|
61
|
+
- `merge_group`: keep NAS off unless the merge-queue source is explicitly verified as trusted; do not infer trust from the event name.
|
|
62
|
+
- `issue_comment`: resolve the referenced PR and verify its origin and the comment actor through the API before running any PR-controlled code; otherwise keep it hosted.
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
For a simple `pull_request` workflow whose fork checks must remain enabled on hosted runners, scope the NAS restriction to NAS routing and guard each job independently:
|
|
63
65
|
|
|
64
66
|
```yaml
|
|
65
67
|
if: >-
|
|
66
68
|
vars.CI_RUNNER != 'nas'
|
|
67
|
-
||
|
|
68
|
-
|
|
69
|
+
|| (
|
|
70
|
+
github.event_name == 'pull_request'
|
|
71
|
+
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
72
|
+
)
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
75
|
+
Never rely on a downstream job's guard to protect an unguarded dependency. Same-repository automation PRs still require an explicit trust policy; repository identity alone is not sufficient. Treat dependency-update and other bot-authored PRs as untrusted by default; keep them hosted unless their login, ref, workflow, and required approvals are explicitly allowlisted. Keep NAS routing in a base-controlled workflow or protected runner-group policy that PR changes cannot weaken. A fork-controlled workflow must not be able to select the NAS runner. Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
72
76
|
|
|
73
|
-
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write
|
|
77
|
+
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write only for the runner registration service. Store it in a root-only secret file that the job execution identity cannot read; do not expose it through the job service environment, shared workspace, process arguments, or inherited workflow variables. Set `UNSET_CONFIG_VARS=true` and verify after registration that `ACCESS_TOKEN` and registration credentials are absent from the job environment and readable files. Keep the runner service and job execution in separate identities or containers with no shared credential access. Rotate the PAT before expiry and monitor registration failures so the runner is disabled or rolled back rather than left routing jobs to a dead NAS. Add a preflight check before running downloaded or repository-controlled tooling to fail if a runner credential reached job steps. Do not print, commit, message, or substitute a short-lived registration token for a restart-persistent credential. Never reuse another repo's `/_work` or token.
|
|
74
78
|
|
|
75
|
-
Document rollback as
|
|
79
|
+
Document rollback as a reversible operation: before activation, record whether the chosen variable already exists and which workflows consume it. Prefer a migration-specific variable such as `NAS_CI_RUNNER`; if an existing variable must be reused, save its prior value and restore it instead of deleting it. Removing or changing the variable affects only new workflow runs. After rollback, identify and cancel queued or in-progress runs whose `runs-on` was already resolved to the NAS, then start replacement runs on the hosted fallback through a trusted trigger. State that the hosted fallback still depends on GitHub Actions billing being available.
|
|
76
80
|
|
|
77
81
|
6. **Provision before activation.** Confirm the target repository runner is online and has `self-hosted`, `Linux`, and the exact repo label. If there is no approved NAS access/token, stop before registration and leave the variable unset. Never create a fake runner or assume an online runner in another repo is usable.
|
|
78
82
|
|
|
79
|
-
7. **Activate and exercise the real path.**
|
|
83
|
+
7. **Activate and exercise the real path.** Before activation, inspect each affected workflow's available triggers. Use `workflow_dispatch` only when that trigger exists on the default branch and the workflow exposes the required inputs; otherwise use an existing trusted trigger on a trusted branch, or add `workflow_dispatch` before requiring a manual verification run. Dispatch or trigger each affected workflow on a trusted ref, then inspect run/job details and confirm every moved job reports the intended `runner_name`, expected runner labels, and passes. A green result on `ubuntu-latest`, a skipped job, or a successful deployment-provider status does not verify NAS execution.
|
|
80
84
|
|
|
81
85
|
8. **Recheck safety and report.** Review the final diff, validate workflow syntax, run any local lint/tests available, and inspect for unsafe fork access, missing setup, accidental secret exposure, and unintended deploy changes. Report changed workflows, moved and intentionally unmoved jobs, runner readiness, verification run URLs and runner names, rollback command, and blockers. Do not say “migrated” while registration or NAS execution remains unverified.
|
|
82
86
|
|
|
@@ -48,35 +48,39 @@ Use when asked to move Actions/CI jobs to a NAS, copy the Roazon/Funda Radar run
|
|
|
48
48
|
4. **Route through an explicit opt-in variable.** Use a repository variable such as `CI_RUNNER=nas`, with a hosted-runner fallback until activation:
|
|
49
49
|
|
|
50
50
|
```yaml
|
|
51
|
-
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || '
|
|
51
|
+
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || 'ORIGINAL_HOSTED_RUNNER' }}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Replace `ORIGINAL_HOSTED_RUNNER` with the job's exact existing hosted `runs-on` value; do not silently substitute `ubuntu-latest`. Required fork checks must remain non-skipped on the hosted fallback. If a required check cannot safely run on NAS, keep that job hosted or add a separate non-skipped required gate that blocks until the trusted check runs.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
For every job that can execute repository-controlled code on the NAS, never use `github.event_name != 'pull_request'` as a trust predicate: it treats privileged events as trusted merely because they are not `pull_request`. Choose the origin check for the actual trigger:
|
|
57
|
+
|
|
58
|
+
- `pull_request`: allow NAS only for a verified trusted origin; keep fork PRs on the hosted fallback.
|
|
59
|
+
- `pull_request_target`: keep the job hosted unless the workflow is base-controlled, never checks out the PR head, and independently verifies a trusted origin.
|
|
60
|
+
- `workflow_run`: verify `github.event.workflow_run.head_repository.full_name`, the triggering workflow, and the trusted ref before allowing NAS execution.
|
|
61
|
+
- `merge_group`: keep NAS off unless the merge-queue source is explicitly verified as trusted; do not infer trust from the event name.
|
|
62
|
+
- `issue_comment`: resolve the referenced PR and verify its origin and the comment actor through the API before running any PR-controlled code; otherwise keep it hosted.
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
For a simple `pull_request` workflow whose fork checks must remain enabled on hosted runners, scope the NAS restriction to NAS routing and guard each job independently:
|
|
63
65
|
|
|
64
66
|
```yaml
|
|
65
67
|
if: >-
|
|
66
68
|
vars.CI_RUNNER != 'nas'
|
|
67
|
-
||
|
|
68
|
-
|
|
69
|
+
|| (
|
|
70
|
+
github.event_name == 'pull_request'
|
|
71
|
+
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
72
|
+
)
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
75
|
+
Never rely on a downstream job's guard to protect an unguarded dependency. Same-repository automation PRs still require an explicit trust policy; repository identity alone is not sufficient. Treat dependency-update and other bot-authored PRs as untrusted by default; keep them hosted unless their login, ref, workflow, and required approvals are explicitly allowlisted. Keep NAS routing in a base-controlled workflow or protected runner-group policy that PR changes cannot weaken. A fork-controlled workflow must not be able to select the NAS runner. Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
72
76
|
|
|
73
|
-
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write
|
|
77
|
+
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write only for the runner registration service. Store it in a root-only secret file that the job execution identity cannot read; do not expose it through the job service environment, shared workspace, process arguments, or inherited workflow variables. Set `UNSET_CONFIG_VARS=true` and verify after registration that `ACCESS_TOKEN` and registration credentials are absent from the job environment and readable files. Keep the runner service and job execution in separate identities or containers with no shared credential access. Rotate the PAT before expiry and monitor registration failures so the runner is disabled or rolled back rather than left routing jobs to a dead NAS. Add a preflight check before running downloaded or repository-controlled tooling to fail if a runner credential reached job steps. Do not print, commit, message, or substitute a short-lived registration token for a restart-persistent credential. Never reuse another repo's `/_work` or token.
|
|
74
78
|
|
|
75
|
-
Document rollback as
|
|
79
|
+
Document rollback as a reversible operation: before activation, record whether the chosen variable already exists and which workflows consume it. Prefer a migration-specific variable such as `NAS_CI_RUNNER`; if an existing variable must be reused, save its prior value and restore it instead of deleting it. Removing or changing the variable affects only new workflow runs. After rollback, identify and cancel queued or in-progress runs whose `runs-on` was already resolved to the NAS, then start replacement runs on the hosted fallback through a trusted trigger. State that the hosted fallback still depends on GitHub Actions billing being available.
|
|
76
80
|
|
|
77
81
|
6. **Provision before activation.** Confirm the target repository runner is online and has `self-hosted`, `Linux`, and the exact repo label. If there is no approved NAS access/token, stop before registration and leave the variable unset. Never create a fake runner or assume an online runner in another repo is usable.
|
|
78
82
|
|
|
79
|
-
7. **Activate and exercise the real path.**
|
|
83
|
+
7. **Activate and exercise the real path.** Before activation, inspect each affected workflow's available triggers. Use `workflow_dispatch` only when that trigger exists on the default branch and the workflow exposes the required inputs; otherwise use an existing trusted trigger on a trusted branch, or add `workflow_dispatch` before requiring a manual verification run. Dispatch or trigger each affected workflow on a trusted ref, then inspect run/job details and confirm every moved job reports the intended `runner_name`, expected runner labels, and passes. A green result on `ubuntu-latest`, a skipped job, or a successful deployment-provider status does not verify NAS execution.
|
|
80
84
|
|
|
81
85
|
8. **Recheck safety and report.** Review the final diff, validate workflow syntax, run any local lint/tests available, and inspect for unsafe fork access, missing setup, accidental secret exposure, and unintended deploy changes. Report changed workflows, moved and intentionally unmoved jobs, runner readiness, verification run URLs and runner names, rollback command, and blockers. Do not say “migrated” while registration or NAS execution remains unverified.
|
|
82
86
|
|
|
@@ -48,35 +48,39 @@ Use when asked to move Actions/CI jobs to a NAS, copy the Roazon/Funda Radar run
|
|
|
48
48
|
4. **Route through an explicit opt-in variable.** Use a repository variable such as `CI_RUNNER=nas`, with a hosted-runner fallback until activation:
|
|
49
49
|
|
|
50
50
|
```yaml
|
|
51
|
-
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || '
|
|
51
|
+
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || 'ORIGINAL_HOSTED_RUNNER' }}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Replace `ORIGINAL_HOSTED_RUNNER` with the job's exact existing hosted `runs-on` value; do not silently substitute `ubuntu-latest`. Required fork checks must remain non-skipped on the hosted fallback. If a required check cannot safely run on NAS, keep that job hosted or add a separate non-skipped required gate that blocks until the trusted check runs.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
For every job that can execute repository-controlled code on the NAS, never use `github.event_name != 'pull_request'` as a trust predicate: it treats privileged events as trusted merely because they are not `pull_request`. Choose the origin check for the actual trigger:
|
|
57
|
+
|
|
58
|
+
- `pull_request`: allow NAS only for a verified trusted origin; keep fork PRs on the hosted fallback.
|
|
59
|
+
- `pull_request_target`: keep the job hosted unless the workflow is base-controlled, never checks out the PR head, and independently verifies a trusted origin.
|
|
60
|
+
- `workflow_run`: verify `github.event.workflow_run.head_repository.full_name`, the triggering workflow, and the trusted ref before allowing NAS execution.
|
|
61
|
+
- `merge_group`: keep NAS off unless the merge-queue source is explicitly verified as trusted; do not infer trust from the event name.
|
|
62
|
+
- `issue_comment`: resolve the referenced PR and verify its origin and the comment actor through the API before running any PR-controlled code; otherwise keep it hosted.
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
For a simple `pull_request` workflow whose fork checks must remain enabled on hosted runners, scope the NAS restriction to NAS routing and guard each job independently:
|
|
63
65
|
|
|
64
66
|
```yaml
|
|
65
67
|
if: >-
|
|
66
68
|
vars.CI_RUNNER != 'nas'
|
|
67
|
-
||
|
|
68
|
-
|
|
69
|
+
|| (
|
|
70
|
+
github.event_name == 'pull_request'
|
|
71
|
+
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
72
|
+
)
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
75
|
+
Never rely on a downstream job's guard to protect an unguarded dependency. Same-repository automation PRs still require an explicit trust policy; repository identity alone is not sufficient. Treat dependency-update and other bot-authored PRs as untrusted by default; keep them hosted unless their login, ref, workflow, and required approvals are explicitly allowlisted. Keep NAS routing in a base-controlled workflow or protected runner-group policy that PR changes cannot weaken. A fork-controlled workflow must not be able to select the NAS runner. Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
72
76
|
|
|
73
|
-
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write
|
|
77
|
+
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write only for the runner registration service. Store it in a root-only secret file that the job execution identity cannot read; do not expose it through the job service environment, shared workspace, process arguments, or inherited workflow variables. Set `UNSET_CONFIG_VARS=true` and verify after registration that `ACCESS_TOKEN` and registration credentials are absent from the job environment and readable files. Keep the runner service and job execution in separate identities or containers with no shared credential access. Rotate the PAT before expiry and monitor registration failures so the runner is disabled or rolled back rather than left routing jobs to a dead NAS. Add a preflight check before running downloaded or repository-controlled tooling to fail if a runner credential reached job steps. Do not print, commit, message, or substitute a short-lived registration token for a restart-persistent credential. Never reuse another repo's `/_work` or token.
|
|
74
78
|
|
|
75
|
-
Document rollback as
|
|
79
|
+
Document rollback as a reversible operation: before activation, record whether the chosen variable already exists and which workflows consume it. Prefer a migration-specific variable such as `NAS_CI_RUNNER`; if an existing variable must be reused, save its prior value and restore it instead of deleting it. Removing or changing the variable affects only new workflow runs. After rollback, identify and cancel queued or in-progress runs whose `runs-on` was already resolved to the NAS, then start replacement runs on the hosted fallback through a trusted trigger. State that the hosted fallback still depends on GitHub Actions billing being available.
|
|
76
80
|
|
|
77
81
|
6. **Provision before activation.** Confirm the target repository runner is online and has `self-hosted`, `Linux`, and the exact repo label. If there is no approved NAS access/token, stop before registration and leave the variable unset. Never create a fake runner or assume an online runner in another repo is usable.
|
|
78
82
|
|
|
79
|
-
7. **Activate and exercise the real path.**
|
|
83
|
+
7. **Activate and exercise the real path.** Before activation, inspect each affected workflow's available triggers. Use `workflow_dispatch` only when that trigger exists on the default branch and the workflow exposes the required inputs; otherwise use an existing trusted trigger on a trusted branch, or add `workflow_dispatch` before requiring a manual verification run. Dispatch or trigger each affected workflow on a trusted ref, then inspect run/job details and confirm every moved job reports the intended `runner_name`, expected runner labels, and passes. A green result on `ubuntu-latest`, a skipped job, or a successful deployment-provider status does not verify NAS execution.
|
|
80
84
|
|
|
81
85
|
8. **Recheck safety and report.** Review the final diff, validate workflow syntax, run any local lint/tests available, and inspect for unsafe fork access, missing setup, accidental secret exposure, and unintended deploy changes. Report changed workflows, moved and intentionally unmoved jobs, runner readiness, verification run URLs and runner names, rollback command, and blockers. Do not say “migrated” while registration or NAS execution remains unverified.
|
|
82
86
|
|
package/package.json
CHANGED
|
@@ -47,35 +47,39 @@ Use when asked to move Actions/CI jobs to a NAS, copy the Roazon/Funda Radar run
|
|
|
47
47
|
4. **Route through an explicit opt-in variable.** Use a repository variable such as `CI_RUNNER=nas`, with a hosted-runner fallback until activation:
|
|
48
48
|
|
|
49
49
|
```yaml
|
|
50
|
-
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || '
|
|
50
|
+
runs-on: ${{ vars.CI_RUNNER == 'nas' && fromJSON('["self-hosted","linux","REPO-nas"]') || 'ORIGINAL_HOSTED_RUNNER' }}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Replace `ORIGINAL_HOSTED_RUNNER` with the job's exact existing hosted `runs-on` value; do not silently substitute `ubuntu-latest`. Required fork checks must remain non-skipped on the hosted fallback. If a required check cannot safely run on NAS, keep that job hosted or add a separate non-skipped required gate that blocks until the trusted check runs.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
For every job that can execute repository-controlled code on the NAS, never use `github.event_name != 'pull_request'` as a trust predicate: it treats privileged events as trusted merely because they are not `pull_request`. Choose the origin check for the actual trigger:
|
|
56
|
+
|
|
57
|
+
- `pull_request`: allow NAS only for a verified trusted origin; keep fork PRs on the hosted fallback.
|
|
58
|
+
- `pull_request_target`: keep the job hosted unless the workflow is base-controlled, never checks out the PR head, and independently verifies a trusted origin.
|
|
59
|
+
- `workflow_run`: verify `github.event.workflow_run.head_repository.full_name`, the triggering workflow, and the trusted ref before allowing NAS execution.
|
|
60
|
+
- `merge_group`: keep NAS off unless the merge-queue source is explicitly verified as trusted; do not infer trust from the event name.
|
|
61
|
+
- `issue_comment`: resolve the referenced PR and verify its origin and the comment actor through the API before running any PR-controlled code; otherwise keep it hosted.
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
For a simple `pull_request` workflow whose fork checks must remain enabled on hosted runners, scope the NAS restriction to NAS routing and guard each job independently:
|
|
62
64
|
|
|
63
65
|
```yaml
|
|
64
66
|
if: >-
|
|
65
67
|
vars.CI_RUNNER != 'nas'
|
|
66
|
-
||
|
|
67
|
-
|
|
68
|
+
|| (
|
|
69
|
+
github.event_name == 'pull_request'
|
|
70
|
+
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
71
|
+
)
|
|
68
72
|
```
|
|
69
73
|
|
|
70
|
-
Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
74
|
+
Never rely on a downstream job's guard to protect an unguarded dependency. Same-repository automation PRs still require an explicit trust policy; repository identity alone is not sufficient. Treat dependency-update and other bot-authored PRs as untrusted by default; keep them hosted unless their login, ref, workflow, and required approvals are explicitly allowlisted. Keep NAS routing in a base-controlled workflow or protected runner-group policy that PR changes cannot weaken. A fork-controlled workflow must not be able to select the NAS runner. Add `workflow_dispatch` to a workflow's `on:` triggers if the provisioning/verification instructions dispatch it manually. Add exact toolchain setup because runner images may not contain Node, Bun, browsers, Docker, or compatible system libraries.
|
|
71
75
|
|
|
72
|
-
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write
|
|
76
|
+
5. **Document provisioning and rollback.** Provide the target repo's exact runner name, label, container/image, dedicated work directory, ephemeral/restart settings, required tool installation, safe secret storage, and health check. For persistent `myoung34/github-runner` containers, use a narrowly scoped fine-grained PAT with repository Administration read/write only for the runner registration service. Store it in a root-only secret file that the job execution identity cannot read; do not expose it through the job service environment, shared workspace, process arguments, or inherited workflow variables. Set `UNSET_CONFIG_VARS=true` and verify after registration that `ACCESS_TOKEN` and registration credentials are absent from the job environment and readable files. Keep the runner service and job execution in separate identities or containers with no shared credential access. Rotate the PAT before expiry and monitor registration failures so the runner is disabled or rolled back rather than left routing jobs to a dead NAS. Add a preflight check before running downloaded or repository-controlled tooling to fail if a runner credential reached job steps. Do not print, commit, message, or substitute a short-lived registration token for a restart-persistent credential. Never reuse another repo's `/_work` or token.
|
|
73
77
|
|
|
74
|
-
Document rollback as
|
|
78
|
+
Document rollback as a reversible operation: before activation, record whether the chosen variable already exists and which workflows consume it. Prefer a migration-specific variable such as `NAS_CI_RUNNER`; if an existing variable must be reused, save its prior value and restore it instead of deleting it. Removing or changing the variable affects only new workflow runs. After rollback, identify and cancel queued or in-progress runs whose `runs-on` was already resolved to the NAS, then start replacement runs on the hosted fallback through a trusted trigger. State that the hosted fallback still depends on GitHub Actions billing being available.
|
|
75
79
|
|
|
76
80
|
6. **Provision before activation.** Confirm the target repository runner is online and has `self-hosted`, `Linux`, and the exact repo label. If there is no approved NAS access/token, stop before registration and leave the variable unset. Never create a fake runner or assume an online runner in another repo is usable.
|
|
77
81
|
|
|
78
|
-
7. **Activate and exercise the real path.**
|
|
82
|
+
7. **Activate and exercise the real path.** Before activation, inspect each affected workflow's available triggers. Use `workflow_dispatch` only when that trigger exists on the default branch and the workflow exposes the required inputs; otherwise use an existing trusted trigger on a trusted branch, or add `workflow_dispatch` before requiring a manual verification run. Dispatch or trigger each affected workflow on a trusted ref, then inspect run/job details and confirm every moved job reports the intended `runner_name`, expected runner labels, and passes. A green result on `ubuntu-latest`, a skipped job, or a successful deployment-provider status does not verify NAS execution.
|
|
79
83
|
|
|
80
84
|
8. **Recheck safety and report.** Review the final diff, validate workflow syntax, run any local lint/tests available, and inspect for unsafe fork access, missing setup, accidental secret exposure, and unintended deploy changes. Report changed workflows, moved and intentionally unmoved jobs, runner readiness, verification run URLs and runner names, rollback command, and blockers. Do not say “migrated” while registration or NAS execution remains unverified.
|
|
81
85
|
|