python: add name to concept

This commit is contained in:
Rasmus Lerchedahl Petersen
2022-02-08 12:40:13 +01:00
parent 8665fe4817
commit 3f36ccba92

View File

@@ -471,6 +471,12 @@ class XPathConstruction extends DataFlow::Node {
/** Gets the argument that specifies the XPath expressions to be constructed. */
DataFlow::Node getXPath() { result = range.getXPath() }
/**
* Gets the name of this XPath expression construction, typically the name of an executing method.
* This is used for nice alert messages and should include the module if possible.
*/
string getName() { result = range.getName() }
}
/** Provides a class for modeling new XPath construction APIs. */
@@ -487,6 +493,12 @@ module XPathConstruction {
abstract class Range extends DataFlow::Node {
/** Gets the argument that specifies the XPath expressions to be constructed. */
abstract DataFlow::Node getXPath();
/**
* Gets the name of this XPath expression construction, typically the name of an executing method.
* This is used for nice alert messages and should include the module if possible.
*/
abstract string getName();
}
}