Merge pull request #1262 from sb-semmle/more-spring-sources

Parameters annotated with Spring's @RequestBody and @PathVariable are remote input sources.
This commit is contained in:
yh-semmle
2019-04-18 18:08:44 -04:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -22,5 +22,6 @@
methods. This means that more guards are recognized yielding precision
improvements in a number of queries including `java/index-out-of-bounds`,
`java/dereferenced-value-may-be-null`, and `java/useless-null-check`.
* Spring framework support is enhanced by taking into account additional
annotations that indicate remote user input. This affects all security
queries, which may yield additional results.

View File

@@ -11,7 +11,9 @@ class SpringServletInputAnnotation extends Annotation {
a.hasName("RequestParam") or
a.hasName("RequestHeader") or
a.hasName("CookieValue") or
a.hasName("RequestPart")
a.hasName("RequestPart") or
a.hasName("PathVariable") or
a.hasName("RequestBody")
)
}
}