(self, name, taint_level, context, taint_log=None)
| 1088 | return inspect.Signature(parameters=params) |
| 1089 | |
| 1090 | def set_taint(self, name, taint_level, context, taint_log=None): |
| 1091 | if type(name) == int and name < len(self.args): |
| 1092 | name = self.args[name] |
| 1093 | |
| 1094 | if not isinstance(name, Hashable): |
| 1095 | return |
| 1096 | |
| 1097 | if taint_log is None: |
| 1098 | warn("Attempting to modify argument taint but log is not set", stacklevel=2) |
| 1099 | |
| 1100 | if name in self.taints: |
| 1101 | t = self.taints[name] |
| 1102 | if taint_level > t: |
| 1103 | self.taints[name] = taint_level |
| 1104 | if taint_log: |
| 1105 | self.taint_logs[name].append(taint_log) |
| 1106 | context.visitor.modified = True |
| 1107 | return |
| 1108 | else: |
| 1109 | self.taints[name] = taint_level |
| 1110 | if taint_log: |
| 1111 | self.taint_logs[name].append(taint_log) |
| 1112 | context.visitor.modified = True |
| 1113 | |
| 1114 | def to_parameters(self): |
| 1115 | params = [] |
no outgoing calls
no test coverage detected