saferegex | testing regular expressions for ReDoS vulnerabilities | Regex library
kandi X-RAY | saferegex Summary
kandi X-RAY | saferegex Summary
SafeRegex is a tool that tests regular expressions for ReDoS vulnerabilities. In contrast to similar tools, SafeRegex doesn't use plain fuzzing to detect vulnerabilites but uses an approach similar to model checking. This makes it much more effective than plain fuzzers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Entry point for example
- Compile a closure
- Compile a character class
- Matches nodes recursively
- Sample a set of samples from overlapping samples
- Combine head and tail
- Returns a hash code for this group
- Simplify this expression
- Program entry point
- Gets the instructions for the current regular expression
- Constructs an expression that matches this pattern with the given pattern
- Compares this object to another
- Compares this Option
- Simplified expression substitution
- Returns the intersection of this set
- Returns a string representation of this pattern
- Returns a list of Strings that match a regular expression
- Compares this sequence to another sequence
- Returns the best match
- Returns a hashCode of this instance
- Compute the hashCode of this set
- Compute a unique hash code
- Perform a repetition
- Splits a string into an array of strings
- Sets the instructions for this regular expression
- Generate a set of samples
saferegex Key Features
saferegex Examples and Code Snippets
$ ./mvnw clean package
$ java -jar target/saferegex.jar "(a|aa)+"
Testing: (a|aa)+
More than 10000 samples found.
***
This expression is vulnerable.
Sample input: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab
$ java -jar target/saferegex.jar "(ht|f)tp(s?)
Community Discussions
Trending Discussions on saferegex
QUESTION
I want to search for a regex in a pdf, and add annotations to it according, using the results from the regex. I have built a simple function that does this. As the amazing community (really amazing people who used their time helping me) posted I can I can use the decomposedStringWithCompatibilityMapping to search for the desired expression correctly in the pdf, but afterwards when I perform a pdf selection to find the bounds of it, I encounter a difference. I send you my code and some pictures.
...ANSWER
Answered 2020-Sep-11 at 22:37The only alternative I can think right now is to use the original string and fix the malformed ranges. Try like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install saferegex
You can use saferegex like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the saferegex component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page