build(ci): drop github-slug-action, compute short SHA inline - #2388
Open
LoneRifle wants to merge 1 commit into
Open
build(ci): drop github-slug-action, compute short SHA inline#2388LoneRifle wants to merge 1 commit into
LoneRifle wants to merge 1 commit into
Conversation
Replace the third-party rlespinasse/github-slug-action with inline shell
to compute the 8-char short SHA, removing a CI supply-chain dependency.
build-image and deploy-prod use ${GITHUB_SHA:0:7} (the auto-injected
default env var, no template interpolation). deploy-dev keeps the shell
approach off github.event.pull_request.head.sha, since on pull_request
triggers GITHUB_SHA is the merge commit, not the PR head.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LoneRifle
force-pushed
the
build/ci/no-image-slug
branch
from
June 28, 2026 10:31
469fa8e to
124c1d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
rlespinasse/github-slug-actionis dependent on other actions from its author, namely,rlespinasse/slugify-valueandrlespinasse/shortify-git-version. Notably, the underlying actions are referenced by version tag, not by commit hash.Not only does this mean the action has a significant footprint, it is also susceptible to supply-chain attacks through the version tagging of malicious actions, even by commit pinning
rlespinasse/github-slug-action, since it does not pin the underlying actions.Given that the action is only used to populate one particular env var, it might make sense to replace it with shell cmds.
Solution
Replace
rlespinasse/github-slug-actionwith inline shell to compute the 7-char short SHA, removing a CI supply-chain dependency.build-imageanddeploy-produse${GITHUB_SHA:0:7}(the auto-injected default env var, no template interpolation)deploy-devkeeps the shell approach off github.event.pull_request.head.sha, since on pull_request triggersGITHUB_SHAis the merge commit, not the PR head