Skip to content

[CI] Scope workflow permissions and secret inheritance #49729

Description

@thisisnic

Describe the enhancement

Some workflows use overly broad permissions or pass all secrets to called workflows via secrets: inherit. These should be tightened to follow the principle of least privilege.

Permissions

  • .github/workflows/package_linux.yml has contents: write at the workflow level — this should be scoped to the specific job that needs it.

Secret inheritance

The following workflows pass all secrets to reusable workflows via secrets: inherit instead of explicitly listing required secrets:

  • .github/workflows/cpp_extra.yml (2 instances)
  • .github/workflows/cuda_extra.yml (2 instances)
  • .github/workflows/package_linux.yml (2 instances)
  • .github/workflows/python.yml
  • .github/workflows/r.yml

Component(s)

Continuous Integration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions