Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid running malicious inputs as shell commands in the GitHub Actions #2397

Merged
merged 1 commit into from
May 13, 2024
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
8 changes: 6 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@ jobs:

- name: Install WP release candidate (optional)
if: github.event.inputs.wp-rc-version != ''
env:
INPUT_WP_RC_VERSION: ${{ github.event.inputs.wp-rc-version }}
run: |
npm run -- wp-env run tests-cli -- wp core update --version=${{ github.event.inputs.wp-rc-version }}
npm run -- wp-env run tests-cli -- wp core update --version="${INPUT_WP_RC_VERSION}"
npm run -- wp-env run tests-cli -- wp core update-db

- name: Install WC release candidate (optional)
if: github.event.inputs.wc-rc-version != ''
env:
INPUT_WC_RC_VERSION: ${{ github.event.inputs.wc-rc-version }}
run: |
npm run -- wp-env run tests-cli -- wp plugin update woocommerce --version=${{ github.event.inputs.wc-rc-version }}
npm run -- wp-env run tests-cli -- wp plugin update woocommerce --version="${INPUT_WC_RC_VERSION}"
npm run -- wp-env run tests-cli -- wp wc update

- name: Download and install Chromium browser.
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/php-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ jobs:
uses: woocommerce/grow/prepare-mysql@actions-v1

- name: Install WP tests
run: ./bin/install-wp-tests.sh wordpress_test root root localhost ${{ inputs.wp-rc-version }} ${{ inputs.wc-rc-version }}
env:
INPUT_WP_RC_VERSION: ${{ inputs.wp-rc-version }}
INPUT_WC_RC_VERSION: ${{ inputs.wc-rc-version }}
run: ./bin/install-wp-tests.sh wordpress_test root root localhost "${INPUT_WP_RC_VERSION}" "${INPUT_WC_RC_VERSION}"

- name: Run PHP unit tests
run: composer test-unit
Expand Down
Loading