Skip to content

Rules

Every rule pixi policy check runs, with the text pixi policy explain <RULE> prints. Each rule's keys are in the policy file reference.

Rule Checks
sources.channels Conda packages come only from the channels the policy allows
sources.indexes PyPI packages come only from the indexes the policy allows
sources.git No package comes from a git repository unless the policy allows it
sources.url No package comes from a direct URL unless the policy allows it
sources.path No package comes from a local path unless the policy allows it
bans.deny No package, or package version, the policy bans
licenses.deny No package needs a license the policy denies
licenses.review Packages that need a license under review are reported for it
licenses.not-allowed Every package can be used under the licenses the policy allows
licenses.unknown Every package declares an SPDX license
licenses.ambiguous No package's license is a name that could be more than one SPDX license
advisories.vulnerable A package has a known vulnerability at or above fail-on, known exploited, or above the EPSS threshold
advisories.unknown A package has a known vulnerability whose severity no advisory gives
advisories.unavailable The advisory data cannot be read, so no package could be checked
freshness.build-age A package was built, or uploaded to PyPI, longer ago than max-build-age-days
freshness.majors-behind A package is more major versions behind its channel's or PyPI's newest than allowed
freshness.archived A conda-forge package comes from an archived feedstock
freshness.unknown The channel or PyPI data says nothing about a package a freshness rule checks
freshness.unavailable A source of channel, PyPI or feedstock data cannot be read, so the checks it feeds could not run
python.older No environment runs a Python older than the policy's standard
python.newer No environment runs a Python newer than the policy's standard
python.requires-python The pyproject's requires-python starts at the policy's standard Python and admits it
hygiene.conda-pypi-duplicate No PyPI package is one a conda package in the same environment provides
hygiene.unavailable conda-forge's PyPI mapping cannot be read, so some conda packages were not compared
manifest.wildcard-spec No dependency is given as \*
manifest.python-pinned Python is constrained to one minor version or narrower
manifest.required-platforms The workspace lists every platform the policy requires
manifest.exclude-newer exclude-newer keeps packages out for at least min-exclude-newer-days
lock.present The workspace has a pixi.lock
lock.complete Every environment is locked for every platform it is solved for
lock.in-sync pixi.lock still satisfies the manifest
waivers.expired A waiver has expired, and what it waived fails again
waivers.unused A waiver matches no finding
waivers.too-long A waiver runs further out than max-waiver-days

sources.channels

Conda packages come only from the channels the policy allows.

Key: [sources] allowed-channels, a list of channel names or URLs. A name ("conda-forge") matches its anaconda.org and prefix.dev URLs only; any other host is listed by URL. Mirrors are matched as the channel they mirror, since pixi.lock records that channel.

[sources]
allowed-channels = ["conda-forge", "https://conda.example.com/prod"]

Keys: [sources] allowed-channels.

sources.indexes

PyPI packages come only from the indexes the policy allows.

Key: [sources] allowed-indexes, a list of PyPI index URLs (trailing slashes and host case do not matter). pixi.lock records a wheel's index; one from the default index is checked against it.

[sources]
allowed-indexes = ["https://pypi.org/simple"]

Keys: [sources] allowed-indexes.

sources.git

No package comes from a git repository unless the policy allows it.

Key: [sources] allow-git (default: allowed). Set it to false to fail any package, conda (pixi-build) or PyPI, that comes from a git repository.

[sources]
allow-git = false

Keys: [sources] allow-git.

sources.url

No package comes from a direct URL unless the policy allows it.

Key: [sources] allow-url (default: allowed). Set it to false to fail any package that comes from a direct URL: an archive, not a channel or an index.

[sources]
allow-url = false

Keys: [sources] allow-url.

sources.path

No package comes from a local path unless the policy allows it.

Key: [sources] allow-path (default: allowed). Set it to false to fail any package that comes from a local path, including a workspace package pixi builds from source.

[sources]
allow-path = false

Keys: [sources] allow-path.

bans.deny

No package, or package version, the policy bans.

