Skip to content

Commit 3dd5b35

Browse files
authored
Harden the release workflow by removing template expansions (#641)
This replaces the inline `${{ inputs.tag }}` and `${{ steps.resolve.outputs.version }}` template expansion with environment variables. Ref: https://securitylab.github.com/resources/github-actions-untrusted-input/ This was originally reported to the security team by @Sweekar-cmd. Thanks! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Updated the release workflow to pass tag and version values through environment variables. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 2300409 commit 3dd5b35

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎.github/workflows/release-wporg.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ jobs:
3939

4040
- name: Resolve tag
4141
id: resolve
42+
env:
43+
TAG: ${{ inputs.tag }}
4244
run: |
43-
TAG="${{ inputs.tag }}"
4445
# Ensure the tag has a "v" prefix.
4546
[[ "$TAG" == v* ]] || TAG="v$TAG"
4647
echo "tag=$TAG" >> $GITHUB_OUTPUT
@@ -58,8 +59,10 @@ jobs:
5859
unzip plugin-sqlite-database-integration.zip
5960
6061
- name: Verify release metadata
62+
env:
63+
VERSION: ${{ steps.resolve.outputs.version }}
6164
run: |
62-
bash bin/verify-release-metadata.sh plugin-sqlite-database-integration "${{ steps.resolve.outputs.version }}"
65+
bash bin/verify-release-metadata.sh plugin-sqlite-database-integration "$VERSION"
6366
6467
- name: Deploy to WordPress.org
6568
uses: 10up/action-wordpress-plugin-deploy@2.3.0

0 commit comments

Comments
 (0)