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

Method should_continue

aura/uri_handlers/base.py:331–353  ·  view source on GitHub ↗

Determine if the processing of this scan location should continue Currently, the following reasons can halt the processing: - maximum depth was reached (recursive unpacking) :return: True if the processing should continue otherwise an instance of Rule that would hal

(self)

Source from the content-addressed store, hash-verified

329 return str(target)
330
331 def should_continue(self) -> Union[bool, Detection]:
332 """
333 Determine if the processing of this scan location should continue
334 Currently, the following reasons can halt the processing:
335 - maximum depth was reached (recursive unpacking)
336
337 :return: True if the processing should continue otherwise an instance of Rule that would halt the processing
338 """
339 max_depth = int(config.CFG["aura"].get("max-depth", 5))
340 if self.metadata["depth"] > max_depth:
341 d = DataProcessing(
342 message = f"Maximum processing depth reached",
343 extra = {
344 "reason": "max_depth",
345 "location": str(self)
346 },
347 location=self.location,
348 signature = f"data_processing#max_depth#{str(self)}"
349 )
350 self.post_analysis([d])
351 return d
352
353 return True
354
355 def pprint(self):
356 from prettyprinter import pprint as pp

Callers 1

runMethod · 0.80

Calls 3

post_analysisMethod · 0.95
DataProcessingClass · 0.85
getMethod · 0.80

Tested by

no test coverage detected