Skip to content

Commit 3f36ccb

Browse files
committed
python: add name to concept
1 parent 8665fe4 commit 3f36ccb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/ql/lib/semmle/python/Concepts.qll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,12 @@ class XPathConstruction extends DataFlow::Node {
471471

472472
/** Gets the argument that specifies the XPath expressions to be constructed. */
473473
DataFlow::Node getXPath() { result = range.getXPath() }
474+
475+
/**
476+
* Gets the name of this XPath expression construction, typically the name of an executing method.
477+
* This is used for nice alert messages and should include the module if possible.
478+
*/
479+
string getName() { result = range.getName() }
474480
}
475481

476482
/** Provides a class for modeling new XPath construction APIs. */
@@ -487,6 +493,12 @@ module XPathConstruction {
487493
abstract class Range extends DataFlow::Node {
488494
/** Gets the argument that specifies the XPath expressions to be constructed. */
489495
abstract DataFlow::Node getXPath();
496+
497+
/**
498+
* Gets the name of this XPath expression construction, typically the name of an executing method.
499+
* This is used for nice alert messages and should include the module if possible.
500+
*/
501+
abstract string getName();
490502
}
491503
}
492504

0 commit comments

Comments
 (0)