Skip to content

Apply Zizmor fixes to increase HcPkgPreReleaseGitops workflow security#214

Open
Exairnous wants to merge 1 commit into
Hubs-Foundation:masterfrom
Exairnous:secure-HcPkgPreReleaseGitops-workflow
Open

Apply Zizmor fixes to increase HcPkgPreReleaseGitops workflow security#214
Exairnous wants to merge 1 commit into
Hubs-Foundation:masterfrom
Exairnous:secure-HcPkgPreReleaseGitops-workflow

Conversation

@Exairnous

Copy link
Copy Markdown
Member

What?

Prevents credentials from actions/checkout from persisting, and replaces direct use of the GitHub variables in the shell execution with indirect usage via shell variables.

Why?

To help minimize the chance of the workflow being hacked.

According to Zizmor, filtering GitHub variables through environment variables prevents code injection via template expansion. Essentially, this should ensure an attacker can't manipulate data in GitHub to achieve remote code execution when the workflow is run.

Examples

N/A

How to test

DO NOT TEST THE WORKFLOW ITSELF. This workflow isn't currently used and running this workflow will overwrite branches.

To verify that all the Zizmor issues have been addressed, run the following command from the repository folder and see that Zizmor reports no issues for the HcPkgPreReleaseGitops workflow.

docker run --rm --name zizmor -v .:/usr/repo ghcr.io/zizmorcore/zizmor --fix=all /usr/repo

Documentation of functionality

This doesn't change the functionality of the workflow, so no documentation update is needed.

Known limitations

This doesn't limit the permissions. This workflow isn't currently used and running this workflow will overwrite branches, so there isn't a way to test what permissions it needs and it doesn't really matter at this point in time if it works or not (if we decide to start using the workflow, then we can figure out the permissions then). Since it is planned to globally restrict permissions for all Hubs Foundation workflows, there shouldn't be any risk to leaving the permissions as is.

This doesn't update any of the external workflow versions. I feel it is out of scope for this PR and can/should be done along with all the others in further PRs when addressing GitHub's required update to use Node 24+.

Alternative implementations considered

None.

Open questions

None.

Additional details or related context

This workflow is unused, so this update is merely out of an abundance of caution.

This workflow can be called from the hc-pkgcaller workflow in the Reticulum repository.

Part of Hubs-Foundation/.github#13

What: prevents credentials from actions/checkout from persisting, and replaces direct use of the GitHub variables in the shell execution with indirect usage via shell variables.

Why: to help minimize the chance of the workflow being hacked.

According to Zizmor, filtering GitHub variables through environment variables prevents code injection via template expansion.  Essentially, this should ensure an attacker can't manipulate data in GitHub to achieve remote code execution when the workflow is run.
@Exairnous Exairnous added the Roadmap: Programming Indicates that this issue/pull request is on the Programming Team roadmap label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Roadmap: Programming Indicates that this issue/pull request is on the Programming Team roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant