Skip to content

Conversation

kenchan0130
Copy link

In the current implementation of the action, even when we pin a specific version, the installer is still fetched from the main branch HEAD.

This behavior introduces a significant supply chain security risk, as it allows unreviewed or unintended changes in the main branch to be executed in user workflows.

To address this, I have modified the implementation to reduce this risk and ensure more predictable and secure behavior.

@@ -25,7 +25,7 @@ runs:
cd "${GITHUB_WORKSPACE}" || exit 1
TEMP_PATH="$(mktemp -d)"
PATH="${TEMP_PATH}:$PATH"
curl -sfL https://raw.githubusercontent.com/Songmu/tagpr/main/install.sh | sh -s -- -b "$TEMP_PATH" "${{ inputs.version }}" 2>&1
curl -sfL https://raw.githubusercontent.com/Songmu/tagpr/v1.5.2/install.sh | sh -s -- -b "$TEMP_PATH" "${{ inputs.version }}" 2>&1
Copy link
Author

Choose a reason for hiding this comment

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

I am aware that this version value is automatically updated by https://github.com/Songmu/tagpr/blob/main/.tagpr#L20.

Copy link
Author

Choose a reason for hiding this comment

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

ops.. https://github.com/Songmu/tagpr/blob/6f76534e4066713c6b49eac9aedd44887f9eb15d/action.yml

It might be better to allow the version to be set via an environment variable.

@Songmu
Copy link
Owner

Songmu commented May 15, 2025

Thank you!

@Songmu Songmu merged commit 75b544f into Songmu:main May 15, 2025
3 checks passed
@kenchan0130 kenchan0130 deleted the improved-security branch May 15, 2025 06:06
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.

2 participants