ci: pin third-party actions (ninja-i18n, action-discord) to full commit SHAs#8858
Open
kobihikri wants to merge 1 commit into
Open
ci: pin third-party actions (ninja-i18n, action-discord) to full commit SHAs#8858kobihikri wants to merge 1 commit into
kobihikri wants to merge 1 commit into
Conversation
Pin the two third-party actions referenced by mutable tags to their current commit SHA (tag kept in a trailing comment): - opral/ninja-i18n-action@main (ninja_i18n.yml) — runs in a pull_request_target workflow and is passed GITHUB_TOKEN - Ilshidur/action-discord@master (translation_notify.yml) — receives DISCORD_WEBHOOK A moved tag would run unreviewed code in those jobs. The ninja_i18n one is the more sensitive: pull_request_target runs with the base repo's token even for fork PRs. Behaviour unchanged; per GitHub's guidance to pin actions to a full-length commit SHA. Signed-off-by: Kobi Hikri <kobi.hikri@gmail.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuidePins two third-party GitHub Actions in CI workflows from mutable branch tags to specific commit SHAs, preserving behavior while hardening credential exposure risk. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
What
Pin the two third-party actions currently referenced by mutable tags to their current commit SHA (tag
kept in a trailing comment):
opral/ninja-i18n-action@main415e999…ninja_i18n.ymlIlshidur/action-discord@masterd259407…translation_notify.ymlWhy
@main/@masterare moving references — whatever they point to at run time runs in the job.ninja_i18n.ymlruns onpull_request_targetand passesGITHUB_TOKENto the action.pull_request_targetruns with the base repository's token even for pull requests from forks, so a mutable third-party
ref here is the most sensitive one to remove.
translation_notify.ymlpassesDISCORD_WEBHOOKtoaction-discord@master.If either action's default branch were moved (compromise or an accidental change), the new code would
run with those credentials — the class of issue behind the 2025
tj-actions/changed-filesincident.Scope / safety
actions/*refs are left as-is. Renovate/Dependabot can stillbump a SHA pin (the tag comment keeps it readable). Signed-off.
Per GitHub's guidance to pin actions to a full-length commit SHA.
AI-assisted; I verified the workflows, the token/secret exposure, and the pinned SHAs myself.
Summary by Sourcery
Pin third-party GitHub Actions used in CI workflows to specific commit SHAs for improved security and predictability.
CI: