mirror of
https://github.com/github/codeql.git
synced 2026-03-01 21:34:50 +01:00
Java: add remote user input for Struts 2 ActionSupport
This commit is contained in:
@@ -18,6 +18,7 @@ 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
|
||||
import semmle.code.java.frameworks.struts.StrutsActions
|
||||
|
||||
/** Class for `tainted` user input. */
|
||||
abstract class UserInput extends DataFlow::Node { }
|
||||
@@ -75,6 +76,8 @@ class RemoteUserInput extends UserInput {
|
||||
a = this.asParameter().getAnAnnotation() or
|
||||
a = this.asExpr().(FieldRead).getField().getAnAnnotation()
|
||||
)
|
||||
or
|
||||
exists(Struts2ActionSupportClass c | c.getASetterMethod().getField() = this.asExpr().(FieldRead).getField())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user