MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / set_taint

Method set_taint

aura/analyzers/python/nodes.py:1090–1112  ·  view source on GitHub ↗
(self, name, taint_level, context, taint_log=None)

Source from the content-addressed store, hash-verified

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 = []

Callers 3

set_taintMethod · 0.45
__mark_sourcesMethod · 0.45
__propagate_taintMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected