From 447aede2e4082fde4ac11e03cdd01e8f77f7516e Mon Sep 17 00:00:00 2001 From: laurentsimon <64505099+laurentsimon@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:35:54 -0800 Subject: [PATCH] update (#292) Signed-off-by: laurentsimon Signed-off-by: laurentsimon --- app/server/verify_workflow.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/server/verify_workflow.go b/app/server/verify_workflow.go index 78a4ef09..ce4a9d06 100644 --- a/app/server/verify_workflow.go +++ b/app/server/verify_workflow.go @@ -31,6 +31,7 @@ var ( errNonScorecardJobHasTokenWrite = errors.New("workflow has a non-scorecard job with id-token permissions") errJobHasContainerOrServices = errors.New("job contains container or service") errScorecardJobRunsOn = errors.New("scorecard job should have exactly 1 'Ubuntu' virtual environment") + errInvalidRunnerLabel = errors.New("scorecard job has invalid runner label") errUnallowedStepName = errors.New("job has unallowed step") errScorecardJobEnvVars = errors.New("scorecard job contains env vars") errScorecardJobDefaults = errors.New("scorecard job must not have defaults set") @@ -101,7 +102,7 @@ func verifyScorecardWorkflow(workflowContent string) error { } label := labels[0].Value if _, ok := ubuntuRunners[label]; !ok { - return fmt.Errorf("%w", errScorecardJobRunsOn) + return fmt.Errorf("%w: '%s'", errInvalidRunnerLabel, label) } // Verify that there are no job env vars set.