Skip to content

chore: migrate to oxlint - #98

Open
ASafaeirad wants to merge 1 commit into
mainfrom
oxlint
Open

chore: migrate to oxlint#98
ASafaeirad wants to merge 1 commit into
mainfrom
oxlint

Conversation

@ASafaeirad

Copy link
Copy Markdown
Member

No description provided.

@amir-rahmanii

Copy link
Copy Markdown
Member

Hey @copilot, please review this PR

@ASafaeirad

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector 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.

馃挕 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecc20354d2

鈩癸笍 About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 馃憤.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/object/clone.ts
...prevState,
[key]: clone(input[key]),
}),
(prevState, key) => Object.assign(prevState, { [key]: clone(input[key]) }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve __proto__ as an own property when cloning

When input has an own enumerable __proto__ property, such as an object returned by JSON.parse, Object.assign invokes the inherited __proto__ setter instead of defining that property. Consequently, clone(input) drops the own key and gives the clone an attacker-controlled prototype (for example, a supplied polluted property becomes inherited), whereas the previous object-spread reducer preserved the data safely.

Useful? React with 馃憤聽/ 馃憥.

Comment thread src/object/merge.ts

return {
...state,
return Object.assign(state, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve __proto__ keys in merged objects

When either merged object contains an own enumerable __proto__ key, for example from untrusted JSON, this assignment invokes Object.prototype.__proto__'s setter. The merged result therefore loses the own key and acquires the supplied object as its prototype, allowing attacker-controlled inherited properties to affect consumers; the previous spread expression defined __proto__ as an ordinary own property.

Useful? React with 馃憤聽/ 馃憥.

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