(self, context, name, secret, **extra)
| 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 |
no test coverage detected