fix(workflow-templates): pin action SHAs and fix security violations#386
Open
borislavr wants to merge 2 commits into
Open
fix(workflow-templates): pin action SHAs and fix security violations#386borislavr wants to merge 2 commits into
borislavr wants to merge 2 commits into
Conversation
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.
Summary
Audited all 11
workflow-templates/*.ymlfiles for security violations using the zizmorruleset. Fixed 8 violations across 5 files: unpinned action references (mutable tags
replaced with immutable SHA pins), a template-injection vulnerability, a malformed/impostor
SHA, an overly broad workflow-level permission, and a missing top-level
permissions:block.Issue
No linked issue — self-contained security hardening pass over the workflow templates catalog.
Breaking Change?
Scope / Project
workflow-templatesImplementation Notes
auto-assign-project-to-issue.yml—github.event.issue.titlewas interpolateddirectly inside a
run:block (template-injection). Moved to anenv:variable(
ISSUE_TITLE) so shell cannot interpret attacker-controlled content as code.dev-docker-build-selective.yml—actions/checkout@v5andtj-actions/changed-files@v47were mutable tag refs; pinned to commit SHAs.Also removed
packages: writefrom the workflow-levelpermissions:block — it wasalready correctly scoped to the
buildjob, making the workflow-level grant redundantand overly broad.
dev-mvn-docker-build.yml—metadata-actionreference had a malformed SHA(
m5a557213…— leadingmis not valid hex, making this an impostor-commit risk).Replaced with the correct
e64a1ee2…SHA (v2.2.1), consistent with all other filesin this repo that reference the same action.
license-header.yml—apache/skywalking-eyes/header@v0.8.0andpeter-evans/create-pull-request@v8.1.1were mutable tag refs; pinned to theirrespective commit SHAs via the GitHub API.
scout-cves.yml—docker/login-action@v4anddocker/scout-action@v1weremutable tag refs; pinned to commit SHAs. Added missing top-level
permissions: contents: read(workflow had no top-level permissions block at all).dev-docker-build-multiple-images.yml,dev-docker-build-single-image.yml,pr-assigner.yml,security-scan-apihub.yml,security-scan-with-config.yml,security-scan.yml) were audited and found clean.Tests / Evidence
All SHA pins verified against the GitHub API at time of fix:
actions/checkoutv5 →93cb6efe18208431cddfb8368fd83d5badbf9bfdtj-actions/changed-filesv47 →24d32ffd492484c1d75e0c0b894501ddb9d30d62apache/skywalking-eyes/headerv0.8.0 →61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1(dereferenced annotated tag)peter-evans/create-pull-requestv8.1.1 →5f6978faf089d4d20b00c7766989d076bb2fc7f1docker/login-actionv4 →4907a6ddec9925e35a0a9e82d7399ccc52663121docker/scout-actionv1 →bacf462e8d090c09660de30a6ccc718035f961e3(dereferenced annotated tag)Additional Notes
dev-docker-build-selective.ymlline 71 retainspersist-credentials: true— this waspre-existing and intentional for the
tj-actions/changed-filesstep that needs githistory access. It was not changed as part of this audit since removing it would break
the changeset detection logic.