Skip to content

fix(build): add top-level permissions to copilot-setup-steps.yml for OpenSSF Scorecard compliance #456

@WilliamBerryiii

Description

@WilliamBerryiii

Summary

OpenSSF Scorecard alert #15 flags copilot-setup-steps.yml for having no top-level permissions: block. The workflow currently declares only contents: read at job-level on the setup job. Adding an empty or restrictive top-level permissions: block satisfies the scanner and follows the principle of least privilege.

This file was not in scope for #292 or #182, which addressed other workflow files for the same pattern.

Alert Details

  • Rule: Token-Permissions (High severity)
  • File: .github/workflows/copilot-setup-steps.yml, line 1
  • Message: "no topLevel permission defined"
  • Scanner: OpenSSF Scorecard

Proposed Fix

Add a top-level permissions block before the jobs: key:

permissions: {}

The existing job-level contents: read permission on the setup job is sufficient and overrides the restrictive top-level default.

Acceptance Criteria

  • copilot-setup-steps.yml has a top-level permissions: block
  • Copilot coding agent setup workflow continues to function correctly
  • OpenSSF Scorecard alert Add security reusable workflows #15 resolves on next scan

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    github-actionsGitHub Actions workflowssecuritySecurity-related changes or concerns

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions