
preprocessor.NonpreciseSubstitutionPreprocessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of regex-static-analysis Show documentation
Show all versions of regex-static-analysis Show documentation
A tool to perform static analysis on regexes to determine whether they are vulnerable to ReDoS.
package preprocessor;
public class NonpreciseSubstitutionPreprocessor extends ParsingPreprocessor {
public NonpreciseSubstitutionPreprocessor() {
super();
ALLOW_LOOKAROUND = true;
DequantifierRule dr = new DequantifierRule(); /* we first need to remove the quantifying symbols */
addRule(dr);
EscapeSequenceExpansionRule eer = new EscapeSequenceExpansionRule();
addRule(eer);
WildCardExpansionRule wcer = new WildCardExpansionRule();
addRule(wcer);
PlusOperatorExpansion poe = new PlusOperatorExpansion();
addRule(poe);
QuestionMarkOperatorExpansion qmoe = new QuestionMarkOperatorExpansion();
addRule(qmoe);
//CountClosureOperatorExpansion ccoe = new CountClosureOperatorExpansion();
//addRule(ccoe);
NonpreciseCountClosureOperatorExpansion nlccoe = new NonpreciseCountClosureOperatorExpansion();
addRule(nlccoe);
NonpreciseLookaroundExpansion nlae = new NonpreciseLookaroundExpansion();
addRule(nlae);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy