Menu

1 / 2

Pin your GitHub Actions by commit SHA and lock workflow permissions

DEV Community: cicd·Rokkhe·3 days ago
#yvXlltZk
#devtocicd#devto#dev#github#workflow
Reading 0:00
15s threshold

This article was first published on the Rokkhe blog on Hashnode . It was drafted with AI assistance and reviewed and edited by the Rokkhe team; all commands and sources were checked against GitHub's documentation.

A hands-on hardening guide for teams that already ship on GitHub Actions. 14 November 2026, Asia/Dhaka. By the Rokkhe research team.

A tag like @v6 is convenient, and it is also movable. Anyone who can push a new commit to that tag can change the code your workflow runs the next time the tag is resolved. The same workflow often also hands the job a GITHUB_TOKEN that can write to the repository. Those two defaults — a movable pointer and a write-capable token — are what this post closes.

You will leave with three things: every uses: line pinned to a full 40-character commit SHA, a workflow that starts from read-only permissions, and a short list of pull_request_target mistakes to avoid. All of the commands below are read-first.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.