Key: [bans] deny, a list of bans: name, and optionally version (conda's rules for conda packages, PEP 440 for PyPI ones), build (a conda build-string pattern), kind ("conda" or "pypi"), reason and use-instead. A ban on a PyPI name also catches a conda package that provides it.

[bans]
deny = [
  { name = "pycrypto", reason = "unmaintained", use-instead = "pycryptodome" },
  { name = "openssl", version = "<3", reason = "EOL" },
]

Keys: [bans] deny, [bans] deny: name, [bans] deny: version, [bans] deny: build, [bans] deny: kind, [bans] deny: reason, [bans] deny: use-instead.

licenses.deny

No package needs a license the policy denies.

Key: [licenses] deny, SPDX identifiers or patterns ("GPL-3.0-*"). A package fails when its license cannot be satisfied without a denied license: MIT OR GPL-3.0-only passes, since MIT is an option. The verdict is the one pixi-sbom's --deny-license gives.

[licenses]
deny = ["GPL-3.0-*", "AGPL-*"]

Keys: [licenses] deny.

licenses.review

Packages that need a license under review are reported for it.

Key: [licenses] review, SPDX identifiers or patterns. A package that needs one is reported as a warning; review licenses count as allowed for licenses.not-allowed.

[licenses]
review = ["LGPL-*"]

Keys: [licenses] review.

licenses.not-allowed

Every package can be used under the licenses the policy allows.

Key: [licenses] allow. When given, a package fails unless its license can be satisfied with allow and review licenses alone. An -or-later requirement accepts later versions of the same license.

[licenses]
allow = ["MIT", "BSD-3-Clause", "Apache-2.0"]

Keys: [licenses] allow, [licenses] review.

licenses.unknown

Every package declares an SPDX license.

Key: [licenses] unknown = "warn" (default), "error" or "allow": what a package with no license, or one that is not an SPDX expression, gets. pixi.lock records no PyPI licenses; a wheel from pypi.org has its METADATA read (by range requests, cached by sha256), and a source distribution or a package from another index, a URL, git or a path stays unknown.

[licenses]
unknown = "error"

Keys: [licenses] unknown.

licenses.ambiguous

No package's license is a name that could be more than one SPDX license.

Key: [licenses] ambiguous = "warn" (default), "error" or "allow": what a package gets whose license is a name that could be more than one SPDX license (BSD, GPL, LGPL2, Apache), rather than a guess at one. Common spellings that name one license (BSD 3-Clause, Apache License 2.0, PSF) are read as it from a reviewed table, and a finding about such a package shows what pixi.lock says.

[licenses]
ambiguous = "error"

Keys: [licenses] ambiguous.

advisories.vulnerable

A package has a known vulnerability at or above fail-on, known exploited, or above the EPSS threshold.

Keys: [advisories] fail-on (default "high"), known-exploited (default "error") and epss (not set by default). A package fails for each advisory at or above fail-on, in CISA's Known Exploited Vulnerabilities catalog, or with an EPSS score at or above epss. With known-exploited = "error", a known exploited advisory counts as critical, its own rating kept in the message. Advisories are OSV's, as pixi-sbom --vulns reads them; a conda package is looked up by its PyPI identity (pypi-mapping). The help names the version that fixes it. Waive one advisory with a waiver's advisory key, or take it out with a VEX statement from a file [advisories] vex names (CycloneDX or OpenVEX: not_affected, false_positive and resolved are waived with it).

[advisories]
fail-on = "high"
known-exploited = "error"
epss = 0.1

Keys: [advisories] fail-on, [advisories] known-exploited, [advisories] epss, [advisories] pypi-mapping, [advisories] vex.

advisories.unknown

A package has a known vulnerability whose severity no advisory gives.

Key: [advisories] unknown = "warn" (default), "error" or "allow": what an advisory gets when no record of it gives a severity or a CVSS v3 vector, unless known-exploited or epss already fail it.

[advisories]
unknown = "error"

Keys: [advisories] unknown, [advisories] pypi-mapping, [advisories] vex.

advisories.unavailable

The advisory data cannot be read, so no package could be checked.

Key: [advisories]. The advisory data could not be read: OSV, CISA's catalog, FIRST's EPSS API or the conda-forge mapping did not answer and nothing was cached, or PIXI_POLICY_OFFLINE is set and the cache is empty. The check fails rather than pass a workspace it could not look at. PIXI_POLICY_OSV_URL, PIXI_POLICY_KEV_URL, PIXI_POLICY_EPSS_URL and PIXI_POLICY_MAPPING_URL point at mirrors.

[advisories]

Keys: .

freshness.build-age

A package was built, or uploaded to PyPI, longer ago than max-build-age-days.

Key: [freshness] max-build-age-days (not set by default). Fails a conda package built more days ago than the limit, by the build time its record in pixi.lock states: no network. With pypi (on by default), a PyPI package from pypi.org fails when the file pixi.lock locks was uploaded longer ago, by PyPI's JSON API. A package with no build or upload time is freshness.unknown.

[freshness]
max-build-age-days = 730

Keys: [freshness] max-build-age-days, [freshness] pypi.

freshness.majors-behind

A package is more major versions behind its channel's or PyPI's newest than allowed.

Key: [freshness] max-majors-behind (not set by default). Fails a conda package whose major version (the leading number) is more than the limit behind the newest release in the repodata of the channel and subdir pixi.lock names for it, so a mirror is judged by its own contents. With pypi (on by default), a PyPI package from pypi.org is compared with the newest release PyPI lists. Prereleases, and yanked PyPI releases, do not count as newest.

[freshness]
max-majors-behind = 1

Keys: [freshness] max-majors-behind, [freshness] pypi.

freshness.archived

A conda-forge package comes from an archived feedstock.

Key: [freshness] archived (on once [freshness] exists). Fails a conda-forge package when every feedstock that builds it is archived, by the conda-forge bot's feedstock list, which can trail an archival on GitHub by a bot cycle (hours).

[freshness]
archived = true

Keys: [freshness] archived.

freshness.unknown

The channel or PyPI data says nothing about a package a freshness rule checks.

Key: [freshness] unknown = "warn" (default), "error" or "allow": what a package gets when a freshness rule cannot judge it: no build time in pixi.lock, not in its channel's repodata, no major version to compare, no feedstock known to build it, or a PyPI package from somewhere other than pypi.org or whose locked file PyPI does not list.

[freshness]
unknown = "error"

Keys: [freshness] max-build-age-days, [freshness] max-majors-behind, [freshness] archived, [freshness] pypi, [freshness] unknown.

freshness.unavailable

A source of channel, PyPI or feedstock data cannot be read, so the checks it feeds could not run.

Key: [freshness]. The channel's repodata, conda-forge's feedstock lists or PyPI's JSON API could not be read: the network is down and nothing is cached, or PIXI_POLICY_OFFLINE is set and the cache is empty. Each source that could not be read gives one finding naming the checks it feeds; the checks the other sources feed still run. The check fails rather than pass packages it could not look at. pixi policy doctor asks each source whether it answers.

[freshness]

Keys: [freshness] max-majors-behind, [freshness] archived, [freshness] pypi.

python.older

No environment runs a Python older than the policy's standard.

Keys: [python] version, the standard minor version, and older = "error" (default), "warn" or "allow". Reports an environment whose Python, as pixi.lock resolves it for each platform, is an older minor version than the standard. Every patch release of the standard matches it; an environment without Python is not checked.

[python]
version = "3.14"
older = "error"

Keys: [python] version, [python] older.

python.newer

No environment runs a Python newer than the policy's standard.

Keys: [python] version, the standard minor version, and newer = "warn" (default), "error" or "allow". Reports an environment whose Python, as pixi.lock resolves it for each platform, is a newer minor version than the standard. Every patch release of the standard matches it; an environment without Python is not checked.

[python]
version = "3.14"
newer = "error"

Keys: [python] version, [python] newer.

python.requires-python

The pyproject's requires-python starts at the policy's standard Python and admits it.

Keys: [python] version and requires-python = true (false by default, since a library may support older Pythons on purpose). Reads [project] requires-python from the workspace's pyproject.toml, the manifest itself or one beside pixi.toml, and fails when it admits a Python minor older than the standard (>=3.12 with version = "3.14") or does not admit the standard at all (<3.14). Nothing is checked without a pyproject.toml or without requires-python.

[python]
version = "3.14"
requires-python = true

Keys: [python] version, [python] requires-python.

hygiene.conda-pypi-duplicate

No PyPI package is one a conda package in the same environment provides.

Key: [hygiene] conda-pypi-duplicate (on once [hygiene] exists). Fails a PyPI package whose distribution a conda package in the same environment already provides, so both are installed one over the other. A conda package provides the PyPI names pixi.lock states purls for (conda msgpack-python is PyPI msgpack); for a conda-forge package it states none for, conda-forge's mapping gives them, read only when an environment has such a package and PyPI packages too.

[hygiene]
conda-pypi-duplicate = true

Keys: [hygiene] conda-pypi-duplicate.

hygiene.unavailable

conda-forge's PyPI mapping cannot be read, so some conda packages were not compared.

Key: [hygiene]. conda-forge's conda-to-PyPI mapping could not be read: the network is down and nothing is cached, or PIXI_POLICY_OFFLINE is set and the cache is empty. The packages pixi.lock states PyPI names for are still compared; the check fails rather than pass the others. PIXI_POLICY_MAPPING_URL points at a mirror.

[hygiene]

Keys: [hygiene] conda-pypi-duplicate.

manifest.wildcard-spec

No dependency is given as *.

Key: [manifest] wildcard-spec (on once [manifest] exists). Fails a conda or PyPI dependency given as "*" in any dependency table, at its line in the manifest.

[manifest]
wildcard-spec = true

Keys: [manifest] wildcard-spec.

manifest.python-pinned

Python is constrained to one minor version or narrower.

Key: [manifest] python-pinned (on once [manifest] exists). Fails a python dependency whose spec allows more than one minor version (">=3.10"), or has none; "3.12.*" and ">=3.12,<3.13" pass.

[manifest]
python-pinned = true

Keys: [manifest] python-pinned.

manifest.required-platforms

The workspace lists every platform the policy requires.

Key: [manifest] required-platforms, a list of platforms the workspace must list in [workspace] platforms.

[manifest]
required-platforms = ["linux-64", "osx-arm64"]

Keys: [manifest] required-platforms.

manifest.exclude-newer

exclude-newer keeps packages out for at least min-exclude-newer-days.

Key: [manifest] min-exclude-newer-days (not set by default). Fails a workspace that sets no exclude-newer, or one whose cooldown is shorter: a duration ("7d", "1h30m", as pixi reads them) shorter than the minimum, or a date or timestamp fewer days ago (a date means the start of the next day, UTC, as pixi reads it). A per-package override in [exclude-newer] or [pypi-exclude-newer] that is shorter is its own finding, at its line. Most malicious uploads are found and removed within days, and a cooldown keeps them out of a solve.

[manifest]
min-exclude-newer-days = 7

Keys: [manifest] min-exclude-newer-days.

lock.present

The workspace has a pixi.lock.

Key: [lock] present (on once [lock] exists). Fails a workspace without a pixi.lock; without [lock], a missing lockfile is an input error (exit 2) instead.

[lock]
present = true

Keys: [lock] present.

lock.complete

Every environment is locked for every platform it is solved for.

Key: [lock] complete (on once [lock] exists). Fails an environment the manifest defines that pixi.lock does not lock, or does not lock for one of its platforms.

[lock]
complete = true

Keys: [lock] complete.

lock.in-sync

pixi.lock still satisfies the manifest.

Key: [lock] in-sync (on once [lock] exists). Asks pixi, offline, whether pixi.lock still satisfies the manifest (pixi list --locked); a warning when pixi cannot be run.

[lock]
in-sync = true

Keys: [lock] in-sync.

waivers.expired

A waiver has expired, and what it waived fails again.

A [[waivers]] entry whose expires date has passed. What it waived fails again; renew it with a new date and a reason that still holds, or fix the finding.

[[waivers]]
rule = "licenses.deny"
package = "readline"
reason = "dev only; LEGAL-1234"
expires = 2027-03-31

Keys: [[waivers]] expires.

waivers.unused

A waiver matches no finding.

A [[waivers]] entry that matches no finding: its rule, package, version, environment or platform is wrong, or the finding is gone. Remove it.

[[waivers]]
rule = "bans.deny"
package = "pycrypto"
reason = "replaced in Q3"
expires = 2027-01-31

Keys: [[waivers]] rule, [[waivers]] package, [[waivers]] version, [[waivers]] environment, [[waivers]] platform, [[waivers]] advisory.

waivers.too-long

A waiver runs further out than max-waiver-days.

A [[waivers]] entry whose expires is more than max-waiver-days (default 365) away. The waiver still applies. Set max-waiver-days at the top of the policy; 0 turns the check off.

max-waiver-days = 180

Keys: max-waiver-days, [[waivers]] expires.