mirror of
https://github.com/github/codeql.git
synced 2026-03-01 21:34:50 +01:00
Java: add remote user input and taint step for Guice framework
This commit is contained in:
@@ -17,6 +17,7 @@ import semmle.code.java.frameworks.android.WebView
|
||||
import semmle.code.java.frameworks.JaxWS
|
||||
import semmle.code.java.frameworks.android.Intent
|
||||
import semmle.code.java.frameworks.SpringWeb
|
||||
import semmle.code.java.frameworks.Guice
|
||||
|
||||
/** Class for `tainted` user input. */
|
||||
abstract class UserInput extends DataFlow::Node { }
|
||||
@@ -69,6 +70,11 @@ class RemoteUserInput extends UserInput {
|
||||
)
|
||||
or
|
||||
this.asParameter().getAnAnnotation() instanceof SpringServletInputAnnotation
|
||||
or
|
||||
exists(GuiceRequestParametersAnnotation a |
|
||||
a = this.asParameter().getAnAnnotation() or
|
||||
a = this.asExpr().(FieldRead).getField().getAnAnnotation()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user