From 214036e606f7d4a70056f149162f91b7dfdaef97 Mon Sep 17 00:00:00 2001 From: Stephen Augustus Date: Thu, 4 May 2023 20:08:45 -0400 Subject: [PATCH] workflow-templates: Correct filename for OpenSSF Scorecard Scorecard is not pluralized. ref: https://github.com/ossf/scorecard/issues/2427 Signed-off-by: Stephen Augustus --- README.md | 2 +- remediation/workflow/addworkflow.go | 4 ++-- remediation/workflow/addworkflow_test.go | 2 +- .../{expected-scorecards.yml => expected-scorecard.yml} | 0 workflow-templates/{scorecards.yml => scorecard.yml} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename testfiles/addworkflow/{expected-scorecards.yml => expected-scorecard.yml} (100%) rename workflow-templates/{scorecards.yml => scorecard.yml} (100%) diff --git a/README.md b/README.md index 585f61e5..a775396c 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ Secure-Repo has a [workflow-templates](https://github.com/step-security/secure-r Before the fix, you do not have a OpenSSF Scorecard workflow. -After the fix, a `scorecards.yml` GitHub Actions workflow gets added to your project. +After the fix, a `scorecard.yml` GitHub Actions workflow gets added to your project. **Pull request example**: https://github.com/microsoft/CLRInstrumentationEngine/pull/527 diff --git a/remediation/workflow/addworkflow.go b/remediation/workflow/addworkflow.go index 735f5588..41ee4364 100644 --- a/remediation/workflow/addworkflow.go +++ b/remediation/workflow/addworkflow.go @@ -12,7 +12,7 @@ import ( const ( CodeQLWorkflowFileName = "codeql.yml" DependencyReviewFileName = "dependency-review.yml" - ScorecardFileName = "scorecards.yml" + ScorecardFileName = "scorecard.yml" CodeQL = "CodeQL" DependencyReview = "Dependency-review" Scorecard = "Scorecard" @@ -70,4 +70,4 @@ func AddWorkflow(name string, workflowParameters WorkflowParameters) (string, er } else { return "", fmt.Errorf("match for %s Workflow name not found", name) } -} \ No newline at end of file +} diff --git a/remediation/workflow/addworkflow_test.go b/remediation/workflow/addworkflow_test.go index 34d195ef..c840884a 100644 --- a/remediation/workflow/addworkflow_test.go +++ b/remediation/workflow/addworkflow_test.go @@ -43,7 +43,7 @@ func Test_AddWorkflow(t *testing.T) { DefaultBranch: "main", }, expectedError: false, - expectedOutputFile: "../../testfiles/addworkflow/expected-scorecards.yml", + expectedOutputFile: "../../testfiles/addworkflow/expected-scorecard.yml", }, } diff --git a/testfiles/addworkflow/expected-scorecards.yml b/testfiles/addworkflow/expected-scorecard.yml similarity index 100% rename from testfiles/addworkflow/expected-scorecards.yml rename to testfiles/addworkflow/expected-scorecard.yml diff --git a/workflow-templates/scorecards.yml b/workflow-templates/scorecard.yml similarity index 100% rename from workflow-templates/scorecards.yml rename to workflow-templates/scorecard.yml