Skip to content

chore: Pin release-please-action to full commit SHA - #27

Closed
semgrep-code-launchdarkly[bot] wants to merge 3 commits into
mainfrom
semgrep-autofix/1774017250
Closed

semgrep-code-launchdarkly[bot] wants to merge 3 commits into
mainfrom
semgrep-autofix/1774017250

Conversation

@semgrep-code-launchdarkly

@semgrep-code-launchdarkly semgrep-code-launchdarkly Bot commented Mar 20, 2026 •

Copy link
Copy Markdown

Pin the googleapis/release-please-action to a full commit SHA to mitigate supply chain attack risks.

Changes

  • Pin googleapis/release-please-action@v4 to commit SHA 7987652d64b54f048af0955c00c6c20444d67d5a
  • Add version comment (# v4) for maintainability

Why

Using a version tag like v4 means the workflow references a mutable pointer that could be changed by a bad actor who gains access to the action's repository. Pinning to the full 40-character commit SHA ensures the workflow uses an immutable reference, requiring an attacker to generate a SHA-1 collision to inject malicious code.

Semgrep Finding Details

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

@pkaeding@launchdarkly.com requested Semgrep Assistant generate this pull request to fix a finding.


⚠️ Review carefully before merging. This PR was generated by AI and may cause breaking changes or introduce new vulnerabilities.


Note

Overview
Pins googleapis/release-please-action in the release workflow to a full 40-character commit SHA (with a # v4 comment) instead of a mutable version tag like v4.

This is a supply-chain hardening change for .github/workflows/release-please.yml only; release behavior should stay the same while the action reference becomes immutable.

Reviewed by Cursor Bugbot for commit 714ff5f. Bugbot is set up for automated code reviews on this repo. Configure here.

Pin the `googleapis/release-please-action` to a full commit SHA to mitigate supply chain attack risks.

## Changes
- Pin `googleapis/release-please-action@v4` to commit SHA `7987652d64b54f048af0955c00c6c20444d67d5a`
- Add version comment (`# v4`) for maintainability

## Why
Using a version tag like `v4` means the workflow references a mutable pointer that could be changed by a bad actor who gains access to the action's repository. Pinning to the full 40-character commit SHA ensures the workflow uses an immutable reference, requiring an attacker to generate a SHA-1 collision to inject malicious code.

## Semgrep Finding Details
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

@pkaeding@launchdarkly.com requested Semgrep Assistant generate this pull request to fix [a finding](https://semgrep.dev/orgs/launchdarkly/findings/726547317).
Comment thread .github/workflows/release-please.yml Outdated

steps:
- uses: googleapis/release-please-action@v4
- uses: googleapis/release-please-action@7987652d64b54f048af0955c00c6c20444d67d5a # v4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is the same issue as the other PR. Should be 16a9c90856f42705d54a6fda1823352bdc62cf38 for the latest v4.4 release.

@jsonbailey
jsonbailey marked this pull request as ready for review October 21, 2026 19:49
@jsonbailey
jsonbailey requested a review from a team as a code owner October 21, 2026 19:49
@jsonbailey jsonbailey closed this Oct 21, 2026
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.

2 participants