Skip to content

ci: add explicit permissions to ci-package-manager#67

Merged
lumirlumir merged 1 commit into
eslint:mainfrom
Grit03:ci/ci-permissions
Jul 17, 2026
Merged

ci: add explicit permissions to ci-package-manager#67
lumirlumir merged 1 commit into
eslint:mainfrom
Grit03:ci/ci-permissions

Conversation

@Grit03

@Grit03 Grit03 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

Security hardening: this PR declares a workflow-level permissions: contents: read in ci-package-manager.yml, which currently inherits the default GITHUB_TOKEN permissions from the calling repository.

The main motivation is that the install jobs run lifecycle scripts from many third-party dependencies, so limiting the token to read-only reduces the blast radius if any of them is ever compromised.

What changes did you make? (Give an overview)

Added a workflow-level permissions block with contents: read only.

Is there anything you'd like reviewers to focus on?

I went through each job in the workflow to confirm this doesn't change any behavior:

  • actions/checkout only needs contents: read.
  • upload-artifact / download-artifact use the Actions runtime token, not GITHUB_TOKEN scopes.
  • The install jobs (npm, Yarn v1, Yarn Modern, pnpm, bun) make no GitHub API calls.

Also, since this is a reusable workflow, a called workflow can only downgrade (never elevate) the caller's token — so this effectively caps the GITHUB_TOKEN for every repository that calls it.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 17, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Grit03 / name: GyuriKim (4ebabe5)

@eslintbot eslintbot added this to Triage Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jul 17, 2026
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jul 17, 2026
@lumirlumir lumirlumir moved this from Needs Triage to Triaging in Triage Jul 17, 2026
@Grit03 Grit03 changed the title ci: add explicit workflow-level permissions to ci-package-manager ci: add explicit permissions to ci-package-manager Jul 17, 2026

@lumirlumir lumirlumir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lumirlumir
lumirlumir merged commit f3538c8 into eslint:main Jul 17, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Triaging to Complete in Triage Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion build

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants