Skip to content

Approved dependency sources

The approved source set says which endpoints a build may fetch from and under which access policy. It is control-plane policy, sealed into the resolution assignment alongside everything else the solve reads.

The source set is authored at document.governance.build.approved_dependency_sources in the versioned policy attached to the workspace. Project-build creation resolves that effective policy through the control-plane policy capability and persists the normalized source set with the build. Reconciliation reopens the persisted set and refuses a continuation carrying a different source authority. There is no implicit public-index default.

{
  "contract_version": "xck.approved_dependency_sources.v1",
  "produced_by": "control_plane",
  "approved_sources_id": "default",
  "approved_sources_revision": "12",
  "sources": [
    {
      "source_id": "internal-pypi",
      "source_kind": "python_index",
      "source_locator": "https://pypi.internal.acme.example/simple",
      "access_profile_id": "dp-internal-pypi",
      "access_mode": "dataplane_build_identity",
      "preference_rank": 0,
      "approval_digest": "sha256:3b7f..."
    }
  ],
  "approved_sources_digest": "sha256:aa19..."
}

source_kind is one of python_index, bundle_registry, or container_registry. access_mode is one of anonymous, dataplane_build_identity, or broker_grant. preference_rank is a non-negative integer and lower ranks are preferred, which is the second level of candidate ranking. See Six dependency sources.

access_profile_id names a data-plane access profile. The credentials behind it stay on the data plane, so the approved set carries authority without carrying secrets.

Locators are endpoints, and carry no credentials

A python_index locator is an https endpoint with a host, stored without its trailing slash. A registry locator is an oci:// root with a host and a repository path, normalised to a lowercase host.

A locator embedding a username or password is refused, and so is any credential, credentials, token or password key anywhere in the document:

approved dependency sources must not contain credentials

A source id that would need an ambient endpoint lookup to be usable is incomplete authority, which is why the locator is part of the approved entry rather than resolved later from configuration.

It approves endpoints, not packages

Five field names are refused so this document cannot become a per-package allowlist:

ApprovedDependencySourcesV1 refuses allowed_packages; it approves source
endpoints, and a package allowlist would make absence from a curated list a
build refusal

The refused names are allowed_packages, allowed_distributions, package_allowlist, approved_packages and large_library_allowlist.

The distinction decides what a build refuses. With source approval, a declared requirement is ordinary resolver input: the resolver prefers a compatible foundation component and otherwise resolves, fetches and builds one from these sources. With a package allowlist, every new dependency would become a ticket, and the first reader to add one field would have removed that property before anyone noticed it had been stated.

Prohibiting a specific package, licence or source is still possible. That is an explicit governance decision recorded in policy, separate from the document that approves endpoints.

What refusal is reserved for

Absent an explicit prohibition, refusal follows substantive failure: no matching version, an unreachable or forbidden source, an unsatisfiable platform, ABI or native closure, an ambiguous or conflicting result, a failed build, or failed inventory and provenance verification.

Absence from the foundation is never itself a refusal, and no package-specific approval entry is needed for an ordinary dependency.

Identity and revision

approved_sources_digest covers the complete set, and approved_sources_revision names the revision it belongs to. The digest is bound into the closure candidate, so a closure records the exact source policy it was resolved under and a later change to that policy produces a new closure rather than reinterpreting an old one.