Module implementing a context class for security related checks.
None |
SecurityContext | Class implementing a context class for security related checks. |
None |
Class implementing a context class for security related checks.
None |
None |
SecurityContext | Constructor |
__getLiteralValue | Private method to turn AST literals into native Python types. |
__repr__ | Special method to generate representation of object for printing or interactive use. |
bytesVal | Public method to get the value of a standalone bytes object. |
callArgs | Public method to get a list of function args. |
callArgsCount | Public method to get the number of args a function call has. |
callFunctionName | Public method to get the name (not FQ) of a function call. |
callFunctionNameQual | Public method to get the FQ name of a function call. |
callKeywords | Public method to get a dictionary of keyword parameters. |
checkCallArgValue | Public method to check for a value of a named argument in a function call. |
functionDefDefaultsQual | Public method to get a list of fully qualified default values in a function def. |
getCallArgAtPosition | Public method to get a positional argument at the specified position (if it exists). |
getCallArgValue | Public method to get the value of a named argument in a function call. |
getLinenoForCallArg | Public method to get the line number for a specific named argument. |
getOffsetForCallArg | Public method to get the offset for a specific named argument. |
isModuleBeingImported | Public method to check for the given module is currently being imported. |
isModuleImportedExact | Public method to check if a given module has been imported; only exact matches. |
isModuleImportedLike | Public method to check if a given module has been imported; given module exists. |
node | Public method to get the raw AST node associated with the context. |
statement | Public method to get the raw AST for the current statement. |
stringVal | Public method to get the value of a standalone unicode or string object. |
stringValAsEscapedBytes | Public method to get the escaped value of the object. |
None |
Constructor
Initialize the class with a context dictionary or an empty dictionary.
Private method to turn AST literals into native Python types.
Special method to generate representation of object for printing or interactive use.
Public method to get the value of a standalone bytes object.
Public method to get a list of function args.
Public method to get the number of args a function call has.
Public method to get the name (not FQ) of a function call.
Public method to get the FQ name of a function call.
Public method to get a dictionary of keyword parameters.
Public method to check for a value of a named argument in a function call.
Public method to get a list of fully qualified default values in a function def.
Public method to get a positional argument at the specified position (if it exists).
Public method to get the value of a named argument in a function call.
Public method to get the line number for a specific named argument.
Public method to get the offset for a specific named argument.
Public method to check for the given module is currently being imported.
Public method to check if a given module has been imported; only exact matches.
Public method to check if a given module has been imported; given module exists.
Public method to get the raw AST node associated with the context.
Public method to get the raw AST for the current statement.
Public method to get the value of a standalone unicode or string object.
Public method to get the escaped value of the object.
Turn the value of a string or bytes object into a byte sequence with unknown, control, and \\ characters escaped.
This function should be used when looking for a known sequence in a potentially badly encoded string in the code.