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

Integrate eslint-plugin-redos to Prevent ReDoS Vulnerabilities #3016

Closed
wants to merge 1 commit into from

Conversation

tomo-kn
Copy link

@tomo-kn tomo-kn commented Dec 4, 2023

Background

In light of recent issues and pull requests, specifically Issue #2609 and PR #2824, there's a growing need to proactively prevent Regular Expression Denial of Service (ReDoS) vulnerabilities in our codebase.

Proposal

To address this, I propose the integration of eslint-plugin-redos into our development workflow. This plugin will help us identify potentially vulnerable regex patterns in our code, thereby preventing possible ReDoS attacks.

Implementation

The integration involves adding eslint-plugin-redos to our package.json and configuring it according to our project's coding standards. The official documentation for eslint-plugin-redos can be found here, which provides detailed instructions on how to use and configure the plugin effectively.

Expected Impact

By implementing this plugin, we can enhance the security and robustness of our application, ensuring that similar issues to those addressed in Issue #2609 and PR #2824 are mitigated before they arise. This proactive approach will not only improve our code quality but also align with best practices in software development.

Copy link

netlify bot commented Dec 4, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 54772da
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/656dddbb10f67900085474ba
😎 Deploy Preview https://deploy-preview-3016--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@colinhacks
Copy link
Owner

I appreciate this PR, but Zod's actually moving away from eslint imminently, so I'm going to close this.

Zod also now relies on a fair number of dynamically generated regexes, so I think the best approach to addressing this issue is adding runtime tests using https://www.npmjs.com/package/redos-detector or similar, which I'll do shortly in the v4 branch.

@colinhacks colinhacks closed this Apr 23, 2024
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