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

fix(deps): update dependency zod to v3.22.3 [security] #255

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 4, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zod (source) 3.21.4 -> 3.22.3 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-4316

Zod version 3.22.2 allows an attacker to perform a denial of service while validating emails.


Release Notes

colinhacks/zod (zod)

v3.22.3

Compare Source

Commits:

v3.22.2

Compare Source

Commits:

v3.22.1

Compare Source

Commits:

Fix handing of this in ZodFunction schemas. The parse logic for function schemas now requires the Reflect API.

const methodObject = z.object({
  property: z.number(),
  method: z.function().args(z.string()).returns(z.number()),
});
const methodInstance = {
  property: 3,
  method: function (s: string) {
    return s.length + this.property;
  },
};
const parsed = methodObject.parse(methodInstance);
parsed.method("length=8"); // => 11 (8 length + 3 property)

v3.22.0

Compare Source

ZodReadonly

This release introduces ZodReadonly and the .readonly() method on ZodType.

Calling .readonly() on any schema returns a ZodReadonly instance that wraps the original schema. The new schema parses all inputs using the original schema, then calls Object.freeze() on the result. The inferred type is also marked as readonly.

const schema = z.object({ name: string }).readonly();
type schema = z.infer<typeof schema>;
// Readonly<{name: string}>

const result = schema.parse({ name: "fido" });
result.name = "simba"; // error

The inferred type uses TypeScript's built-in readonly types when relevant.

z.array(z.string()).readonly();
// readonly string[]

z.tuple([z.string(), z.number()]).readonly();
// readonly [string, number]

z.map(z.string(), z.date()).readonly();
// ReadonlyMap<string, Date>

z.set(z.string()).readonly();
// ReadonlySet<Promise<string>>

Commits:


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner October 4, 2023 01:21
@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 4, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Oct 4, 2023

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.

@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 4 times, most recently from b438362 to f6fd0cc Compare October 5, 2023 06:27
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 5c1e29a to 2f361a1 Compare February 5, 2024 06:52
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 5d48e35 to a479fbe Compare April 6, 2024 02:33
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 3 times, most recently from f428bf0 to 6f3c322 Compare May 13, 2024 08:09
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 91944c8 to b76f187 Compare May 21, 2024 11:08
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 4 times, most recently from cada211 to f65b690 Compare June 12, 2024 03:05
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 3 times, most recently from ccf2c88 to e80aea5 Compare June 17, 2024 05:13
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 68e3f7e to 83b5324 Compare June 28, 2024 16:48
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 728b9df to b2f25f0 Compare July 16, 2024 06:41
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from b2f25f0 to c8a9174 Compare October 4, 2024 02:20
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 3440c23 to 01fe48a Compare October 29, 2024 03:13
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 3 times, most recently from e826690 to d90c5a9 Compare November 5, 2024 04:08
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from d90c5a9 to 0283ac4 Compare November 15, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants