mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
JS: introduce DataFlow::HtmlAttributeNode
This commit is contained in:
@@ -40,7 +40,8 @@ module DataFlow {
|
||||
} or
|
||||
TDestructuredModuleImportNode(ImportDeclaration decl) {
|
||||
exists(decl.getASpecifier().getImportedName())
|
||||
}
|
||||
} or
|
||||
THtmlAttributeNode(HTML::Attribute attr)
|
||||
|
||||
/**
|
||||
* A node in the data flow graph.
|
||||
@@ -738,6 +739,27 @@ module DataFlow {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A data flow node representing an HTML attribute.
|
||||
*/
|
||||
private class HtmlAttributeNode extends DataFlow::Node, THtmlAttributeNode {
|
||||
HTML::Attribute attr;
|
||||
|
||||
HtmlAttributeNode() { this = THtmlAttributeNode(attr) }
|
||||
|
||||
override string toString() { result = attr.toString() }
|
||||
|
||||
override ASTNode getAstNode() { none() }
|
||||
|
||||
override BasicBlock getBasicBlock() { none() }
|
||||
|
||||
override predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
attr.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides classes representing various kinds of calls.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user