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)
| 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 |
no test coverage detected