Skip to content

Commit 6c308aa

Browse files
authored
Use the GitHub-suggested safer pattern for shell interpolation. (langchain-ai#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/
1 parent 8bc1a3d commit 6c308aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/actions/poetry_setup/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ runs:
4747
~/.cache/pip
4848
key: pip-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}
4949

50-
- run: pipx install poetry==${{ inputs.poetry-version }} --python python${{ inputs.python-version }}
50+
- name: Install poetry
5151
shell: bash
52+
env:
53+
POETRY_VERSION: ${{ inputs.poetry-version }}
54+
PYTHON_VERSION: ${{ inputs.python-version }}
55+
run: pipx install "poetry==$POETRY_VERSION" --python "python$PYTHON_VERSION" --verbose
5256

5357
- name: Check Poetry File
5458
shell: bash

0 commit comments

Comments
 (0)