67 return isinstance(arg, ast.Str) and arg.s == "data" |
67 return isinstance(arg, ast.Str) and arg.s == "data" |
68 |
68 |
69 return False |
69 return False |
70 |
70 |
71 |
71 |
72 def checkTarfileUnsafeMembers(reportError, context, config): # noqa: U100 |
72 def checkTarfileUnsafeMembers(reportError, context, _config): |
73 """ |
73 """ |
74 Function to check for insecure use of 'tarfile.extracall()'. |
74 Function to check for insecure use of 'tarfile.extracall()'. |
75 |
75 |
76 @param reportError function to be used to report errors |
76 @param reportError function to be used to report errors |
77 @type func |
77 @type func |
78 @param context security context object |
78 @param context security context object |
79 @type SecurityContext |
79 @type SecurityContext |
80 @param config dictionary with configuration data |
80 @param _config dictionary with configuration data (unused) |
81 @type dict |
81 @type dict |
82 """ |
82 """ |
83 if all( |
83 if all( |
84 [ |
84 [ |
85 context.isModuleImportedExact("tarfile"), |
85 context.isModuleImportedExact("tarfile"), |