Skip to content

Generalise cooldown into a version filter interface #127

@andrew

Description

@andrew

Nine of the package handlers can already remove versions from a package's metadata before serving it. Today they only do this for cooldown (hiding versions that were published too recently).

The same hook is needed for hiding versions with known vulnerabilities and for namespace blocking. Rather than each feature adding its own check, replace the direct proxy.Cooldown.IsAllowed(...) calls with a single proxy.Filter.IsAllowed(ecosystem, purl, version, publishedAt) that cooldown sits behind today and other checks can be added to later.

This is a refactor with no behaviour change on its own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions