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

Method from_generic_exception

aura/analyzers/archive.py:28–41  ·  view source on GitHub ↗
(cls, location: ScanLocation, exc: Exception)

Source from the content-addressed store, hash-verified

26class ArchiveAnomaly(Detection):
27 @classmethod
28 def from_generic_exception(cls, location: ScanLocation, exc: Exception):
29 return cls(
30 detection_type=cls.__name__,
31 location = location.location,
32 message="Could not open the archive for analysis",
33 signature=f"archive_anomaly#read_error#{location.location}",
34 score=config.get_score_or_default("corrupted-archive", 10),
35 extra={
36 "reason": "archive_read_error",
37 "exc_message": exc.args[0],
38 "exc_type": exc.__class__.__name__,
39 "mime": location.metadata["mime"]
40 },
41 )
42
43
44def is_suspicious(pth, location):

Callers 1

archive_analyzerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected