dependabot / dependabot/dependabot-core
Version comment in SHA-pinned github actions is not updated if it's incorrect
- Dominant language
- Ruby
- Stars
- 5.8k
- Forks
- 1.5k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 149
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Package ecosystem
github-actions
### Package manager version
_No response_
### Language version
_No response_
### Manifest location and content before the Dependabot update
```yaml
name: Test dependabot updates
on:
push:
tags: ['v*']
jobs:
build:
name: Test
runs-on: ubuntu-22.04
steps:
# this is simply an outdated version
- uses: docker/setup-buildx-action@2e941f2defb78a11da0f277a3a76fb347dfd084b # v1.4.0
# this is also an outdated version, but within the same major
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
# this is an outdated version and the version comment behind it is incorrect (the SHA is from v3.2.4)
- uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.4.5
```
### dependabot.yml content
```yaml
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
groups:
github-actions:
patterns: ['*']
```
### Updated dependency
_No response_
### What you expected to see, versus what you actually saw
I would have expected the comment to be updated, regardless of the fact that it was incorrect before.
Here's the PR Dependabot sent: ThiefMaster/depbot-actions-bug#1
### Native package manager behavior
_No response_
### Images of the diff or a link to the PR, issue, or logs
ThiefMaster/depbot-actions-bug#1
```diff
diff --git a/.github/workflows/deptest.yml b/.github/workflows/deptest.yml
index be6927d..6712003 100644
--- a/.github/workflows/deptest.yml
+++ b/.github/workflows/deptest.yml
@@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
# this is simply an outdated version
- - uses: docker/setup-buildx-action@2e941f2defb78a11da0f277a3a76fb347dfd084b # v1.4.0
+ - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
# this is also an outdated version, but within the same major
- - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
+ - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# this is an outdated version and the version comment behind it is incorrect (the SHA is from v3.2.4)
- - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.4.5
+ - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.4.5
```
### Smallest manifest that reproduces the issue
_No response_
Contributor guide
Research direction
Start by reproducing the issue with .github/workflows/deptest.yml and dependabot.yml, then compare the generated update diff with ThiefMaster/depbot-actions-bug#1. Trace how Dependabot reads and updates SHA-pinned GitHub Actions comments; done means an incorrect existing version comment is replaced with the version matching the new SHA.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100