Skip to content

[Bug] - [Uncaught exception: min() arg is an empty sequence in mcn_detect_malicious_metadata_1 check ] #1231

@behnazh-w

Description

@behnazh-w

Description

While running Macaron version 0.18.0 or the main branch, I encountered an uncaught exception in the mcn_detect_malicious_metadata_1 check:

ValueError: min() arg is an empty sequence

Steps to Reproduce

macaron --disable-rich-output --verbose analyze -purl pkg:pypi/caominhtien-tools

Expected Behavior

The analysis should gracefully handle any empty sequence cases without crashing.

Actual Behavior

Instead of completing, Macaron throws the following exception:

File "src/macaron/malware_analyzer/pypi_heuristics/metadata/anomalous_version.py", line 162, in analyze
    days = list(range(min(publish_days) - self.day_publish_error, max(publish_days) + self.day_publish_error + 1))
ValueError: min() arg is an empty sequence

Environment Information

  • Macaron version: 0.18.0 or the main branch.
  • PyPI package analyzed: caominhtien-tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmalware analysisThe issues related to malware analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions