What is the Age Marshall and how does it work?
mainThe Age Marshall is a security validation component in NPQ that belongs to the PackageHealth category. It analyzes package age and maturity to identify potential supply chain risks by performing two primary checks:
- New Package Detection: Flags packages that are too new (less than 22 days old) to prevent installation of potentially malicious or typosquatting packages that haven't undergone community review.
- Abandoned Package Detection: Warns about packages that appear unmaintained (versions older than 365 days) to alert users to potentially unpatched security vulnerabilities.
It works by fetching metadata from the npm registry and analyzing the time.created (package creation) and time[version] (version release) fields using millisecond precision.