mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Add an use getAPropertySource()
This commit is contained in:
@@ -879,10 +879,10 @@ module ClassNode {
|
||||
|
||||
override FunctionNode getAnInstanceMember(MemberKind kind) {
|
||||
kind = MemberKind::method() and
|
||||
result = getAPrototypeReference().getAPropertyWrite().getRhs().getALocalSource()
|
||||
result = getAPrototypeReference().getAPropertySource()
|
||||
or
|
||||
kind = MemberKind::method() and
|
||||
result = getConstructor().getReceiver().getAPropertyWrite().getRhs().getALocalSource()
|
||||
result = getConstructor().getReceiver().getAPropertySource()
|
||||
or
|
||||
exists(PropertyAccessor accessor |
|
||||
accessor = getAnAccessor(kind) and
|
||||
@@ -893,7 +893,7 @@ module ClassNode {
|
||||
override FunctionNode getStaticMethod(string name) { result = getAPropertySource(name) }
|
||||
|
||||
override FunctionNode getAStaticMethod() {
|
||||
result = getAPropertyWrite().getRhs().getALocalSource()
|
||||
result = getAPropertySource()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -155,6 +155,13 @@ class SourceNode extends DataFlow::Node {
|
||||
result.flowsTo(getAPropertyWrite(prop).getRhs())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a source node whose value is stored in a property of this node.
|
||||
*/
|
||||
DataFlow::SourceNode getAPropertySource() {
|
||||
result.flowsTo(getAPropertyWrite().getRhs())
|
||||
}
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user