Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/actions/publish-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ runs:
npm publish \
--dry-run="${INPUTS_DRY_RUN}" \
--workspace="${INPUTS_CORE_PACKAGE_NAME}" \
--no-tag
--tag staging-tmp
if [[ "${INPUTS_DRY_RUN}" == "false" ]]; then
npm dist-tag rm ${INPUTS_CORE_PACKAGE_NAME} false
npm dist-tag rm ${INPUTS_CORE_PACKAGE_NAME} staging-tmp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

The variable ${INPUTS_CORE_PACKAGE_NAME} is used without quotes in a shell script, which can lead to command injection if the input contains shell metacharacters. It is a best practice to always quote variables in shell commands to prevent unintended execution of arbitrary code. Additionally, consider defining a variable for the staging-tmp tag to improve maintainability and avoid potential typos.

          npm dist-tag rm "${INPUTS_CORE_PACKAGE_NAME}" staging-tmp

fi

- name: '🔗 Install latest core package'
Expand Down Expand Up @@ -222,9 +222,9 @@ runs:
npm publish \
--dry-run="${INPUTS_DRY_RUN}" \
--workspace="${INPUTS_CLI_PACKAGE_NAME}" \
--no-tag
--tag staging-tmp
if [[ "${INPUTS_DRY_RUN}" == "false" ]]; then
npm dist-tag rm ${INPUTS_CLI_PACKAGE_NAME} false
npm dist-tag rm ${INPUTS_CLI_PACKAGE_NAME} staging-tmp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

The variable ${INPUTS_CLI_PACKAGE_NAME} is used without quotes in a shell script, which can lead to command injection if the input contains shell metacharacters. Always quote variables in shell scripts to ensure they are treated as a single argument and to prevent command injection vulnerabilities. Additionally, consider defining a variable for the staging-tmp tag to improve maintainability.

          npm dist-tag rm "${INPUTS_CLI_PACKAGE_NAME}" staging-tmp

fi

- name: 'Get a2a-server Token'
Expand All @@ -249,9 +249,9 @@ runs:
npm publish \
--dry-run="${INPUTS_DRY_RUN}" \
--workspace="${INPUTS_A2A_PACKAGE_NAME}" \
--no-tag
--tag staging-tmp
if [[ "${INPUTS_DRY_RUN}" == "false" ]]; then
npm dist-tag rm ${INPUTS_A2A_PACKAGE_NAME} false
npm dist-tag rm ${INPUTS_A2A_PACKAGE_NAME} staging-tmp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

The variable ${INPUTS_A2A_PACKAGE_NAME} is used without quotes in a shell script, which poses a command injection risk if the input is maliciously crafted. Wrapping the variable in double quotes ensures that its value is handled safely by the shell. Additionally, consider defining a variable for the staging-tmp tag to improve maintainability.

            npm dist-tag rm "${INPUTS_A2A_PACKAGE_NAME}" staging-tmp

fi

- name: '🔬 Verify NPM release by version'
Expand Down
Loading