Third-party actions should be pinned to a full 40-character commit SHA instead of a mutable tag or branch.
Tags and branches can move. Pinning to a commit SHA gives stronger supply-chain integrity because the workflow runs the exact action revision that was reviewed.
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
- uses: some-user/some-action@mainsteps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683Local actions are not flagged:
steps:
- uses: ./.github/actions/my-actionPin third-party actions to a reviewed full commit SHA and update intentionally through dependency automation or regular maintenance.
MEDIUM