Skip to content

Commit d19911b

Browse files
committed
fix: now depends on source code repo being skipped as well
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
1 parent 899fa6a commit d19911b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/macaron/malware_analyzer/pypi_heuristics/sourcecode/pypi_sourcecode_analyzer.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ def __init__(self, resources_path: str | None = None) -> None:
5353
super().__init__(
5454
name="suspicious_patterns_analyzer",
5555
heuristic=Heuristics.SUSPICIOUS_PATTERNS,
56-
depends_on=[(Heuristics.SOURCE_CODE_REPO, HeuristicResult.FAIL)],
56+
# We include the SKIP condition here as we want to consider the case where EMPTY_PROJECT_LINK fails,
57+
# meaning SOURCE_CODE_REPO is skipped, as this is still a scenario where the source code repository
58+
# is not available, so we want to run source code analysis.
59+
depends_on=[
60+
(Heuristics.SOURCE_CODE_REPO, HeuristicResult.FAIL),
61+
(Heuristics.SOURCE_CODE_REPO, HeuristicResult.SKIP),
62+
],
5763
)
5864
if resources_path is None:
5965
resources_path = global_config.resources_path

0 commit comments

Comments
 (0)