From 6c308aabaed9258a3151b2f8c6c8e58eb44a8b0c Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:59:10 -0400 Subject: [PATCH] Use the GitHub-suggested safer pattern for shell interpolation. (#9567) Using `${{ }}` to construct shell commands is risky, since the `${{ }}` interpolation runs first and ignores shell quoting rules. This means that shell commands that look safely quoted, like `echo "${{ github.event.issue.title }}"`, are actually vulnerable to shell injection. More details here: https://github.blog/2023-08-09-four-tips-to-keep-your-github-actions-workflows-secure/ --- .github/actions/poetry_setup/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/poetry_setup/action.yml b/.github/actions/poetry_setup/action.yml index bcc9a604530..6dbe000264e 100644 --- a/.github/actions/poetry_setup/action.yml +++ b/.github/actions/poetry_setup/action.yml @@ -47,8 +47,12 @@ runs: ~/.cache/pip key: pip-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }} - - run: pipx install poetry==${{ inputs.poetry-version }} --python python${{ inputs.python-version }} + - name: Install poetry shell: bash + env: + POETRY_VERSION: ${{ inputs.poetry-version }} + PYTHON_VERSION: ${{ inputs.python-version }} + run: pipx install "poetry==$POETRY_VERSION" --python "python$PYTHON_VERSION" --verbose - name: Check Poetry File shell: bash