Package URL Type definitions
Each package manager, platform, type, or ecosystem has its own conventions and protocols to identify, locate, and provision software packages.
The package type is the component of a package URL that is used to capture
this information with a short string such as maven, npm, nuget, gem,
pypi, etc.
These are known purl package type definitions.
Known purl type definitions are formalized here independent of the core
Package URL specification. See also a candidate list further down.
Definitions can also include types reserved for future use.
See also https://github.com/package-url/purl-spec and <PURL-SPECIFICATION.rst>`_ for the Package URL specification.
Known purl types
bitbucket
bitbucket for Bitbucket-based packages:
The default repository is
https://bitbucket.orgThe
namespaceis the user or organization. It is not case sensitive and must be lowercased.The
nameis the repository name. It is not case sensitive and must be lowercased.The
versionis a commit or tagExamples:
pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c
cocoapods
cocoapods for Cocoapods:
The default repository is
https://cdn.cocoapods.org/The
nameis the pod name and is case sensitive, cannot contain whitespace, a plus (+) character, or begin with a period (.).The
versionis the package version.The purl subpath is used to represent a pods subspec (if present)
Examples:
pkg:cocoapods/AFNetworking@4.0.1 pkg:cocoapods/MapsIndoors@3.24.0 pkg:cocoapods/ShareKit@2.0#Twitter pkg:cocoapods/GoogleUtilities@7.5.2#NSData+zlib
cargo
cargo for Rust:
The default repository is
https://crates.io/The
nameis the repository name.The
versionis the package version.Examples:
pkg:cargo/rand@0.7.2 pkg:cargo/clap@2.33.0 pkg:cargo/structopt@0.3.11
composer
composer for Composer PHP packages:
The default repository is
https://packagist.orgThe
namespaceis the vendor.Note: private, local packages may have no name. In this case you cannot create a
purlfor these.Examples:
pkg:composer/laravel/laravel@5.5.0
conan
conan for Conan C/C++ packages:
The default repository is
https://center.conan.ioThe
namespaceis the user if presentThe
nameis the package name.The
versionis the package version.The qualifier
channelmust be not empty if namespace is presentExamples:
pkg:conan/cctz@2.3 pkg:conan/bincrafters/cctz@2.3?channel=stable
conda
conda for Conda packages:
The default repository is
https://repo.anaconda.comThe
nameis the package nameThe
versionis the package versionThe qualifiers:
buildis the build string.channelis the package stored location.subdiris the associated platform.typeis the package type.Examples:
pkg:conda/absl-py@0.4.1?build=py36h06a4308_0&channel=main&subdir=linux-64&type=tar.bz2
cran
cran for CRAN R packages:
The default repository is
https://cran.r-project.orgThe
nameis the package name and is case sensitive, but there cannot be two packages on CRAN with the same name ignoring case.The
versionis the package version.Examples:
pkg:cran/A3@1.0.0 pkg:cran/rJava@1.0-4 pkg:cran/caret@6.0-88
deb
deb for Debian, Debian derivatives, and Ubuntu packages:
There is no default package repository: this should be implied either from the
distroqualifiers key or using a base url as arepository_urlqualifiers keyThe
namespaceis the "vendor" name such as "debian" or "ubuntu". It is not case sensitive and must be lowercased.The
nameis not case sensitive and must be lowercased.The
versionis the version of the binary (or source) package.archis the qualifiers key for a package architecture. The special valuearch=sourceidentifies a Debian source package that usually consists of a Debian Source control file (.dsc) and corresponding upstream and Debian sources. Thedpkg-querycommand can print thenameandversionof the corresponding source package of a binary package:dpkg-query -f '${source:Package} ${source:Version}' -W <binary package name>Examples:
pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie pkg:deb/debian/dpkg@1.19.0.4?arch=amd64&distro=stretch pkg:deb/ubuntu/dpkg@1.19.0.4?arch=amd64 pkg:deb/debian/attr@1:2.4.47-2?arch=source pkg:deb/debian/attr@1:2.4.47-2%2Bb1?arch=amd64
docker
docker for Docker images
The default repository is
https://hub.docker.comThe
namespaceis the registry/user/organization if presentThe version should be the image id sha256 or a tag. Since tags can be moved, a sha256 image id is preferred.
Examples:
pkg:docker/cassandra@latest pkg:docker/smartentry/debian@dc437cc87d10 pkg:docker/customer/dockerimage@sha256%3A244fd47e07d10?repository_url=gcr.io
gem
gem for Rubygems:
The default repository is
https://rubygems.orgThe
platformqualifiers key is used to specify an alternative platform such asjavafor JRuby. The implied default isrubyfor Ruby MRI.Examples:
pkg:gem/ruby-advisory-db-check@0.12.4 pkg:gem/jruby-launcher@1.1.2?platform=java
generic
generic for plain, generic packages that do not fit anywhere else such as
for "upstream-from-distro" packages. In particular this is handy for a plain
version control repository such as a bare git repo.
There is no default repository. A
download_urlandchecksummay be provided in qualifiers or as separate attributes outside of apurlfor proper identification and location.When possible another or a new purl
typeshould be used instead of using thegenerictype and eventually contributed back to this specificationas for other
type, thenamecomponent is mandatory. In the worst case it can be a file or directory name.Examples (truncated for brevity):
pkg:generic/openssl@1.1.10g pkg:generic/openssl@1.1.10g?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da pkg:generic/bitwarderl?vcs_url=git%2Bhttps://git.fsfe.org/dxtr/bitwarderl%40cc55108da32
github
github for Github-based packages:
The default repository is
https://github.comThe
namespaceis the user or organization. It is not case sensitive and must be lowercased.The
nameis the repository name. It is not case sensitive and must be lowercased.The
versionis a commit or tagExamples:
pkg:github/package-url/purl-spec@244fd47e07d1004 pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs
golang
golang for Go packages
There is no default package repository: this is implied in the namespace using the
go getcommand conventionsThe
namespaceand name must be lowercased.The
subpathis used to point to a subpath inside a packageThe
versionis often empty when a commit is not specified and should be the commit in most cases when available.Examples:
pkg:golang/github.com/gorilla/context@234fd47e07d1004f0aed9c pkg:golang/google.golang.org/genproto#googleapis/api/annotations pkg:golang/github.com/gorilla/context@234fd47e07d1004f0aed9c#api
hackage
hackage for Haskell packages
The default repository is https://hackage.haskell.org.
The version is package version.
The name is case sensitive and use kebab-case
Examples:
pkg:hackage/a50@0.5 pkg:hackage/AC-HalfInteger@1.2.1 pkg:hackage/3d-graphics-examples@0.0.0.2
hex
hex for Hex packages
The default repository is
https://repo.hex.pm.The
namespaceis optional; it may be used to specify the organization for private packages on hex.pm. It is not case sensitive and must be lowercased.The
nameis not case sensitive and must be lowercased.Examples:
pkg:hex/jason@1.1.2 pkg:hex/acme/foo@2.3. pkg:hex/phoenix_html@2.13.3#priv/static/phoenix_html.js pkg:hex/bar@1.2.3?repository_url=https://myrepo.example.com
maven
maven for Maven JARs and related artifacts
The default repository is
https://repo.maven.apache.org/maven2The group id is the
namespaceand the artifact id is thenameKnown qualifiers keys are:
classifierandtypeas defined in the POM documentation. Note that Maven uses a concept / coordinate called packaging which does not map directly 1:1 to a file extension. In this use case, we need to construct a link to one of many possible artifacts. Maven itself uses type in a dependency declaration when needed to disambiguate between them.Examples:
pkg:maven/org.apache.xmlgraphics/batik-anim@1.9.1 pkg:maven/org.apache.xmlgraphics/batik-anim@1.9.1?type=pom pkg:maven/org.apache.xmlgraphics/batik-anim@1.9.1?classifier=sources pkg:maven/org.apache.xmlgraphics/batik-anim@1.9.1?type=zip&classifier=dist pkg:maven/net.sf.jacob-projec/jacob@1.14.3?classifier=x86&type=dll pkg:maven/net.sf.jacob-projec/jacob@1.14.3?classifier=x64&type=dll
npm
npm for Node NPM packages:
The default repository is
https://registry.npmjs.orgThe
namespaceis used for the scope of a scoped NPM package.Per the package.json spec, new package "must not have uppercase letters in the name", therefore the must be lowercased.
Examples:
pkg:npm/foobar@12.3.1 pkg:npm/%40angular/animation@12.3.1 pkg:npm/mypackage@12.4.5?vcs_url=git://host.com/path/to/repo.git%404345abcd34343
nuget
nuget for NuGet .NET packages:
The default repository is
https://www.nuget.orgThere is no
namespaceper se even if the common convention is to use dot-separated package names where the first segment isnamespace-like.Examples:
pkg:nuget/EnterpriseLibrary.Common@6.0.1304
oci
oci for all artifacts stored in registries that conform to the
OCI Distribution Specification,
including container images built by Docker and others:
There is no canonical package repository for OCI artifacts. Therefore
ocipurls must be registry agnostic by default. To specify the repository, provide arepository_urlvalue.OCI purls do not contain a
namespace, although,repository_urlmay contain a namespace as part of the physical location of the package.The
nameis not case sensitive and must be lowercased. The name is the last fragment of the repository name. For example if the repository name islibrary/debianthen thenameisdebian.The
versionis thesha256:hex_encoded_lowercase_digestof the artifact and is required to uniquely identify the artifact.Optional qualifiers may include:
arch: key for a package architecture, when relevantrepository_url: A repository URL where the artifact may be found, but not intended as the only location. This value is encouraged to identify a location the content may be fetchedtag: artifact tag that may have been associated with the digest at the time
Examples:
pkg:oci/debian@sha256:<digest>?repository_url=docker.io/library/debian&arch=amd64&tag=latest pkg:oci/debian@sha256:<digest>?repository_url=ghcr.io/debian&tag=bullseye pkg:oci/static@sha256:<digest>?repository_url=gcr.io/distroless/static&tag=latest pkg:oci/hello-wasm@sha256:<digest>?tag=v1
pub
pub for Dart and Flutter packages:
The default repository is
https://pub.dartlang.orgPub normalizes all package names to be lowercase and using underscores. The only allowed characters are [a-z0-9_].
More information on pub naming and versioning is available in the [pubspec documentation](https://dart.dev/tools/pub/pubspec)
Examples:
pkg:pub/characters@1.2.0 pkg:pub/flutter@0.0.0
pypi
pypi for Python packages:
The default repository is
https://pypi.python.orgPyPi treats
-and_as the same character and is not case sensitive. Therefore a Pypi packagenamemust be lowercased and underscore_replaced with a dash-Examples:
pkg:pypi/django@1.11.1 pkg:pypi/django-allauth@12.23
rpm
rpm for RPMs:
There is no default package repository: this should be implied either from the
distroqualifiers key or using a repository base url asrepository_urlqualifiers keythe
namespaceis the vendor such as fedora or opensuse It is not case sensitive and must be lowercased.the
nameis the RPM name and is case sensitive.the
versionis the combined version and release of an RPMepoch(optional for RPMs) is a qualifier as it's not required for unique identification, but when the epoch exists we strongly encourage using itarchis the qualifiers key for a package architectureExamples:
pkg:rpm/fedora/curl@7.50.3-1.fc25?arch=i386&distro=fedora-25 pkg:rpm/centerim@4.22.10-1.el6?arch=i686&epoch=1&distro=fedora-25
swift
swift for Swift packages:
There is no default package repository: this should be implied from
namespaceThe
namespaceis source host and user/organization.The
nameis the repository name.The
versionis the package version.Examples:
pkg:swift/github.com/Alamofire/Alamofire@5.4.3 pkg:swift/github.com/RxSwiftCommunity/RxFlow@2.12.4
Other candidate types to define:
alpinefor Alpine Linux apk packages:apachefor Apache projects packages:androidfor Android apk packages:archfor Arch Linux packages:atomfor Atom packages:bowerfor Bower JavaScript packages:brewfor Homebrew packages:buildrootfor Buildroot packagescarthagefor Cocoapods Cocoa packages:cheffor Chef packages:chocolateyfor Chocolatey packagesclojarsfor Clojure packages:cocoapodsfor Cocoapods iOS packages:coreosfor CoreOS packages:cpanfor CPAN Perl packages:ctanfor CTAN TeX packages:crystalfor Crystal Shards packages:drupalfor Drupal packages:dtypefor DefinitelyTyped TypeScript type definitions:dubfor D packages:elmfor Elm packages:eclipsefor Eclipse projects packages:giteafor Gitea-based packages:gitlabfor Gitlab-based packages:gradlefor Gradle pluginsguixfor Guix packages:haxefor Haxe packages:helmfor Kubernetes packagesjuliafor Julia packages:luafor LuaRocks packages:melpafor Emacs packagesmeteorfor Meteor JavaScript packages:nimfor Nim packages:nixfor Nixos packages:opamfor OCaml packages:openwrtfor OpenWRT packages:osgifor OSGi bundle packages:p2for Eclipse p2 packages:pearfor Pear PHP packages:peclfor PECL PHP packages:perl6for Perl 6 module packages:platformiofor PlatformIO packages:ebuildfor Gentoo Linux portage packages:puppetfor Puppet Forge packages:sourceforgefor Sourceforge-based packages:sublimefor Sublime packages:terraformfor Terraform modulesvagrantfor Vagrant boxesvimfor Vim scripts packages:wordpressfor Wordpress packages:yoctofor Yocto recipe packages:
License
This document is licensed under the MIT license