@@ -90,30 +90,21 @@ func renderErrorFindings(out *ui.UI, report *checks.Report, failedCount, checked
9090 continue
9191 }
9292
93- // Self-hosted-runner findings share the same empty dep key;
94- // render them as a deduplicated group showing affected workflows.
95- var selfHostedFindings []checks.Finding
93+ // Self-hosted-runner findings are no longer generated; render
94+ // remaining non-excluded, non-not-pinned findings directly.
9695 for _ , f := range dg .findings {
9796 if f .Category == checks .NotPinned || exclude [f .Category ] {
9897 continue
9998 }
100- if f .Category == checks .SelfHostedRunner {
101- selfHostedFindings = append (selfHostedFindings , f )
102- continue
103- }
10499 renderFindingDetail (out , f , dep )
105100 }
106- if len (selfHostedFindings ) > 0 {
107- renderSelfHostedGroup (out , selfHostedFindings )
108- }
109101 }
110102
111103 parts := []string {}
112104 for _ , cat := range []checks.Category {
113105 checks .LockfileForgery ,
114106 checks .RefChanged , checks .NotPinned , checks .OnboardingRequired ,
115107 checks .LocalAction ,
116- checks .SelfHostedRunner , checks .ExpressionRunner ,
117108 checks .Stale , checks .MisleadingSHA ,
118109 } {
119110 if n , ok := catCounts [cat ]; ok {
@@ -163,38 +154,6 @@ func renderFindingDetail(out *ui.UI, f checks.Finding, dep string) {
163154 }
164155}
165156
166- // renderSelfHostedGroup prints a deduplicated block for self-hosted-runner
167- // findings, listing each affected workflow and its non-hosted labels.
168- func renderSelfHostedGroup (out * ui.UI , findings []checks.Finding ) {
169- label := "SELF-HOSTED-RUNNER"
170- icon := "!"
171- if IsAlertedCategory (checks .SelfHostedRunner ) {
172- icon = "✗"
173- }
174- out .Detail ("%s %s" , icon , out .Dim (label ))
175- for _ , f := range findings {
176- wfName := workflowName (f .WorkflowPath )
177- out .Detail (" %s: %s" , out .Bold (wfName ), f .Detail )
178- }
179- if IsAlertedCategory (checks .SelfHostedRunner ) && findings [0 ].Remediation != "" {
180- out .Detail (" %s %s" , ui .IconWarning , findings [0 ].Remediation )
181- }
182- labelSet := map [string ]bool {}
183- for _ , f := range findings {
184- for _ , l := range extractBracketedLabels (f .Detail ) {
185- labelSet [l ] = true
186- }
187- }
188- if len (labelSet ) > 0 {
189- var labels []string
190- for l := range labelSet {
191- labels = append (labels , l )
192- }
193- sort .Strings (labels )
194- out .Detail (" ↳ re-run with --allow-runners %s or -A to allow all" , strings .Join (labels , "," ))
195- }
196- }
197-
198157// workflowName extracts the workflow filename from a path like
199158// ".github/workflows/ci.yml".
200159func workflowName (path string ) string {
@@ -204,32 +163,6 @@ func workflowName(path string) string {
204163 return path
205164}
206165
207- // extractBracketedLabels pulls comma-separated items from the first
208- // [...] group in s. Returns nil if no brackets are found.
209- // Template expressions like ${{ matrix.os }} are excluded — they can't
210- // be passed as literal --allow-runners values.
211- func extractBracketedLabels (s string ) []string {
212- start := strings .Index (s , "[" )
213- end := strings .Index (s , "]" )
214- if start < 0 || end <= start {
215- return nil
216- }
217- inner := s [start + 1 : end ]
218- var labels []string
219- for _ , l := range strings .Split (inner , "," ) {
220- l = strings .TrimSpace (l )
221- if l != "" && ! isExpression (l ) {
222- labels = append (labels , l )
223- }
224- }
225- return labels
226- }
227-
228- // isExpression reports whether s is a GitHub Actions template expression.
229- func isExpression (s string ) bool {
230- return strings .Contains (s , "${" )
231- }
232-
233166type warningGroup struct {
234167 finding checks.Finding
235168 count int
@@ -266,17 +199,13 @@ func renderWarnings(out *ui.UI, report *checks.Report, willRemediate bool) {
266199 }
267200
268201 // Triage warnings into buckets.
269- var unpinnedWorkflows , localActionWorkflows , selfHostedRunnerWorkflows , expressionRunnerWorkflows , bareSHADeps , otherDetailWarnings []string
202+ var unpinnedWorkflows , localActionWorkflows , bareSHADeps , otherDetailWarnings []string
270203 for _ , key := range warnOrder {
271204 wg := warnMap [key ]
272205 f := wg .finding
273206 switch {
274207 case f .Category == checks .LocalAction :
275208 localActionWorkflows = append (localActionWorkflows , f .WorkflowPath )
276- case f .Category == checks .SelfHostedRunner :
277- selfHostedRunnerWorkflows = append (selfHostedRunnerWorkflows , f .WorkflowPath )
278- case f .Category == checks .ExpressionRunner :
279- expressionRunnerWorkflows = append (expressionRunnerWorkflows , f .WorkflowPath )
280209 case f .Category == checks .NotPinned && f .ActionRef == nil :
281210 unpinnedWorkflows = append (unpinnedWorkflows , f .WorkflowPath )
282211 case f .Category == checks .ShaAsRef :
@@ -310,45 +239,6 @@ func renderWarnings(out *ui.UI, report *checks.Report, willRemediate bool) {
310239 sort .Strings (localNames )
311240 out .TermDetail ("↳ %s" , strings .Join (localNames , ", " ))
312241 }
313- if len (selfHostedRunnerWorkflows ) > 0 {
314- out .TermCaution ("%d %s skipped — non-hosted runner labels are not supported" ,
315- len (selfHostedRunnerWorkflows ),
316- ui .Pluralize (len (selfHostedRunnerWorkflows ), "workflow" , "workflows" ))
317- // Collect distinct labels from findings for the remediation hint.
318- labelSet := map [string ]bool {}
319- for _ , key := range warnOrder {
320- wg := warnMap [key ]
321- if wg .finding .Category != checks .SelfHostedRunner {
322- continue
323- }
324- for _ , l := range extractBracketedLabels (wg .finding .Detail ) {
325- labelSet [l ] = true
326- }
327- }
328- if len (labelSet ) > 0 {
329- var labels []string
330- for l := range labelSet {
331- labels = append (labels , l )
332- }
333- sort .Strings (labels )
334- out .TermDetail ("↳ if these are org-hosted larger runners, re-run with --allow-runners %s or -A to allow all" ,
335- strings .Join (labels , "," ))
336- } else {
337- out .TermDetail ("↳ if these are org-hosted larger runners, re-run with --allow-runners <label> or -A to allow all" )
338- }
339- }
340- if len (expressionRunnerWorkflows ) > 0 {
341- out .TermCaution ("%d %s skipped — runs-on uses expressions that can't be resolved statically" ,
342- len (expressionRunnerWorkflows ),
343- ui .Pluralize (len (expressionRunnerWorkflows ), "workflow" , "workflows" ))
344- var wfNames []string
345- for _ , p := range expressionRunnerWorkflows {
346- wfNames = append (wfNames , p )
347- }
348- sort .Strings (wfNames )
349- out .TermDetail ("↳ %s — re-run with -A (--allow-all-runners) if the matrix resolves to hosted runners" ,
350- strings .Join (wfNames , ", " ))
351- }
352242 if len (unpinnedWorkflows ) > 0 {
353243 out .TermWarn ("%d %s not yet pinned" ,
354244 len (unpinnedWorkflows ),
0 commit comments