Skip to content

ci: declare contents:read on lint workflow#250

Merged
theory merged 1 commit into
ClickHouse:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777384-8
May 19, 2026
Merged

ci: declare contents:read on lint workflow#250
theory merged 1 commit into
ClickHouse:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777384-8

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Adds a workflow-level permissions: contents: read. The job checks out the repo and runs the linter / format checker; nothing here calls a GitHub API beyond the initial checkout, and the action surfaces failures as the workflow's own check status.

This is supply-chain hygiene anchored in CVE-2025-30066 - the March 2025 tj-actions/changed-files compromise - where a tampered third-party action read GITHUB_TOKEN out of workflow logs and the blast radius equalled whatever scope was issued. Pinning per workflow caps that runtime authority irrespective of the repo or org default, gives drift protection if the default ever widens, and is what OpenSSF Scorecard's Token-Permissions check credits. Small files like this one are the easy place to start the org-wide hygiene work.

YAML validated locally with yaml.safe_load.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 14, 2026

CLA assistant check
All committers have signed the CLA.

@theory theory self-assigned this May 14, 2026
@theory theory added the workflow Improvements or changes to build pipelines. label May 14, 2026
@theory theory force-pushed the chore/declare-workflow-perms-1778777384-8 branch from 2a691e3 to b7ff715 Compare May 18, 2026 22:33
Signed-off-by: David E. Wheeler <david.wheeler@clickhouse.com>
@theory theory force-pushed the chore/declare-workflow-perms-1778777384-8 branch from b7ff715 to ac9625e Compare May 18, 2026 22:34
@theory
Copy link
Copy Markdown
Collaborator

theory commented May 19, 2026

Thank you!

@theory theory merged commit ac9625e into ClickHouse:main May 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow Improvements or changes to build pipelines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants