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

Method node_String

aura/analyzers/data_finder.py:44–67  ·  view source on GitHub ↗
(self, context: Context)

Source from the content-addressed store, hash-verified

42 return config.get_settings("aura.min-blob-size", 100)
43
44 def node_String(self, context: Context):
45 val = context.node.value
46
47 if BASE64_REGEX.match(val):
48 try:
49 result = base64.b64decode(val)
50 result = result.decode("utf-8")
51
52 yield Detection(
53 detection_type="Base64Blob",
54 message="Base64 data blob found",
55 node=context.node,
56 score=config.get_score_or_default("base-64-blob", 0),
57 tags={"base64",},
58 extra={"base64_decoded": result},
59 signature=f"data_finder#base64_blob#{utils.fast_checksum(result)}#{context.signature}",
60 )
61 except UnicodeError:
62 pass
63 except binascii.Error:
64 pass
65
66 if len(val) >= self.__min_blob_size and self._no_blobs is False:
67 yield self.__export_blob(val, context)
68
69 def node_Binary(self, context: Context):
70 if len(context.node.value) >= self.__min_blob_size and self._no_blobs is False:

Callers

nothing calls this directly

Calls 3

__export_blobMethod · 0.95
DetectionClass · 0.85
matchMethod · 0.45

Tested by

no test coverage detected