Skip to content

chore: Pin haskell-actions/setup to full commit SHA#19

Merged
pkaeding merged 2 commits into
mainfrom
semgrep-autofix/1774011639
Mar 27, 2026
Merged

chore: Pin haskell-actions/setup to full commit SHA#19
pkaeding merged 2 commits into
mainfrom
semgrep-autofix/1774011639

Conversation

@semgrep-code-launchdarkly
Copy link
Copy Markdown

Pin third-party GitHub Action to a full commit SHA for improved supply chain security.

Changes

  • Replace haskell-actions/setup@v2 with haskell-actions/setup@ec49483bfc012387b227434aba37f03a6e8ba9ed
  • Add version comment (# v2) to maintain visibility of the intended version

Why

Pinning to a full commit SHA is the only way to use a GitHub Action as an immutable release. Version tags like v2 can be moved by repository maintainers, potentially introducing malicious code. A full SHA pin ensures the exact same code runs on every workflow execution, mitigating supply chain attacks since an attacker would need to generate a SHA-1 collision for a valid Git object payload.

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.

Pin third-party GitHub Action to a full commit SHA for improved supply chain security.

## Changes
- Replace `haskell-actions/setup@v2` with `haskell-actions/setup@ec49483bfc012387b227434aba37f03a6e8ba9ed`
- Add version comment (`# v2`) to maintain visibility of the intended version

## Why
Pinning to a full commit SHA is the only way to use a GitHub Action as an immutable release. Version tags like `v2` can be moved by repository maintainers, potentially introducing malicious code. A full SHA pin ensures the exact same code runs on every workflow execution, mitigating supply chain attacks since an attacker would need to generate a SHA-1 collision for a valid Git object payload.

## 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/726904704).
Comment thread .github/workflows/ci.yml Outdated
@keelerm84 keelerm84 changed the title ci: Pin haskell-actions/setup to full commit SHA chore: Pin haskell-actions/setup to full commit SHA Mar 20, 2026
@keelerm84 keelerm84 marked this pull request as ready for review March 23, 2026 13:24
@keelerm84 keelerm84 requested a review from a team as a code owner March 23, 2026 13:24
@pkaeding pkaeding merged commit 8432364 into main Mar 27, 2026
3 checks passed
@pkaeding pkaeding deleted the semgrep-autofix/1774011639 branch March 27, 2026 01:42
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