> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# github-actions-unpinned-action

> A workflow runs a third-party action from a tag or branch instead of a commit SHA.

## What it flags

A step `uses:` or a job-level reusable workflow `uses:` that names a third-party action on a tag or branch (`pnpm/action-setup@v4`, `octo-org/shared/.github/workflows/release.yml@main`), in workflow files and composite `action.yml` files. It also flags any action on a branch, GitHub-owned ones included (`actions/checkout@main`), and `docker://` images on a tag instead of a digest. A `uses:` given as a YAML alias (`uses: *action`) is checked and reported at the alias.

## Why it matters

Whoever controls the action's repository can move a tag or branch to new code, and that code runs with the workflow's token and secrets. In March 2025 the tags of `tj-actions/changed-files` were moved to a commit that printed CI secrets into public build logs of thousands of repositories. Only a full commit SHA cannot be moved. OpenSSF Scorecard's Pinned-Dependencies check flags the same references. [GitHub docs](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions)

## How to fix it

Pin the full 40-character commit SHA and keep the version in a comment. Dependabot (`package-ecosystem: github-actions`) and Renovate read that comment and keep the SHA and version current.

```yaml theme={null}
- uses: pnpm/action-setup@<full 40-character commit SHA> # v4.1.0
```

For a `docker://` image, pin its digest: `docker://alpine@sha256:<digest>`.

## Contextual findings

GitHub-owned `actions/*` and `github/*` actions on a release tag (`actions/checkout@v4`) are contextual: only GitHub can move those tags. They are left out of the default report and shown with `--include-contextual`. The SLSA generator's reusable workflows (`slsa-framework/slsa-github-generator`) on a release tag are contextual too, because they must be called by tag to verify their own provenance.

Not flagged: full commit SHA pins (with or without a version comment), local `./` actions and workflows, digest-pinned `docker://` images, and refs built from an expression.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "github-actions-unpinned-action": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.