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

Method _gen_hit

aura/analyzers/python/secrets.py:31–44  ·  view source on GitHub ↗
(self, context, name, secret, **extra)

Source from the content-addressed store, hash-verified

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:
33 return
34
35 hit = Detection(
36 detection_type="LeakingSecret",
37 message="Possible sensitive leaking secret",
38 extra={"name": name, "secret": secret},
39 line_no=context.node.line_no,
40 signature=f"leaking_secret#{context.visitor.normalized_path}#{context.node.line_no}",
41 )
42
43 hit.extra.update(extra)
44 yield hit
45
46 def node_Call(self, context):
47 f_name = context.node.cached_full_name

Callers 4

node_VarMethod · 0.95
node_CallMethod · 0.95
node_StringMethod · 0.95
node_CompareMethod · 0.95

Calls 1

DetectionClass · 0.85

Tested by

no test coverage detected