mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
check that either there are no custom message interpolator configured, or there is at least one that is insecure
This commit is contained in:
@@ -85,7 +85,11 @@ class BeanValidationConfig extends TaintTracking::Configuration {
|
|||||||
|
|
||||||
from BeanValidationConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
from BeanValidationConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||||
where
|
where
|
||||||
not forall(SetMessageInterpolatorCall c | c.isSafe()) and
|
(
|
||||||
|
not exists(SetMessageInterpolatorCall c)
|
||||||
|
or
|
||||||
|
exists(SetMessageInterpolatorCall c | not c.isSafe())
|
||||||
|
) and
|
||||||
cfg.hasFlowPath(source, sink)
|
cfg.hasFlowPath(source, sink)
|
||||||
select sink.getNode(), source, sink,
|
select sink.getNode(), source, sink,
|
||||||
"Custom constraint error message contains unsanitized user data"
|
"Custom constraint error message contains unsanitized user data"
|
||||||
|
|||||||
Reference in New Issue
Block a user