Skip to content

ci: add least-privilege permissions to workflows#553

Open
rootulp wants to merge 1 commit into
mainfrom
security/workflow-permissions
Open

ci: add least-privilege permissions to workflows#553
rootulp wants to merge 1 commit into
mainfrom
security/workflow-permissions

Conversation

@rootulp

@rootulp rootulp commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a top-level permissions: contents: read block to all three GitHub Actions workflows so the GITHUB_TOKEN is scoped to read-only. None of these workflows push commits, comment, or create releases — they only check out code and run validation — so contents: read is sufficient.

A single top-level block covers every job in a file, resolving all 7 alerts at once.

Alerts addressed

Resolves the following actions/missing-workflow-permissions (CodeQL, medium) code scanning alerts:

Closes https://github.com/celestiaorg/networks/security/code-scanning/1
Closes https://github.com/celestiaorg/networks/security/code-scanning/2
Closes https://github.com/celestiaorg/networks/security/code-scanning/3
Closes https://github.com/celestiaorg/networks/security/code-scanning/4
Closes https://github.com/celestiaorg/networks/security/code-scanning/5
Closes https://github.com/celestiaorg/networks/security/code-scanning/6
Closes https://github.com/celestiaorg/networks/security/code-scanning/7

Test plan

  • CI workflows still parse and run on this PR (pure YAML config change).

🤖 Generated with Claude Code

Declare a top-level `permissions: contents: read` block in each
workflow so the GITHUB_TOKEN is scoped to read-only. None of these
workflows push, comment, or release; they only check out code and run
validation.

Resolves the `actions/missing-workflow-permissions` CodeQL alerts
(#1-7) for validate-genesis.yml, validate-gentx.yml, and
trailing-commas.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rootulp rootulp self-assigned this Jun 8, 2026
@rootulp rootulp enabled auto-merge (squash) June 8, 2026 19:59
@rootulp rootulp requested review from sysrex and tty47 June 8, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants