Skip to content

Commit a46aa65

Browse files
[actions] Update GitHub Actions versions - 2026-04-12 (#25935)
1 parent bf4d0bb commit a46aa65

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/aw/actions-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@
173173
"version": "v2.2.0",
174174
"sha": "0c5077e51419868618aeaa5fe8019c62421857d6"
175175
},
176-
"ruby/setup-ruby@v1.300.0": {
176+
"ruby/setup-ruby@v1.301.0": {
177177
"repo": "ruby/setup-ruby",
178-
"version": "v1.300.0",
179-
"sha": "e65c17d16e57e481586a6a5a0282698790062f92"
178+
"version": "v1.301.0",
179+
"sha": "4c56a21280b36d862b5fc31348f463d60bdc55d5"
180180
},
181181
"super-linter/super-linter@v8.6.0": {
182182
"repo": "super-linter/super-linter",

pkg/workflow/data/action_pins.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@
173173
"version": "v2.2.0",
174174
"sha": "0c5077e51419868618aeaa5fe8019c62421857d6"
175175
},
176-
"ruby/setup-ruby@v1.300.0": {
176+
"ruby/setup-ruby@v1.301.0": {
177177
"repo": "ruby/setup-ruby",
178-
"version": "v1.300.0",
179-
"sha": "e65c17d16e57e481586a6a5a0282698790062f92"
178+
"version": "v1.301.0",
179+
"sha": "4c56a21280b36d862b5fc31348f463d60bdc55d5"
180180
},
181181
"super-linter/super-linter@v8.6.0": {
182182
"repo": "super-linter/super-linter",

pkg/workflow/safe_update_enforcement.go

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,23 @@ var ghAwActionPrefixes = []string{
116116
"github/gh-aw-actions/",
117117
}
118118

119+
// runtimeActionRepos is the set of action repos used by the runtime manager.
120+
// These are populated from knownRuntimes at init time so the trusted-action
121+
// list stays in sync with runtime_definitions.go automatically.
122+
var runtimeActionRepos map[string]bool
123+
124+
func init() {
125+
runtimeActionRepos = make(map[string]bool, len(knownRuntimes))
126+
for _, rt := range knownRuntimes {
127+
if rt.ActionRepo != "" {
128+
runtimeActionRepos[rt.ActionRepo] = true
129+
}
130+
}
131+
}
132+
119133
// isTrustedActionRepo reports whether a repo string belongs to a trusted org or project.
120-
// Trusted repos include the "actions/" GitHub org and gh-aw's own infrastructure actions.
134+
// Trusted repos include the "actions/" GitHub org, gh-aw's own infrastructure actions,
135+
// and actions used by the runtime manager (e.g. ruby/setup-ruby, oven-sh/setup-bun).
121136
func isTrustedActionRepo(repo string) bool {
122137
if strings.HasPrefix(repo, githubActionsOrg+"/") {
123138
return true
@@ -127,15 +142,15 @@ func isTrustedActionRepo(repo string) bool {
127142
return true
128143
}
129144
}
130-
return false
145+
return runtimeActionRepos[repo]
131146
}
132147

133148
// collectActionViolations compares the new action refs against the previous manifest
134149
// and returns two sorted slices: repos that were added and repos that were removed.
135150
// The comparison uses the action repo as the key, so SHA/version changes to an
136151
// already-approved repo are not flagged.
137-
// Actions belonging to the "actions/" GitHub org and gh-aw infrastructure repos are
138-
// always trusted and never flagged.
152+
// Actions belonging to the "actions/" GitHub org, gh-aw infrastructure repos, and
153+
// runtime manager repos are always trusted and never flagged.
139154
func collectActionViolations(manifest *GHAWManifest, actionRefs []string) (added []string, removed []string) {
140155
// Build known repo set from previous manifest.
141156
knownRepos := make(map[string]bool, len(manifest.Actions))
@@ -151,7 +166,7 @@ func collectActionViolations(manifest *GHAWManifest, actionRefs []string) (added
151166
}
152167

153168
// Find additions: repos present in the new compilation but absent from the manifest.
154-
// Trusted actions (actions/ org, gh-aw infrastructure) are always allowed and never flagged.
169+
// Trusted actions (actions/ org, gh-aw infrastructure, runtime manager) are always allowed and never flagged.
155170
for repo := range newRepos {
156171
if isTrustedActionRepo(repo) {
157172
continue
@@ -162,7 +177,7 @@ func collectActionViolations(manifest *GHAWManifest, actionRefs []string) (added
162177
}
163178

164179
// Find removals: repos present in the previous manifest but absent from the new compilation.
165-
// Trusted actions (actions/ org, gh-aw infrastructure) are always allowed, so their removal is not flagged.
180+
// Trusted actions (actions/ org, gh-aw infrastructure, runtime manager) are always allowed, so their removal is not flagged.
166181
for repo := range knownRepos {
167182
if isTrustedActionRepo(repo) {
168183
continue

0 commit comments

Comments
 (0)