Open plr0man opened 7 years ago
Personally, I created a custom Injection detector, then integrated the test:
`public class CustomInjectionDetector extends BasicInjectionDetector {
public CustomInjectionDetector(BugReporter bugReporter) {
super(bugReporter);
loadConfiguredSinks("[command file]", "COMMAND_INJECTION");
}
@Override
protected int getPriority(Taint taint) {
if (!taint.isSafe() && taint.hasTag(Taint.Tag.COMMAND_INJECTION_SAFE)) {
return Priorities.IGNORE_PRIORITY;
} else {
return super.getPriority(taint);
}
}
} `
The Unvalidated Redirect Detector does not detect issues similar to the following:
resp.addHeader("Location", req.getParameter("urlRedirect"));
In this case the top LDC - the one the detector is comparing against is going to be "urlRedirect", not "Location" as expected. Any suggestions how to fix that?