move source to FlowSources.qll

This commit is contained in:
Alvaro Muñoz
2020-10-27 14:33:50 +01:00
parent 2bab9d22e9
commit a274a1516a

View File

@@ -14,23 +14,6 @@ import semmle.code.java.dataflow.TaintTracking
import semmle.code.java.dataflow.FlowSources
import DataFlow::PathGraph
class BeanValidationSource extends RemoteFlowSource {
BeanValidationSource() {
exists(Method m, Parameter v |
this.asParameter() = v and
m.getParameter(0) = v and
m
.getDeclaringType()
.getASourceSupertype+()
.hasQualifiedName("javax.validation", "ConstraintValidator") and
m.hasName("isValid") and
m.fromSource()
)
}
override string getSourceType() { result = "BeanValidation source" }
}
class BuildConstraintViolationWithTemplateMethod extends Method {
BuildConstraintViolationWithTemplateMethod() {
this.getDeclaringType()