Naked GitHub Actions SHA digest updates resolve to default branch HEAD instead of pinned branch #42245
-
How are you running Renovate?Self-hosted Renovate CLI Which platform you running Renovate on?GitHub.com Which version of Renovate are you using?43.100.1 Please tell us more about your question or problemWhen a GitHub Actions steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9Renovate proposes updating the digest to the latest commit on the default branch (main) of the action's repository, regardless of which branch the original SHA belongs to. This is especially harmful when the SHA is from a non-default branch; the pin gets silently migrated to an unrelated main commit. This arguably may be expected behavior, but at the very least, it does not seem to be mentioned in the documentation relevant documentation. MRE
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"]
}
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
# Case 1: SHA from releases/v2 (NOT an ancestor of main).
# Renovate should not touch this, but it will propose updating
# the digest to HEAD of main (a completely unrelated commit).
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
# Case 2: Stale SHA from main (not HEAD).
# Renovate will propose updating to current HEAD of main.
- uses: actions/checkout@033fa0dc0b82693d8986f1016a0ec2c5e7d9cbb1Logs (if relevant)Logs |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
I would expect naked SHA pins to receive Happy to create a fix PR if this is indeed a bug. Came across this during development of #41683 |
Beta Was this translation helpful? Give feedback.
-
|
This was fixed (following the disabled approach) in #42398 |
Beta Was this translation helpful? Give feedback.
This was fixed (following the disabled approach) in #42398