Skip to content

Use Commit Hashes to Version Reusable Github Actions Tasks #165

Closed

Description

@sarina

In response to https://www.bleepingcomputer.com/news/security/supply-chain-attack-on-popular-github-action-exposes-ci-cd-secrets/ we should move to pinning GitHub Action versions by commit hash.

Some resources:

Activity

  1. changed the title [-]GHA version by commit hash[/-] [+]Use Commit Hashes to Version Reusable Github Actions Tasks[/+] on Mar 20, 2025
  2. added
    securityRelates to improving to the security posture of the platform
    on Mar 20, 2025
  3. moved this to Todo in Maintenanceon Mar 20, 2025
  4. moved this from 🆕 New to 📋 Backlog in Aximprovements Teamon Jan 7, 2026
  5. self-assigned this
    on Jan 7, 2026
  6. arbrandes commented on Feb 19, 2026

    @arbrandes

    @farhan, have you been able to look into this at all, yet?

  7. farhan commented on Feb 20, 2026

    @farhan

    @arbrandes We tried https://github.com/suzuki-shunsuke/pinact, it's working fine
    How can we run it in all the repositories, this what we were discussing yesterday
    We are on the edge of getting relax from the XBlock extraction work, we have prioritize it as next.

  8. moved this from 📋 Backlog to 🔖 Ready in Aximprovements Teamon Mar 11, 2026
  9. moved this from 🔖 Ready to 🏗 In progress in Aximprovements Teamon May 5, 2026
  10. irfanuddinahmad commented on May 5, 2026

    @irfanuddinahmad
    Contributor

    Dependabot alone is not a strict enforcement mechanism for SHA pinning. It is excellent for ongoing updates, but it does not by itself guarantee that repos using tag-based uses: refs will automatically move to SHA-pinned refs in the next PR.

    Proposed path forward:

    1. One-time baseline migration to SHA-pinned action refs
      Convert workflow uses: references from tags to full commit SHA with a human-readable version comment.
      Example format:
      uses: actions/checkout@<40-char-sha> # vX.Y.Z
    2. Keep Dependabot for ongoing maintenance
      Continue weekly github-actions updates in repos.
      After the baseline is SHA-pinned, Dependabot can keep SHA + comment updated over time.
    3. Add enforcement so tags cannot be reintroduced
      Add a required CI check (for example pinact run --check or equivalent policy check) that fails if external actions are not pinned to full SHA. This provides durable protection against future drift back to tags.
    4. Optional platform guardrail
      If available in org settings, enable GitHub Actions policy requiring full-length commit SHA pinning for actions.
  11. 15 remaining items

  12. reopened this on Jun 1, 2026
  13. moved this from ✅ Done to 🏗 In progress in Aximprovements Teamon Jun 1, 2026
  14. moved this from Done to In Progress in Maintenanceon Jun 1, 2026
  15. feanil commented on Jun 1, 2026

    @feanil
    Contributor

    @farhan @irfanuddinahmad I've merged everything that doesn't need an update here. Please take a look at the rest of the open PRs and let me know when they're ready for another pass/merging.

  16. moved this from 🏗 In progress to 👀 In review in Aximprovements Teamon Jun 2, 2026
  17. irfanuddinahmad commented on Jun 2, 2026

    @irfanuddinahmad
    Contributor

    @farhan @irfanuddinahmad I've merged everything that doesn't need an update here. Please take a look at the rest of the open PRs and let me know when they're ready for another pass/merging.

    @feanil @farhan --- Following PRs have been updated with fixes

    openedx/edx-django-utils#536
    openedx/enmerkar-underscore#246
    openedx/edx-val#610
    openedx/tutor-contrib-aspects-sample#2
    openedx/enterprise-catalog#1134
    openedx/frontend-enterprise#499

    Following has a pre-existing failure on main:

    openedx/edx-cookiecutters#568 — tests (py) job failing but it's a pre-existing failure on main, not caused by this PR. run_ida_tests passes.

    Fix on main: openedx/edx-cookiecutters#569

  18. moved this from 👀 In review to 🏗 In progress in Aximprovements Teamon Jun 11, 2026
  19. moved this from 🏗 In progress to 👀 In review in Aximprovements Teamon Jun 11, 2026
  20. pomegranited commented on Jun 19, 2026

    @pomegranited

    Hi @irfanuddinahmad Thank you for working on this issue!

    Can you help me understand how this changes our review process for the automated dependabot updates? I can see that we're getting SHA commit hashes now instead of version tags, e.g. openedx/completion#438. But do I (as a core committer) need to validate this update differently than I was before?

  21. irfanuddinahmad commented on Jun 19, 2026

    @irfanuddinahmad
    Contributor

    Hi @pomegranited! Great question — the short answer is: the review process is largely the same, but here's what's different to be aware of.

    What changed in the workflow YAML

    References that used to look like:

    uses: actions/[email protected]

    now look like:

    uses: actions/[email protected]  # v4.2.2

    The human-readable version tag is preserved as a comment, so you can still see at a glance what version is being used.

    What Dependabot PRs look like now

    Dependabot understands SHA-pinned refs and will continue to open PRs when a new version is available. The PR title/description will still tell you the version change (e.g. "bump codecov/codecov-action from 6.0.1 to 7.0.0"), and the diff will show the old SHA being replaced by the new SHA + updated version comment. You can see an example at openedx/completion#438.

    As a core committer, your review doesn't change much:

    • Still rely on Dependabot's PR title and release notes for the version change info
    • The # vX.Y.Z comment in the diff confirms the version at a glance
    • If anything looks off (e.g. the comment version doesn't match the PR title), that's worth investigating

    The main benefit to you is actually more confidence — because the SHA is cryptographically bound to the exact code that will run, a tag re-pointing attack (where a maintainer silently moves a tag to different code) is no longer possible.

  22. moved this from 👀 In review to ✅ Done in Aximprovements Teamon Jun 22, 2026
  23. moved this from In Progress to Done in Maintenanceon Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

securityRelates to improving to the security posture of the platform

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions