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

keyword plugin can hang on very long lines #372

Closed
gpflaum opened this issue Nov 24, 2020 · 1 comment
Closed

keyword plugin can hang on very long lines #372

gpflaum opened this issue Nov 24, 2020 · 1 comment
Labels
pending The issue still needs to be reviewed by one of the maintainers.

Comments

@gpflaum
Copy link
Contributor

gpflaum commented Nov 24, 2020

Scanning a very long line causes a hang at denylist_regex.search(string) in keyword.py for the FOLLOWED_BY_QUOTES_AND_SEMICOLON_REGEX regex.

The attached file VeryLongLine.zip has a 100,000 character line and hangs for at least 15 minutes before I kill it. That file is derived from a real source file.

I'll make a PR for the pre-v1-launch branch. The problem also happens with the master branch.

jimmyhlee94 pushed a commit to jimmyhlee94/detect-secrets that referenced this issue Aug 19, 2021
Co-authored-by: detect-secrets-updater <detect-secrets-updater@ibm.com>
Co-authored-by: Justin D Eyster <Justin.Eyster@ibm.com>
@lorenzodb1 lorenzodb1 added the pending The issue still needs to be reviewed by one of the maintainers. label Jun 15, 2022
@jpdakran
Copy link
Member

This has been fixed with #373. I tested the above file and this runs in 0:00.42. I will consider this resolved. If you have any other questions or you do not consider this resolved - please re-open an issue and the team will be happy to assist. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending The issue still needs to be reviewed by one of the maintainers.
Projects
None yet
Development

No branches or pull requests

3 participants