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