Module implementing an AST node visitor for security checks.
None |
SecurityNodeVisitor | Class implementing an AST node visitor for security checks. |
None |
Class implementing an AST node visitor for security checks.
None |
None |
SecurityNodeVisitor | Constructor |
__postVisit | Private method to clean up after a node was visited. |
__preVisit | Private method to set up a context for the visit method. |
__runChecks | Private method to run all enabled checks for a given check type. |
generic_visit | Public method to drive the node visitor. |
visit | Public method to inspected an AST node. |
visit_Bytes | Public method defining a visitor for Bytes nodes. |
visit_Call | Public method defining a visitor for AST Call nodes. |
visit_ClassDef | Public method defining a visitor for AST ClassDef nodes. |
visit_Constant | Public method defining a visitor for Constant nodes. |
visit_FunctionDef | Public method defining a visitor for AST FunctionDef nodes. |
visit_Import | Public method defining a visitor for AST Import nodes. |
visit_ImportFrom | Public method defining a visitor for AST Import nodes. |
visit_Str | Public method defining a visitor for String nodes. |
None |
Constructor
Private method to clean up after a node was visited.
Private method to set up a context for the visit method.
Private method to run all enabled checks for a given check type.
Public method to drive the node visitor.
Public method to inspected an AST node.
Public method defining a visitor for Bytes nodes.
This adds relevant information about node to the context for use in tests which inspect strings.
Public method defining a visitor for AST Call nodes.
Add relevant information about the node to the context for use in tests which inspect function calls.
Public method defining a visitor for AST ClassDef nodes.
Add class name to current namespace for all descendants.
Public method defining a visitor for Constant nodes.
This calls the appropriate method for the node type. It maintains compatibility with <3.6 and 3.8+
Public method defining a visitor for AST FunctionDef nodes.
Add relevant information about the node to the context for use in tests which inspect function definitions. Add the function name to the current namespace for all descendants.
Public method defining a visitor for AST Import nodes.
Public method defining a visitor for AST Import nodes.
This adds relevant information about the node to the context for use in tests which inspect imports.
Public method defining a visitor for String nodes.
This adds relevant information about node to the context for use in tests which inspect strings.