-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(deps): update dependency wrangler to v3.19.0 [security] #31
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
base: main
Are you sure you want to change the base?
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub ↗.
|
|
91e92cd to
619a765
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
619a765 to
1bd4b96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
1bd4b96 to
2b72fec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
2b72fec to
c4a9f44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
c4a9f44 to
9593fde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
9593fde to
c01020d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
c01020d to
f626c1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
f626c1b to
bceb045
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
bceb045 to
cb225f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|




This PR contains the following updates:
3.10.1->3.19.0GitHub Vulnerability Alerts
CVE-2023-7079
Impact
Sending specially crafted HTTP requests and inspector messages to Wrangler's dev server could result in any file on the user's computer being accessible over the local network. An attacker that could trick any user on the local network into opening a malicious website could also read any file.
Patches
This issue was fixed in
wrangler@3.19.0. Wrangler will now only serve files that are part of your bundle, or referenced by your bundle's source maps.Workarounds
Configure Wrangler to listen on local interfaces instead with
wrangler dev --ip 127.0.0.1. This is the default as ofwrangler@3.16.0, and removes the local network as an attack vector, but does not prevent an attack from visiting a malicious website.References
CVE-2023-7080
Impact
The V8 inspector intentionally allows arbitrary code execution within the Workers sandbox for debugging.
wrangler devwould previously start an inspector server listening on all network interfaces. This would allow an attacker on the local network to connect to the inspector and run arbitrary code. Additionally, the inspector server did not validateOrigin/Hostheaders, granting an attacker that can trick any user on the local network into opening a malicious website the ability to run code. Ifwrangler dev --remotewas being used, an attacker could access production resources if they were bound to the worker.Patches
This issue was fixed in
wrangler@3.19.0andwrangler@2.20.2. Whilstwrangler dev's inspector server listens on local interfaces by default as ofwrangler@3.16.0, an SSRF vulnerability inminiflareallowed access from the local network untilwrangler@3.18.0.wrangler@3.19.0andwrangler@2.20.2introduced validation for theOrigin/Hostheaders.Workarounds
Unfortunately, Wrangler doesn't provide any configuration for which host that inspector server should listen on. Please upgrade to at least
wrangler@3.16.0, and configure Wrangler to listen on local interfaces instead withwrangler dev --ip 127.0.0.1to prevent SSRF. This removes the local network as an attack vector, but does not prevent an attack from visiting a malicious website.References
Release Notes
cloudflare/workers-sdk (wrangler)
v3.19.0Compare Source
Minor Changes
#4547
86c81ff0Thanks @mrbbot! - fix: listen on IPv4 loopback only by default on WindowsDue to a known issue,
workerdwill only listen on the IPv4 loopback address127.0.0.1when it's asked to listen onlocalhost. On Node.js > 17,localhostwill resolve to the IPv6 loopback address, meaning requests toworkerdwould fail. This change switches to using the IPv4 loopback address throughout Wrangler on Windows, while workerd#1408 gets fixed.#4535
29df8e17Thanks @mrbbot! - Reintroduces some internal refactorings of wrangler dev servers (includingwrangler dev,wrangler dev --remote, andunstable_dev()).These changes were released in 3.13.0 and reverted in 3.13.1 -- we believe the changes are now more stable and ready for release again.
There are no changes required for developers to opt-in. Improvements include:
Patch Changes
6c5bc704Thanks @zebp! - fix: init from dash specifying explicit usage model in wrangler.toml for standard users#4550
63708a94Thanks @mrbbot! - fix: validateHostandOrginheaders where appropriateHostandOriginheaders are now checked when connecting to the inspector and Miniflare's magic proxy. If these don't match what's expected, the request will fail.Updated dependencies [
71fb0b86,63708a94]:v3.18.0Compare Source
Minor Changes
#4532
311ffbd5Thanks @mrbbot! - fix: changewrangler (pages) devto listen onlocalhostby defaultPreviously, Wrangler listened on all interfaces (
*) by default. This change switcheswrangler (pages) devto just listen on local interfaces. Whilst this is technically a breaking change, we've decided the security benefits outweigh the potential disruption caused. If you need to access your dev server from another device on your network, you can usewrangler (pages) dev --ip *to restore the previous behaviour.Patch Changes
1b348782]:v3.17.1Compare Source
Patch Changes
#4474
382ef8f5Thanks @mrbbot! - fix: open browser to correct url pressingbin--remotemodeThis change ensures Wrangler doesn't try to open
http://*when*is used as the dev server's hostname. Instead, Wrangler will now openhttp://127.0.0.1.#4488
3bd57238Thanks @RamIdeas! - Changes the default directory for log files to workaround frameworks that are watching the entire.wranglerdirectory in the project root for changesAlso includes a fix for commands with
--jsonwhere the log file location message would cause stdout to not be valid JSON. That message now goes to stderr.v3.17.0Compare Source
Minor Changes
#4341
d9908743Thanks @RamIdeas! - Wrangler now writes all logs to a .log file in the.wranglerdirectory. Set a directory or specific .log filepath to write logs to withWRANGLER_LOG_PATH=../Desktop/my-logs/orWRANGLER_LOG_PATH=../Desktop/my-logs/my-log-file.log. When specifying a directory or using the default location, a filename with a timestamp is used.Wrangler now filters workerd stdout/stderr and marks unactionable messages as debug logs. These debug logs are still observable in the debug log file but will no longer show in the terminal by default without the user setting the env var
WRANGLER_LOG=debug.Patch Changes
d5e1966bThanks @mrbbot! - fix: report correct line and column numbers when source mapping errors withwrangler dev --remote1747d215Thanks @rozenmd! - fix: make it possible to ignore hyperdrive warnings805d5241Thanks @dario-piotrowicz! - add warnings about ai and verctorize bindings not being supported locally#4478
7b54350bThanks @penalosa! - Don't log sensitive data to the Wrangler debug log file by default. This includes API request headers and responses.Updated dependencies [
be2b9cf5,d9908743]:v3.16.0Compare Source
Minor Changes
102e15f9Thanks @Skye-31! - Feat(unstable_dev): Provide an option for unstable_dev to perform the check that prompts users to update wrangler, defaulting to false. This will prevent unstable_dev from sending a request to NPM on startup to determine whether it needs to be updated.#4179
dd270d00Thanks @matthewdavidrodgers! - Simplify secret:bulk api via script settingsFiring PUTs to the secret api in parallel has never been a great solution - each request independently needs to lock the script, so running in parallel is at best just as bad as running serially.
Luckily, we have the script settings PATCH api now, which can update the settings for a script (including secret bindings) at once, which means we don't need any parallelization. However this api doesn't work with a partial list of bindings, so we have to fetch the current bindings and merge in with the new secrets before PATCHing. We can however just omit the value of the binding (i.e. only provide the name and type) which instructs the config service to inherit the existing value, which simplifies this as well. Note that we don't use the bindings in your current wrangler.toml, as you could be in a draft state, and it makes sense as a user that a bulk secrets update won't update anything else. Instead, we use script settings api again to fetch the current state of your bindings.
This simplified implementation means the operation can only fail or succeed, rather than succeeding in updating some secrets but failing for others. In order to not introduce breaking changes for logging output, the language around "${x} secrets were updated" or "${x} secrets failed" is kept, even if it doesn't make much sense anymore.
Patch Changes
#4402
baa76e77Thanks @rozenmd! - This PR adds a fetch handler that usespage, assumingresult_infoprovided by the endpoint containspage,per_page, andtotalThis is needed as the existing
fetchListResulthandler for fetching potentially paginated results doesn't work for endpoints that don't implementcursor.Fixes #4349
#4337
6c8f41f8Thanks @Skye-31! - Improve the error message when a script isn't exported a Durable Object classPreviously, wrangler would error with a message like
Uncaught TypeError: Class extends value undefined is not a constructor or null. This improves that messaging to be more understandable to users.7fbe1937Thanks @jspspike! - Change local dev server default ip to*instead of0.0.0.0. This will cause the dev server to listen on both ipv4 and ipv6 interfacesf867e01cThanks @tmthecoder! - Support for hyperdrive bindings in local wrangler dev7e05f38eThanks @jspspike! - Fixed issue withtailnot using proxy0453b447Thanks @maxwellpeterson! - Allows uploads with both cron triggers and smart placement enabled#4437
05b1bbd2Thanks @jspspike! - Change dev registry and inspector server to listen on 127.0.0.1 instead of all interfacesUpdated dependencies [
4f8b3420,16cc2e92,3637d97a,29a59d4e,7fbe1937,76787861,8a25b7fb]:v3.15.0Compare Source
Minor Changes
0cac2c46Thanks @penalosa! - Callout--minifywhen script size is too large#4209
24d1c5cfThanks @mrbbot! - fix: suppress compatibility date fallback warnings if nowranglerupdate is availableIf a compatibility date greater than the installed version of
workerdwasconfigured, a warning would be logged. This warning was only actionable if a new
version of
wranglerwas available. The intent here was to warn if a user seta new compatibility date, but forgot to update
wranglermeaning changesenabled by the new date wouldn't take effect. This change hides the warning if
no update is available.
It also changes the default compatibility date for
wrangler devsessionswithout a configured compatibility date to the installed version of
workerd.This previously defaulted to the current date, which may have been unsupported
by the installed runtime.
#4135
53218261Thanks @Cherry! - feat: resolve npm exports for file importsPreviously, when using wasm (or other static files) from an npm package, you would have to import the file like so:
This update now allows you to import the file like so, assuming it's exposed and available in the package's
exportsfield:This will look at the package's
exportsfield inpackage.jsonand resolve the file usingresolve.exports.#4232
69b43030Thanks @romeupalos! - fix: usezone_nameto determine a zone when the pattern is a custom hostnameIn Cloudflare for SaaS, custom hostnames of third party domain owners can be used in Cloudflare.
Workers are allowed to intercept these requests based on the routes configuration.
Before this change, the same logic used by
wrangler devwas used inwrangler deploy, which caused wrangler to fail with:✘ [ERROR] Could not find zone for [partner-saas-domain.com]
b404ab70Thanks @penalosa! - When uploading additional modules with your worker, Wrangler will now report the (uncompressed) size of each individual module, as well as the aggregate size of your WorkerPatch Changes
950bc401Thanks @RamIdeas! - fix various logging of shell commands to correctly quote args when needed#4274
be0c6283Thanks @jspspike! - chore: bumpminiflareto3.20231025.0This change enables Node-like
console.log()ing in local mode. Objects withlots of properties, and instances of internal classes like
Request,Headers,ReadableStream, etc will now be logged with much more detail.#4127
3d55f965Thanks @mrbbot! - fix: store temporary files in.wranglerAs Wrangler builds your code, it writes intermediate files to a temporary
directory that gets cleaned up on exit. Previously, Wrangler used the OS's
default temporary directory. On Windows, this is usually on the
C:drive.If your source code was on a different drive, our bundling tool would generate
invalid source maps, breaking breakpoint debugging. This change ensures
intermediate files are always written to the same drive as sources. It also
ensures unused build outputs are cleaned up when running
wrangler pages dev.This change also means you no longer need to set
cwdandresolveSourceMapLocationsin.vscode/launch.jsonwhen creating anattachconfiguration for breakpoint debugging. Your
.vscode/launch.jsonshould nowlook something like...
{ "configurations": [ { "name": "Wrangler", "type": "node", "request": "attach", "port": 9229, // These can be omitted, but doing so causes silent errors in the runtime "attachExistingChildren": false, "autoAttachChildProcesses": false } ] }05798038Thanks @gabivlj! - Move helper cli files of C3 into @cloudflare/cli and make Wrangler and C3 depend on it#4235
46cd2df5Thanks @mrbbot! - fix: ensureconsole.log()s during startup are displayedPreviously,
console.log()calls before the Workers runtime was ready toreceive requests wouldn't be shown. This meant any logs in the global scope
likely weren't visible. This change ensures startup logs are shown. In particular,
this should fix Remix's HMR,
which relies on startup logs to know when the Worker is ready.
v3.14.0Compare Source
Minor Changes
#4204
38fdbe9bThanks @matthewdavidrodgers! - Support user limits for CPU timeUser limits provided via script metadata on upload
Example configuration:
#2162
a1f212e6Thanks @WalshyDev! - add support for service bindings inwrangler pages devby providing thenew
--service|-sflag which accepts an array ofBINDING_NAME=SCRIPT_NAMEwhere
BINDING_NAMEis the name of the binding andSCRIPT_NAMEis the nameof the worker (as defined in its
wrangler.toml), such workers need to berunning locally with with
wrangler dev.For example if a user has a worker named
worker-a, in order to locally bindto that they'll need to open two different terminals, in each navigate to the
respective worker/pages application and then run respectively
wrangler devandwrangler pages ./publicDir --service MY_SERVICE=worker-athis will add theMY_SERVICEbinding to pages' workerenvobject.Note: additionally after the
SCRIPT_NAMEthe name of an environment can be specified,prefixed by an
@(as in:MY_SERVICE=SCRIPT_NAME@PRODUCTION), this behavior is howeverexperimental and not fully properly defined.
v3.13.2Compare Source
Patch Changes
8e927170Thanks @1000hz! - chore: bumpminiflareto3.20231016.054800f6fThanks @a-robinson! - Log a warning when using a Hyperdrive binding in local wrangler devv3.13.1Compare Source
Patch Changes
88f15f61Thanks @penalosa! - patch: This release fixes some regressions related to runningwrangler devthat were caused by internal refactoring of the dev server architecture (#3960). The change has been reverted, and will be added back in a future release.v3.13.0Compare Source
Minor Changes
403bc25cThanks @RamIdeas! - Fix wrangler generated types to match runtime exports#3960
c36b78b4Thanks @RamIdeas! - Refactoring the internals of wrangler dev servers (includingwrangler dev,wrangler dev --remoteandunstable_dev()).There are no changes required for developers to opt-in. Improvements include:
Patch Changes
f4ad634aThanks @penalosa! - fix: When a middleware is configured which doesn't support your Worker's script format, fail early with a helpful error messagev3.12.0Compare Source
Minor Changes
#4071
f880a009Thanks @matthewdavidrodgers! - Support TailEvent messages in Tail sessionsWhen tailing a tail worker, messages previously had a null event property. Following https://github.com/cloudflare/workerd/pull/1248, these events have a valid event, specifying which scripts produced events that caused your tail worker to run.
As part of rolling this out, we're filtering out tail events in the internal tail infrastructure, so we control when these new messages are forward to tail sessions, and can merge this freely.
One idiosyncracy to note, however, is that tail workers always report an "OK" status, even if they run out of memory or throw. That is being tracked and worked on separately.
#2397
93833f04Thanks @a-robinson! - feature: Support Queue consumer events in tailSo that it's less confusing when tailing a worker that consumes events from a Queue.
Patch Changes
#2687
3077016fThanks @jrf0110! - Fixes large Pages projects failing to complete direct upload due to expiring JWTsFor projects which are slow to upload - either because of client bandwidth or large numbers of files and sizes - It's possible for the JWT to expire multiple times. Since our network request concurrency is set to 3, it's possible that each time the JWT expires we get 3 failed attempts. This can quickly exhaust our upload attempt count and cause the entire process to bail.
This change makes it such that jwt refreshes do not count as a failed upload attempt.
f4d28918Thanks @a-robinson! - Default new Hyperdrive configs for PostgreSQL databases to port 5432 if the port is not specifiedv3.11.0Compare Source
Minor Changes
#3726
7d20bdbdThanks @petebacondarwin! - feat: support partial bundling with configurable external modulesSetting
find_additional_modulestotruein your configuration file will now instruct Wrangler to look for files inyour
base_dirthat match your configuredrules, and deploy them as unbundled, external modules with your Worker.base_dirdefaults to the directory containing yourmainentrypoint.Wrangler can operate in two modes: the default bundling mode and
--no-bundlemode. In bundling mode, dynamic imports(e.g.
await import("./large-dep.mjs")) would be bundled into your entrypoint, making lazy loading less effective.Additionally, variable dynamic imports (e.g.
await import(`./lang/${language}.mjs`)) would always fail at runtime,as Wrangler would have no way of knowing which modules to upload. The
--no-bundlemode sought to address these issuesby disabling Wrangler's bundling entirely, and just deploying code as is. Unfortunately, this also disabled Wrangler's
code transformations (e.g. TypeScript compilation,
--assets,--test-scheduled, etc).With this change, we now additionally support partial bundling. Files are bundled into a single Worker entry-point file
unless
find_additional_modulesistrue, and the file matches one of the configuredrules. Seehttps://developers.cloudflare.com/workers/wrangler/bundling/ for more details and examples.
c71d8a0fThanks @mrbbot! - chore: bumpminiflareto3.20231002.0Patch Changes
#3726
7d20bdbdThanks @petebacondarwin! - fix: ensure that additional modules appear in the out-dirWhen using
find_additional_modules(orno_bundle) we find files thatwill be uploaded to be deployed alongside the Worker.
Previously, if an
outDirwas specified, only the Worker code was outputto this directory. Now all additional modules are also output there too.
#4067
31270711Thanks @mrbbot! - fix: generate valid source maps withwrangler pages devon macOSOn macOS,
wrangler pages devpreviously generated source maps with anincorrect number of
../s in relative paths. This change ensures paths arealways correct, improving support for breakpoint debugging.
9a7559b6Thanks @RamIdeas! - fix: respect the options.local value in unstable_dev (it was being ignored)807ab931Thanks @mrbbot! - chore: bumpminiflareto3.20231002.1#3726
7d20bdbdThanks @petebacondarwin! - fix: allow__STATIC_CONTENT_MANIFESTmodule to be imported anywhere__STATIC_CONTENT_MANIFESTcan now be imported in subdirectories when--no-bundleorfind_additional_modulesare enabled.f585f695Thanks @penalosa! - Log more detail about tokens after authentication errors1d0b7ad5Thanks @JacksonKearl! - Fixedpages devcrashing and leaving port open when building a worker script fails#4066
c8b4a07fThanks @RamIdeas! - fix: we no longer infer pathnames from route patterns as the hostDuring local development, inside your worker, the host of
request.urlis inferred from theroutesin your config.Previously, route patterns like "*/some/path/name" would infer the host as "some". We now handle this case and determine we cannot infer a host from such patterns.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.