Skip to content

test(v10/cloudflare): Add Vite-build support to the integration-test runner#22539

Draft
andreiborza wants to merge 1 commit into
ab/backport-22421-wrangler-configfrom
ab/backport-22422-vite-test-runner
Draft

test(v10/cloudflare): Add Vite-build support to the integration-test runner#22539
andreiborza wants to merge 1 commit into
ab/backport-22421-wrangler-configfrom
ab/backport-22422-vite-test-runner

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Backport of: #22422

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e31f0e6. Configure here.

} catch {
return false;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit e31f0e6. Configure here.

Comment thread yarn.lock
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":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

References: GHSA, CVE

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.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.6 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.36 kB added added
@sentry/browser (incl. Tracing, Replay) 85.85 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.48 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.21 kB added added
@sentry/browser (incl. Feedback) 44.93 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.56 kB added added
@sentry/react (incl. Tracing) 48.87 kB added added
@sentry/vue 33.19 kB added added
@sentry/vue (incl. Tracing) 48.56 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.16 kB added added
CDN Bundle (incl. Tracing) 48.56 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB added added
CDN Bundle (incl. Tracing, Replay) 86.06 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.37 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB added added
CDN Bundle - uncompressed 89.91 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.79 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.62 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.77 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.38 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.99 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.73 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.68 kB added added
@sentry/nextjs (client) 51.41 kB added added
@sentry/sveltekit (client) 47.02 kB added added
@sentry/core/server 80.3 kB added added
@sentry/core/browser 66.72 kB added added
@sentry/node-core 63.23 kB added added
@sentry/node 125.82 kB added added
@sentry/node (incl. diagnostics channel injection) 151.28 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.37 kB added added
@sentry/node - without tracing 74.95 kB added added
@sentry/aws-serverless 84.19 kB added added
@sentry/cloudflare (withSentry) - minified 197.74 kB added added
@sentry/cloudflare (withSentry) 486.69 kB added added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants