Skip to content

Conversation

@Flash0ver
Copy link
Member

I noticed that the "Danger" action is not pinned to the full-length commit SHA.
This is a follow-up to issue #4540 (PR #4562).

@Flash0ver Flash0ver self-assigned this Nov 19, 2025
@Flash0ver
Copy link
Member Author

@sentry review

runs-on: ubuntu-latest
steps:
- uses: getsentry/github-workflows/danger@v3
- uses: getsentry/github-workflows/danger@13be9bec4ec5cd67061b747972b996e9c80f4f3b # 3.1.0
Copy link

Choose a reason for hiding this comment

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

The update to pin the danger action to a specific commit SHA (13be9bec4ec5cd67061b747972b996e9c80f4f3b) is a good practice for enhancing security and reproducibility. This ensures that the workflow always runs with the exact same action code, preventing unexpected changes from upstream updates to the @v3 tag.

However, this approach also means that any future bug fixes or security patches released by the getsentry/github-workflows/danger action maintainers (within the 3.x series) will not be automatically applied. These updates will require a manual change to the SHA in this workflow.

Given the inline comment # 3.1.0, it suggests an intent to use version 3.1.0. If the primary goal is to track this specific minor version and automatically receive patch updates, consider using @v3.1.0 instead of the full SHA. This offers a balance between stability and ease of maintenance. If absolute immutability is the highest priority, then the current SHA pinning is appropriate, but be mindful of the need for manual updates for any patches.
Severity: MEDIUM

🤖 Prompt for AI Agent

Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/danger.yml#L11

Potential issue: The update to pin the `danger` action to a specific commit SHA
(`13be9bec4ec5cd67061b747972b996e9c80f4f3b`) is a good practice for enhancing security
and reproducibility. This ensures that the workflow always runs with the exact same
action code, preventing unexpected changes from upstream updates to the `@v3` tag.

However, this approach also means that any future bug fixes or security patches released
by the `getsentry/github-workflows/danger` action maintainers (within the `3.x` series)
will not be automatically applied. These updates will require a manual change to the SHA
in this workflow.

Given the inline comment `# 3.1.0`, it suggests an intent to use version 3.1.0. If the
primary goal is to track this specific minor version and automatically receive patch
updates, consider using `@v3.1.0` instead of the full SHA. This offers a balance between
stability and ease of maintenance. If absolute immutability is the highest priority,
then the current SHA pinning is appropriate, but be mindful of the need for manual
updates for any patches.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference_id: 2803320

Copy link
Member Author

@Flash0ver Flash0ver Nov 19, 2025

Choose a reason for hiding this comment

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

@dependabot is automatically updating GitHub actions.
See e.g. #4715.
It's also updating the version-comment appropriately.

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.70%. Comparing base (9a61615) to head (4e25543).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4753      +/-   ##
==========================================
+ Coverage   73.69%   73.70%   +0.01%     
==========================================
  Files         476      476              
  Lines       17443    17443              
  Branches     3453     3453              
==========================================
+ Hits        12854    12856       +2     
+ Misses       3741     3740       -1     
+ Partials      848      847       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Flash0ver Flash0ver marked this pull request as ready for review November 19, 2025 15:16
@jamescrosswell jamescrosswell merged commit 2b7d859 into main Nov 19, 2025
31 checks passed
@jamescrosswell jamescrosswell deleted the ci/pin-danger-action branch November 19, 2025 21:12
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.

3 participants