Skip to content

Pin GitHub Actions to full-length commit SHAs - #36599

Open
Dan Fiedler (danfiedler-msft) wants to merge 1 commit into
microsoft:masterfrom
danfiedler-msft:danfiedler/pin-actions
Open

Pin GitHub Actions to full-length commit SHAs#36599
Dan Fiedler (danfiedler-msft) wants to merge 1 commit into
microsoft:masterfrom
danfiedler-msft:danfiedler/pin-actions

Conversation

@danfiedler-msft

Copy link
Copy Markdown

Summary

This PR pins GitHub Actions to full-length commit SHAs for improved security and reproducibility and adds a 7 day cooldown to Dependabot configuration for GitHub Actions. This work is described in more detail at https://aka.ms/action-pinning.

Why?

Pinning actions to commit SHAs prevents supply-chain attacks where a tag could be moved to point to malicious code. This is a recommended security best practice per the GitHub Actions security hardening guide.

This change mitigates the risk of tag retargeting to malicious code as seen in incidents like the tj-actions/changed-files action compromise or codfish/semantic-release-action compromise and improves the integrity and reproducibility of the CI/CD pipeline.

What changed?

Action pinning: Third-party action references in .github/workflows/ that used mutable tag-based references (e.g., actions/checkout@v4) have been updated to full-length commit SHAs with a version comment (e.g., actions/checkout@<sha> # v4) using the pinact tool. References that were already pinned to a SHA, or that used immutable release tags, were left unchanged.

Dependabot configuration: .github/dependabot.yml has been updated to ensure a github-actions package-ecosystem section is present with a cooldown configuration (default-days: 7). If the file did not exist, it was created. If a github-actions section already existed, only the cooldown block was added or its default-days value was increased to 7 if it was lower. The 7-day cooldown provides a window for the community to detect and report compromised releases before they are automatically proposed as updates, reducing exposure to supply-chain attacks via newly published malicious versions.

Is this safe to merge?

Yes. The pinned SHAs correspond to the same commits that the existing tags pointed to. No behavioral changes in action execution are introduced. You can verify the pinned SHA value using the GitHub REST API (e.g., the commit hash for actions/checkout@v7 can be found in the sha property in the JSON response for GET https://api.github.com/repos/actions/checkout/commits/v7).

Additional Information

For more information, please see https://aka.ms/action-pinning

@danfiedler-msft
Dan Fiedler (danfiedler-msft) requested a review from a team as a code owner August 19, 2026 18:02
@github-actions github-actions Bot added the CI label Aug 19, 2026
@github-actions

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@@ -29,11 +29,11 @@ inputs:
runs:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask - RTL.normal.chromium.png 6 Changed
vr-tests-react-components/CalendarCompat 5 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 7682 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 1975 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 8024 Changed
vr-tests-react-components/CalendarCompat.multiDayView - RTL.default.chromium.png 1843 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 1981 Changed
vr-tests-react-components/Charts-DonutChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 796961 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 831459 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 796909 Changed
vr-tests-react-components/DatePicker Compat 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/DatePicker Compat.default - Dark Mode.rest.chromium.png 371 Changed
vr-tests-react-components/DatePicker Compat.default - High Contrast.rest.chromium.png 443 Changed
vr-tests-react-components/DatePicker Compat.default.rest.chromium.png 311 Changed
vr-tests-react-components/Field 11 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Field.Combobox+horizontal.default.chromium.png 6024 Changed
vr-tests-react-components/Field.Dropdown+horizontal.default.chromium.png 6002 Changed
vr-tests-react-components/Field.Combobox.default.chromium.png 3608 Changed
vr-tests-react-components/Field.Input+horizontal.default.chromium.png 5610 Changed
vr-tests-react-components/Field.Dropdown.default.chromium.png 3582 Changed
vr-tests-react-components/Field.Textarea+horizontal.default.chromium.png 2696 Changed
vr-tests-react-components/Field.Select+horizontal.default.chromium.png 5924 Changed
vr-tests-react-components/Field.size-small.default.chromium.png 3841 Changed
vr-tests-react-components/Field.Select.default.chromium.png 3208 Changed
vr-tests-react-components/Field.size-large.default.chromium.png 3841 Changed
vr-tests-react-components/Field.Textarea.default.chromium.png 3543 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/MessageBar 6 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/MessageBar.Auto.default.chromium.png 17 Changed
vr-tests-react-components/MessageBar.Multiline Without Actions.default.chromium.png 70 Changed
vr-tests-react-components/MessageBar.Multiline.default.chromium.png 70 Changed
vr-tests-react-components/MessageBar.Square.default.chromium.png 17 Changed
vr-tests-react-components/MessageBar.Intents.default.chromium.png 70 Changed
vr-tests-react-components/MessageBar.Multiline No Actions.default.chromium.png 70 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 498 Changed
vr-tests-react-components/Positioning.Positioning end.chromium.png 880 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 25 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 31 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 26 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with rectangle - Dark Mode.default.chromium.png 6 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png 1319 Changed
vr-tests/Callout 14 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Bottom center.default.chromium.png 2128 Changed
vr-tests/Callout.Beak 25.default.chromium.png 2198 Changed
vr-tests/Callout.Left top edge.default.chromium.png 2183 Changed
vr-tests/Callout.Bottom right edge - RTL.default.chromium.png 1124 Changed
vr-tests/Callout.Left bottom edge.default.chromium.png 3182 Changed
vr-tests/Callout.Gap space 25.default.chromium.png 2195 Changed
vr-tests/Callout.Rendering callout attached to a rectangle.default.chromium.png 1835 Changed
vr-tests/Callout.No beak.default.chromium.png 2192 Changed
vr-tests/Callout.Right bottom edge.default.chromium.png 3095 Changed
vr-tests/Callout.Right top edge.default.chromium.png 1126 Changed
vr-tests/Callout.Root.default.chromium.png 2195 Changed
vr-tests/Callout.Top left edge.default.chromium.png 2212 Changed
vr-tests/Callout.Top center.default.chromium.png 2127 Changed
vr-tests/Callout.Top right edge.default.chromium.png 1146 Changed
vr-tests/react-charting-AreaChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-AreaChart.Custom Accessibility.default.chromium.png 11 Changed
vr-tests/react-charting-LineChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-LineChart.Multiple.default.chromium.png 192 Changed
vr-tests/react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png 3 Changed

There were 10 duplicate changes discarded. Check the build logs for more information.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant