Skip to content

Pin all third-party actions to commit SHAs#838

Open
bschwedler wants to merge 1 commit intomainfrom
security/sha-pin-actions
Open

Pin all third-party actions to commit SHAs#838
bschwedler wants to merge 1 commit intomainfrom
security/sha-pin-actions

Conversation

@bschwedler
Copy link
Copy Markdown
Contributor

@bschwedler bschwedler commented Apr 13, 2026

Summary

  • Pin every external action to its full-length commit SHA with a version comment
  • Eliminates mutable tag refs, including @master on aws-actions/configure-aws-credentials
  • Added Zizmor static analysis (https://docs.zizmor.sh/) to catch any future un-pinned action versions
  • Dependabot (configured in Use directory globs in dependabot config #836) will keep these updated

Version upgrades

Action Before After
actions/checkout @v4 v6.0.2
actions/create-github-app-token @v2 / @v3 v3.1.1
actions/setup-python @v5 v6.2.0
aws-actions/configure-aws-credentials @master v6.1.0
azure/setup-helm @v4 v5.0.0
extractions/setup-just @v2 v4
peter-evans/create-pull-request @v6 (chart-rebuild) v6.1.0
slackapi/slack-github-action @v1.27.0 v3.0.1

Test plan

  • CI passes on this PR
  • Verify slackapi/slack-github-action v3 payload format is compatible (v1 → v3 is a major bump)
  • Verify azure/setup-helm v5 works (v4 → v5)
  • Verify actions/setup-python v6 works (v5 → v6)

@bschwedler bschwedler requested review from a team, GCRev and zachhannum as code owners April 13, 2026 18:02
@bschwedler bschwedler requested review from CDRayn and nodivbyzero and removed request for a team April 13, 2026 18:02
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 13, 2026

CLA assistant check
All committers have signed the CLA.

@bschwedler bschwedler force-pushed the security/sha-pin-actions branch from 6bb5a29 to b010ac7 Compare April 13, 2026 18:04
@bschwedler bschwedler changed the base branch from posit-images to main April 13, 2026 18:05
@bschwedler bschwedler force-pushed the security/sha-pin-actions branch from b010ac7 to c9e47aa Compare April 13, 2026 18:05
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread .github/workflows/chart-doc.yaml Fixed
Comment thread .github/workflows/chart-doc.yaml Fixed
Comment thread .github/workflows/chart-test.yaml Fixed
Comment thread .github/workflows/product-release.yml Fixed
Comment thread .github/workflows/publish.yml Fixed
Comment thread .github/workflows/chart-doc.yaml Fixed
Comment thread .github/workflows/chart-doc.yaml Fixed
Comment thread .github/workflows/chart-test.yaml Fixed
Comment thread .github/workflows/product-release.yml Fixed
Comment thread .github/workflows/publish.yml Fixed
@bschwedler bschwedler force-pushed the security/sha-pin-actions branch 2 times, most recently from 1a36cca to 36a98f4 Compare April 13, 2026 18:17
Pin every external action to its full-length commit SHA with
a version comment. Mutable tag refs (including @master on
aws-actions/configure-aws-credentials) are a supply-chain
risk — a compromised tag silently changes the code that runs.

Add zizmor static analysis to chart-test.yaml with SARIF
upload to the Security tab. SARIF upload is conditional on
non-fork context; fork PRs still run zizmor as a pass/fail
check.

Version upgrades included:
- actions/checkout v4 → v6.0.2
- actions/create-github-app-token v2 → v3.1.1
- actions/setup-python v5 → v6.2.0
- aws-actions/configure-aws-credentials @master → v6.1.0
- azure/setup-helm v4 → v5.0.0
- extractions/setup-just v2 → v4
- peter-evans/create-pull-request v6 → v6.1.0 (chart-rebuild)
- slackapi/slack-github-action v1.27.0 → v3.0.1

Dependabot (configured in #836) will keep these updated.
@bschwedler bschwedler force-pushed the security/sha-pin-actions branch from 36a98f4 to 2f990b6 Compare April 13, 2026 18:18
Copy link
Copy Markdown
Contributor

@GCRev GCRev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is there more context for this change like you noticed something started failing, or it's a security problem to use the plain version tags?

@zachhannum
Copy link
Copy Markdown
Contributor

LGTM. Is there more context for this change like you noticed something started failing, or it's a security problem to use the plain version tags?

It's a supply chain risk. Using the full-length commit SHA is actually Github's own recommendation: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions

run: |
just test-connect-interpreter-versions

zizmor:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this about?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zizmor is for static analysis for GitHub Actions: https://docs.zizmor.sh/

I added it to this PR so that it will flag any actions that are not pinned to a sha. I'll update the PR description to have more context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are exploring similar work in Connect and discovered there is a repo setting that can enforce SHA pinning.

Settings > Actions > General > Require all Actions to use a SHA

Per the docs "When you enable Require actions to be pinned to a full-length commit SHA, all actions must be pinned to a full-length commit SHA to be used."

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants