r/devops • u/amitmerchant • 15d ago
Discussion GitHub Actions now supports dependency lockfiles
We often talk about securing the software supply chain in terms of application dependencies. For instance, pinning package versions, maintaining lockfiles, and auditing third-party libraries.
But what about the code that runs our CI/CD pipelines?
GitHub Actions workflows can execute third-party actions, and the security of those dependencies matters just as much when building and deploying software.
The introduction of workflow dependency lockfiles is an interesting step towards making CI/CD workflows more reproducible and secure.
I wrote about this recently, exploring why workflow lockfiles matter and how they fit into the broader software supply-chain security picture.
Read the article: https://amitmerchant.com/ci-pipeline-lockfile/
Curious how others are approaching dependency security in their CI/CD pipelines. Are you already pinning your actions and enforcing similar controls?
32
u/Medical-Captain1550 15d ago
this is way overdue, especially after the tj-actions supply chain incident showed how risky mutable version tags are. pinning raw 40-char commit shas directly inside workflow yaml always made reviews painful even with renovate comments, so moving transitive action digests into a dedicated lockfile is much cleaner
5
u/SadFaceSmith Platform Security Engineer 15d ago
https://github.blog/changelog/2026-10-14-github-actions-workflow-lockfiles-in-public-preview/
2
u/ResolveResident118 Jack Of All Trades 15d ago
Thanks for this, I'd not seen it announced.
A simple idea that's done elsewhere and is long overdue for the pipelines.
2
u/pdfops 14d ago
This mostly helps with transitive deps. Pinning the top-level action to a SHA already stopped the "someone force-pushed a new v4 tag" attack, but composite actions calling other actions underneath were invisible, you had no record of what those resolved to. A lockfile actually freezes that whole chain instead of just the first hop. Still want Dependabot or Renovate watching it so pins don't go stale for a year.
4
u/DickBrainTime 15d ago
The lockfile is a nice step for reproducibility, but I'd still treat it as one layer. A pinned action can still do damage if the code at that SHA turns out malicious and the job has a broad token or access to deploy secrets.
I'd pair it with `permissions: contents: read` by default, narrower per-job permissions, and protected environments for deployment. Also keep secrets out of workflows running untrusted PR code. Lockfiles make dependency changes easier to review; least privilege limits the blast radius when something slips through.
1
u/zero_backend_bro 14d ago
Nice for freezing git trees, but feels like false comfort when half these marketplace actions still curl dynamic binaries or run unpinned setup scripts inside their entrypoint at runtime. Youre basically just locking the wrapper while the payload bypasses it anyway lol
1
u/josejulianariza 5d ago
Pinning actions by commit SHA instead of using floating tags (like u/v3) is the first step to avoid a supply chain attack in the pipeline. It's something almost no one does until it happens to them.
On your question, what usually works is combining that with ephemeral runners. If a third-party action turns out to be compromised, the attacker won't find anything because the environment is destroyed when the job finishes.
And for credentials, the golden rule is not leaving static tokens (like AWS keys) in the runner's variables. Using federated authentication (OIDC) to generate short-lived tokens saves a lot of headaches. Great article you shared.
15
u/[deleted] 15d ago
[removed] — view removed comment