test(v10/cloudflare): Add Vite-build support to the integration-test runner#22539
test(v10/cloudflare): Add Vite-build support to the integration-test runner#22539andreiborza wants to merge 1 commit into
Conversation
…runner Backport of: #22422
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e31f0e6. Configure here.
| if (!builtConfig) { | ||
| throw new Error(`Could not locate a Vite-built wrangler config for ${sourceConfig} under ${distDir}`); | ||
| } | ||
| return builtConfig; |
There was a problem hiding this comment.
Vite rebuilds after sub-worker starts
Medium Severity
resolveWorkerConfig always runs vite build when a Vite config is present. For multi-worker suites it is invoked for the sub-worker first, then again for the main worker only after waitForReady on the sub-worker. That second build can wipe or rewrite dist/ while the already-running sub-worker is serving from it, so Vite multi-worker suites can flake or fail.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e31f0e6. Configure here.
| } catch { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
New Vite path lacks coverage
Medium Severity
This test PR adds Vite-build resolution in the integration-test runner (resolveWorkerConfig / builtFromSource), but no suite ships a vite.config.* or otherwise exercises that path. Per the project review rules, a test PR needs coverage of the newly added behaviour so regressions in the Vite build → wrangler-config matching flow are caught.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit e31f0e6. Configure here.
| pathe "^2.0.3" | ||
| source-map-js "^1.2.1" | ||
|
|
||
| vite@7.3.2, "vite@^5.0.0 || ^6.0.0 || ^7.0.0-0": |
There was a problem hiding this comment.
High severity vulnerability may affect your project—review required:
Line 30197 lists a dependency (vite) with a known High severity vulnerability.
ℹ️ Why this matters
Affected versions of vite and vite-plus are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor / Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Vite's server.fs.deny blocklist—which protects sensitive files such as .env and certificate files from being served—can be bypassed on Windows using alternate path representations (NTFS Alternate Data Stream syntax like /.env::$DATA?raw, or 8.3 short filenames), allowing an attacker to read otherwise-denied files when the dev server is exposed to the network.
To resolve this comment:
Check if you expose the Vite dev server or vite-plus to the network by configuring a non-loopback address using the --host CLI flag on Windows.
- If you're affected, upgrade this dependency to at least version 7.3.5 at yarn.lock.
- If you're not affected, comment
/fp we don't use this [condition]
💬 Ignore this finding
To ignore this, reply with:
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
You can view more details on this finding in the Semgrep AppSec Platform here.
size-limit report 📦
|


Backport of: #22422