Skip to content

Least-privilege GITHUB_TOKEN permissions #121

@atimin

Description

@atimin

Tracking parent: https://github.com/reductstore/security/issues/16
Migrated from: https://github.com/reductstore/security/issues/25

Scope

Apply least-privilege GITHUB_TOKEN permissions in this repository's GitHub Actions workflows.

Actions

  • Inventory all workflow files under .github/workflows/ and identify jobs that require write or OIDC access.
  • Set workflow-level default permissions to read-only (read-all or contents: read).
  • Remove broad top-level permissions (id-token: write, contents: write) unless strictly required.
  • Add per-job permissions: only where needed:
    • release/publish jobs: minimum required writes (for example contents: write)
    • OIDC jobs only: id-token: write
    • test/build/lint jobs: read-only token
  • Validate that PR/test workflows still pass and release/publish flows still work.

Evidence

  • Link PR(s) that implement the change.
  • Brief before/after summary of permissions scope in workflow files.

Done when

  • GITHUB_TOKEN scope is least-privilege by default and elevated only in required jobs.
  • Parent tracking issue includes link to implementation PR(s).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions