Fix CI: pass npm tarball between jobs and pin download-artifact to patched version#228
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/DevExpress/testcafe-browser-provider-browserstack/sessions/401193be-b017-479a-b361-92fab77525ca Co-authored-by: aleks-pro <14822473+aleks-pro@users.noreply.github.com>
…ile Write vulnerability Agent-Logs-Url: https://github.com/DevExpress/testcafe-browser-provider-browserstack/sessions/401193be-b017-479a-b361-92fab77525ca Co-authored-by: aleks-pro <14822473+aleks-pro@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job in testcafe-browser-provider-browserstack
Fix CI: pass npm tarball between jobs and pin download-artifact to patched version
May 12, 2026
aleks-pro
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
testjob was failing because the.builds/*.tgztarball produced inbuildwas never transferred to the separatetestrunner. Additionally,actions/download-artifact@v4was pinned to an unpatched range (< 4.1.3) containing an Arbitrary File Write vulnerability (path traversal during extraction).Changes
buildjob — addactions/upload-artifact@v4to persist.builds/*.tgzafter the build steptestjob — addactions/download-artifact@v4.3.0to restore the tarball into.builds/beforetest-npmrunsdownload-artifacttov4.3.0(patched; CVE affects>= 4.0.0, < 4.1.3)Original prompt
Fix the failing GitHub Actions job in repository
DevExpress/testcafe-browser-provider-browserstack.Context:
.github/workflows/test.yml5f9417fe0bdb5616e2547961c15d86fc09b52533tar (child): .builds/testcafe-browser-provider-browserstack-1.15.2.tgz: Cannot open: No such file or directorytar: Child returned status 2tar: Error is not recoverable: exiting nowpackage.jsonshows package nametestcafe-browser-provider-browserstackand version1.15.2, matching the missing tarball path.builds/testcafe-browser-provider-browserstack-1.15.2.tgz.Observed workflow:
buildjob runs:DevExpress/testcafe-build-system/actions/prepare@mainDevExpress/testcafe-build-system/actions/build@maintestjob runs:DevExpress/testcafe-build-system/actions/prepare@mainDevExpress/testcafe-build-system/actions/test-npm@mainwithtask: testLikely root cause:
test-npmaction expects a built npm tarball in.builds/*.tgz.testjob, likely because it is not being created explicitly and/or not being transferred between jobs as an artifact.buildandtestare separate jobs on separate runners, files do not persist automatically between them.Task:
testjob..github/workflows/test.ymlto upload.builds/*.tgzas an artifact inbuildand download it intestbefore runningtest-npm.build(for example usingnpm pack --pack-destination .builds) if the shared build action does not already create it.Acceptance criteria:
.builds/testcafe-browser-provider-browserstack-1.15.2.tgz.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by the test job trying to extract a package tarball that was never produced:
.github/workflows/test.ymltar (child): .builds/testcafe-browser-provider-browserstack-1.15.2.tgz: Cannot open: No such file or directoryWhy this happens:
testjob uses the sharedtest-npmaction, which expects a built npm package tarball at.builds/<package-name>-<version>.tgz.package.json, that expected file is:.builds/testcafe-browser-provider-browserstack-1.15.2.tgzbuildjob only runs the sharedbuildaction, but there is no visible step in this workflow ensuring that the tarball is created and made available to thetestjob. Since jobs run on separate runners, even a locally created file inbuildwould not exist intestunless it is uploaded/downloaded as an artifact.Solution
Update the workflow so the package tarball is explicitly created in
buildand then made available totest.Recommended fix
Replace the current workflow with explicit packaging and artifact transfer: