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

Method node_Var

aura/analyzers/python/secrets.py:19–29  ·  view source on GitHub ↗
(self, context)

Source from the content-addressed store, hash-verified

17 """Look for leaking secrets such as passwords or API tokens"""
18
19 def node_Var(self, context):
20 name = str(context.node.var_name)
21
22 if not SECRET_REGEX.match(name):
23 return
24 elif not isinstance(context.node.value, String):
25 return
26
27 secret = str(context.node.value)
28
29 yield from self._gen_hit(context, name, secret, extra={"type": "variable"})
30
31 def _gen_hit(self, context, name, secret, **extra):
32 if len(secret) < 5:

Callers

nothing calls this directly

Calls 2

_gen_hitMethod · 0.95
matchMethod · 0.45

Tested by

no test coverage detected