Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 14 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
- name: attempt command substitution via uses
- name: Attempt command substitution via uses
id: command-substitution
uses: ./.
with:
Expand All @@ -71,3 +71,16 @@ jobs:
echo "::error::Expected command substitution not to happen"
exit 1
fi
- name: Attempt expression injection
uses: ./.
id: expression-injection
with:
uses: ./.github/actions/echo
with: |
echo: ${{ '$' }}{{ env.expected }}
ignored: whatever
- uses: ./.github/actions/assert-equal
with:
expected: "${{ '$' }}{{ env.expected }}"
actual: ${{ fromJSON(steps.expression-injection.outputs.outputs).echo }}

2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
id: run
uses: '$(echo "$uses" | sed "s/'/''/g")'
with:
$(echo "$with" | sed 's/^/ /')
$(echo "$with" | sed -E "s/^/ /; s/\\\$\\{\\{/\${{'$'}}{{'\$'}}{{/g")
DYNAMIC_USES_EOF
- name: Run
id: run
Expand Down
Loading