Skip to content

Feature request: denylist a version level for specific package #358

Description

@UmanGarbag

Context

We run the proxy as the single entry point for all package installs in our company (PyPI, Cargo, npm, apt). Cooldown and artifact scanning are both enabled.

This works well for admission. It does not cover a version that was clean when it was first fetched and becomes vulnerable later.

Current behaviour

Two mechanisms exist today, and neither can express "block this specificversion":

  • Cooldown filters by publish age. CooldownConfig.Packages is keyed by package PURL, so a per-package override changes the delay for the whole package, not for one version.
  • Artifact scanning can block a specific version, but only runs on a cache miss, the scan happens after the artifact is staged and before it is committed to the cache DB. Once an artifact is cached, later requests are served from storage and never re-scanned.

The practical consequences are:

  1. A cached version that later gets a CVE keeps being served until it is manually removed from storage and the DB.
  2. Even after eviction, the block surfaces as a 403 on the artifact download. The resolver has already selected that version from the metadata, so the install fails instead of falling back to a different version.

Proposal

A version-level denylist, applied at the same place cooldown already filters metadata responses:

denylist:
  packages:
    - "pkg:pypi/requests@2.31.0"
    - "pkg:cargo/some-crate@1.2.3"

A denied version is omitted from metadata responses, exactly like a version still in cooldown. The resolver then picks another version and the build succeeds.

Thanks you for taking in count !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions