mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Python: Refactor Dill.qll
So it matches the layout of all our other qll modules modeling a PyPI package.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Provides classes modeling security-relevant aspects of the 'dill' package.
|
||||
* Provides classes modeling security-relevant aspects of the `dill` PyPI package.
|
||||
* See https://pypi.org/project/dill/.
|
||||
*/
|
||||
|
||||
@@ -10,11 +10,16 @@ private import semmle.python.Concepts
|
||||
private import semmle.python.ApiGraphs
|
||||
|
||||
/**
|
||||
* Provides models for the `dill` PyPI package.
|
||||
* See https://pypi.org/project/dill/.
|
||||
*/
|
||||
private module Dill {
|
||||
/**
|
||||
* A call to `dill.loads`
|
||||
* See https://pypi.org/project/dill/ (which currently refers you
|
||||
* to https://docs.python.org/3/library/pickle.html#pickle.loads)
|
||||
*/
|
||||
private class DillLoadsCall extends Decoding::Range, DataFlow::CallCfgNode {
|
||||
private class DillLoadsCall extends Decoding::Range, DataFlow::CallCfgNode {
|
||||
DillLoadsCall() { this = API::moduleImport("dill").getMember("loads").getACall() }
|
||||
|
||||
override predicate mayExecuteInput() { any() }
|
||||
@@ -24,4 +29,5 @@ private class DillLoadsCall extends Decoding::Range, DataFlow::CallCfgNode {
|
||||
override DataFlow::Node getOutput() { result = this }
|
||||
|
||||
override string getFormat() { result = "dill" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user