mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Python: Move and rename query
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
private import python
|
||||
import semmle.python.dataflow.new.DataFlow
|
||||
|
||||
predicate pointsToOrigin(DataFlow::CfgNode pointer, DataFlow::CfgNode origin) {
|
||||
origin.getNode() = pointer.getNode().pointsTo().getOrigin()
|
||||
}
|
||||
|
||||
class PointsToConfiguration extends DataFlow::Configuration {
|
||||
PointsToConfiguration() { this = "PointsToConfiguration" }
|
||||
|
||||
override predicate isSource(DataFlow::Node node) { pointsToOrigin(_, node) }
|
||||
|
||||
override predicate isSink(DataFlow::Node node) { pointsToOrigin(node, _) }
|
||||
}
|
||||
|
||||
predicate hasFlow(DataFlow::Node origin, DataFlow::Node pointer) {
|
||||
exists(PointsToConfiguration config, DataFlow::PathNode source, DataFlow::PathNode sink |
|
||||
source.getNode() = origin and
|
||||
sink.getNode() = pointer and
|
||||
config.hasFlowPath(source, sink)
|
||||
)
|
||||
}
|
||||
|
||||
from DataFlow::Node pointer, DataFlow::Node origin
|
||||
where
|
||||
pointsToOrigin(pointer, origin) and
|
||||
not hasFlow(origin, pointer)
|
||||
select origin, pointer
|
||||
@@ -1,19 +0,0 @@
|
||||
# This file contains snippets from snapshots that displayed interesting results for `pointsto.ql`.
|
||||
|
||||
class Chatbot:
|
||||
"""
|
||||
Main class which launch the training or testing mode
|
||||
"""
|
||||
|
||||
class TestMode:
|
||||
""" Simple structure representing the different testing modes
|
||||
"""
|
||||
ALL = 'all'
|
||||
INTERACTIVE = 'interactive' # The user can write his own questions
|
||||
DAEMON = 'daemon' # The chatbot runs on background and can regularly be called to predict something
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
"""
|
||||
# Model/dataset parameters
|
||||
self.args = None
|
||||
Reference in New Issue
Block a user