How to Create an Immature Package Policy

Use Case:

A security team wants to block newly published open-source package versions until they reach a minimum age. This recommended practice reduces the risk of supply chain attacks and package hijacks by giving the security community time to detect malicious or compromised releases before they enter your software development lifecycle.

Workflow Steps:

  1. Enable Curation on Target Repositories
    • Navigate to Administration > Curation > Remote Repositories.
    • Enable Curation for the package repositories you want to protect (for example, npm, Maven, or PyPI).
  2. Create an Immature Package Policy
    • Go to Application > Curation > Policies and click Create Policy.
    • Name the policy (for example, Block Immature Packages).
    • Under Policy Scope, select the curated repositories, or choose All Curated to apply the policy organization-wide.
  3. Define the Immature Condition
    • In the Policy Condition step, select Package Version is Immature.
    • Set the minimum age (number of days since the version release date). Start with a short window in dry run (for example, two days), then increase to a stricter threshold that fits your risk tolerance (for example, seven to 14 days) before you enforce blocking.
  4. (Optional) Relax the Policy When a Package Fixes a CVE
    • Many teams allow an immature version when it fixes a high-severity CVE that already exists in your repositories.
    • Create a custom condition from the Package Version in Mature State template and enable the relaxation that allows the package if it fixes a CVE in your repositories. You can combine this with a CVSS threshold that matches your risk policy.
    • For the full custom condition workflow, see Create Custom Conditions.
  5. Select an Action and Notifications
    • Choose Dry Run first to estimate impact without blocking developers. Review results under Application > Curation > Audit Events.
    • When you are ready to enforce, change the action to Block.
    • Enable Email notifications to alert the requester and your security team when a package is blocked.
    • Click Save Policy.
  6. Understand Compliant Version Selection Behavior
    • If Compliant Version Selection (CVS) is available for the package type, Curation can return the highest mature version that passes your policies instead of failing the request. See Compliant Version Selection.
  7. Validate the Policy
    • Attempt to download a package version that is newer than your configured age threshold.
    • Confirm the request is blocked (or recorded in dry run) and that notifications are sent when configured.
    • Review details under Application > Curation > Audit Events.

Did this page help you?