Skip to content

CI: add explicit permissions to all workflow jobs - #67612

Merged
hxy91819 merged 1 commit into
mainfrom
fix/workflow-explicit-permissions
Apr 16, 2026
Merged

hxy91819 merged 1 commit into
mainfrom
fix/workflow-explicit-permissions

Conversation

@hxy91819

@hxy91819 hxy91819 commented Apr 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add explicit permissions declarations to all workflow jobs and workflows that lacked them
  • .github/workflows/ci.yml: added permissions: contents: read to all 19 jobs
  • .github/workflows/install-smoke.yml, sandbox-common-smoke.yml, workflow-sanity.yml: added top-level permissions: contents: read

Why

GitHub recommends that every workflow and job declare explicit permissions so the GITHUB_TOKEN scope is documented and stays narrow even if repository/organization defaults change. All affected jobs only need contents: read; no write permissions are required.

Verification

  • actionlint passes on all 4 files
  • pnpm check passes
  • CI green on this branch confirms permissions are sufficient

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Apr 16, 2026
@greptile-apps

greptile-apps Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds explicit permissions: contents: read declarations to all jobs in ci.yml (19 jobs with job-level declarations) and to the top-level of install-smoke.yml, sandbox-common-smoke.yml, and workflow-sanity.yml. The change resolves CodeQL actions/missing-workflow-permissions alerts by narrowing the GITHUB_TOKEN scope and documenting it explicitly. No workflow logic or runtime behavior is modified; all affected jobs perform only read operations, so contents: read is the correct and sufficient scope for each.

Confidence Score: 5/5

Safe to merge — no logic changes, only permission scoping additions that are correct and sufficient for every job.

All findings are informational. Every job in the four files performs read-only operations (checkout, install, build, test, lint, Docker image builds with push:false, artifact upload/download via Actions runtime token). The contents: read grants are correct and sufficient. The ci.yml top-level already had this permission, making the new job-level entries redundant but harmless and explicitly documented. The three other files were missing any top-level declaration, which this PR properly fixes.

No files require special attention.

Reviews (1): Last reviewed commit: "CI: add explicit permissions to all work..." | Re-trigger Greptile

@hxy91819

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hxy91819
hxy91819 merged commit 01b7516 into main Apr 16, 2026
51 of 53 checks passed
@hxy91819
hxy91819 deleted the fix/workflow-explicit-permissions branch April 16, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant