Skip to content

ci: add permissions and pin action SHAs (4 workflows) - #1646

Open
Alb3e3 wants to merge 2 commits into
uclouvain:masterfrom
Alb3e3:harden-ci-permissions-sha-pins
Open

ci: add permissions and pin action SHAs (4 workflows)#1646
Alb3e3 wants to merge 2 commits into
uclouvain:masterfrom
Alb3e3:harden-ci-permissions-sha-pins

Conversation

@Alb3e3

@Alb3e3 Alb3e3 commented Jun 11, 2026

Copy link
Copy Markdown

Summary

The CI workflows are missing top-level `permissions` declarations and reference actions by mutable version tags, which are supply-chain risk vectors.

Changes:

  • Add `permissions: read-all` at the workflow level for all workflows (least-privilege default)
  • Pin all third-party action references to full commit SHAs

Mutable action references (`@v4`, `@main`, etc.) allow a compromised upstream action to run arbitrary code in your CI. Pinning to a commit SHA ensures only the audited version runs.

Add `permissions: read-all` at the workflow level to enforce least-privilege
for all jobs, and pin all third-party action references to full commit SHAs
to prevent supply-chain attacks via mutable version tags or branch names.
@rouault

rouault commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

I would want to see a dependabot config like https://github.com/OSGeo/gdal/blob/master/.github/dependabot.yml to update the SHAs

@Alb3e3

Alb3e3 commented Jun 28, 2026

Copy link
Copy Markdown
Author

@rouault Done — I added a .github/dependabot.yml in 625b929 that enables the github-actions ecosystem on a monthly schedule (grouped, single PR for all actions), so Dependabot keeps the pinned SHAs updated automatically. Let me know if you'd prefer a different cadence or grouping.

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