The Artifact Firewall enforces rules on npm, PyPI, Maven, NuGet, Hex, Go, Conda, RPM and Cargo packages, VS Code extensions and OCI images. The Virtual Registry classifies each request and routes only those to the firewall, Cargo and OCI images from Virtual Registry 0.22.0 on, so a rule written against any other ecosystem matches nothing, whatever enable_firewall says.
Enforcement takes two forms, and most ecosystems use both:
deny becomes a 403 that names the rule, or gives its reason. This is what stops a client that pins a version. An integrated Virtual Registry asks for the evaluation on each download, also one served from its cache, and answers a deny with the status line 403 Blocked by firewall. Clients such as pnpm, Gradle and pip print that line and not the body.The difference between deny and hide is the download: both keep a version away from a client resolving “latest”, and only deny blocks a request that names the version outright.
Only GET and HEAD requests are judged, apart from the VS Code Marketplace’s search. Anything else, such as the uploads of a mvn deploy, goes straight to the remote, so publishing a version that a rule denies is not refused, and the rule blocks only its download.
A HEAD for a manifest answers with the remote’s status, without the headers that describe the remote’s version of it, such as Content-Length, ETag and checksums. A repository manager such as JFrog Artifactory sends one before it fetches a manifest. Version rules apply to the GET that follows, so a manifest with every version blocked answers the HEAD with 200 and refuses the GET. A package denied as a whole refuses both.
The packument is filtered. Denied and hidden versions stay listed, and the latest dist-tag is re-pointed at the highest version no rule objects to, so a plain npm install resolves to that one. A client that pins a blocked version therefore gets an error saying it is blocked, rather than one saying the version does not exist.
Tarball downloads (/<package>/-/<package>-<version>.tgz) are authorized. A denied version returns 403, a hidden one is served.
Quarantine windows work here without further configuration, since the packument carries a publish time for every version. A quarantined version stays listed and latest skips it, as for a denied one, but its tarball is served: a client that pins it, directly or through a lockfile, installs it.
The simple index is filtered, in both its HTML form and its PEP 691 JSON form. A denied version’s files are removed from the index. A hidden version’s files are marked yanked with the rule’s reason, which is the mechanism PyPI itself uses for a withdrawn release: pip skips a yanked file unless the requirement pins that exact version.
Wheel and sdist downloads are authorized as well. A client that already holds the URL, out of a lock file or an index it cached earlier, is checked against the ruleset rather than served on the strength of what it read then. A denied version returns 403, a hidden one is served.
Quarantine windows on the JSON index use the publish times it carries. The HTML index carries none, so a lookup against the PyPI JSON API is needed, configured with pypi.api_url. Without it, quarantine is not applied to clients using the HTML index. A quarantined version’s files are removed from the index, so pip does not find it even when the requirement pins it, but a download from a URL the client already holds, such as one in a lockfile, is served.
maven-metadata.xml is filtered, for releases and for snapshots. Denied and hidden versions are removed from the version list, so a build resolving a range or a LATEST never sees them.
Downloads of a .jar, .war, .aar or .zip below the version directory are authorized, and a denied version returns 403.
Two kinds of file stream through untouched whatever the verdict:
.pom and Gradle’s .module. Maven reads the POM of every candidate version while resolving a conflict, including versions it then discards, so denying one would fail the whole resolve rather than the single artifact it describes. A build that pins a denied version reads the POM and is then blocked on the artifact..sha1, .md5, .sha256, .sha512 and .asc. A client has to be able to verify what it did download.Quarantine windows need publish times, which Maven repositories do not carry in their metadata. They are looked up through Maven Central’s Solr endpoint, configured with maven.solr_url, falling back to a HEAD request against the POM when Solr answers nothing. A quarantined version is removed from the version list, so a range or a LATEST does not resolve to it, but a build that names the version downloads it.
The registration pages, the flat container index.json, the service index, and the query and autocomplete responses are all filtered. Denied and hidden versions are removed from the version lists.
.nupkg downloads are authorized, and so are downloads from nuget.org’s v2 URL, /api/v2/package/<id>/<version>, the default for a JFrog Artifactory remote repository. A denied version returns 403.
Package IDs are matched in any case, as NuGet treats them, so a rule naming Newtonsoft.Json applies to a request for newtonsoft.json. The audit log records the purl lowercased.
Quarantine windows use the published timestamp on the registration catalog entry. The flat container index carries no timestamps, so a client resolving through it is not quarantined. A quarantined version is removed from the registration pages, but its .nupkg download is served.
The Hex package manifest cannot be filtered. It is a protobuf payload signed by the repository, and the client verifies that signature against a key in its repository configuration before trusting the contents, so any edit makes hex_core reject the response outright rather than fall back to the unedited one.
Enforcement is on the download instead. A tarball request (/tarballs/<name>-<version>.tar) is authorized and a denied version returns 403. A rule that denies a package as a whole, with no version, also blocks the manifest request, which fails the resolve before a version is chosen.
Documentation tarballs are not package content and are not routed through the firewall.
Every GOPROXY resource except the module zip is buffered and evaluated, because resolving a module graph can ask for a .mod on its own without ever fetching the matching .info.
Only @v/list is rewritten, with denied and hidden versions dropped from the version list. The rest are evaluated but never altered in transit, so an allowed .mod or zip reaches the client byte for byte and GOSUMDB verification keeps working through the firewall.
| Path | Enforcement |
|---|---|
@v/list |
Filtered. Denied and hidden versions are dropped from the list. |
@latest |
Gated. Deny, hide and quarantine all return 404. |
@v/<version>.info |
Gated. Deny returns 403, hide and quarantine return 404. The quarantine window is read from the response’s own Time field. |
@v/<version>.mod |
Gated. Deny returns 403, hide returns 404. It carries no Time field, so quarantine is not checked. |
@v/<version>.zip |
Authorized before the download starts. A denied version returns 403. |
/sumdb/... |
Passed through. The checksum database is not a module resource. |
A hide here answers a request that names the version, which it does nowhere else. The 404 is what the go command reads as “not found here”, leaving it to resolve from the filtered @v/list, so the version is absent rather than refused.
GOPROXY must name the firewall, or the Virtual Registry integrated with it, alone, with no ,direct and no second proxy after it.
The go command falls through to the next entry of a comma-separated GOPROXY whenever one answers 404 or 410. @latest returns 404 on a deny by design, so that the go command’s own “not found here” fallback sends it to @v/list, which is filtered to the versions no rule objects to. That fallback stays safe only while the firewall is the last word the go command gets. Append ,direct and a denied module is reachable again straight from its version control, past the rule that blocked it.
The requirement is what makes hide and quarantine work at all, not only deny. Both answer 404, and the go command cannot tell either apart from “not found here, try the next entry”. A .info or .mod deny returns 403 rather than 404 for the same reason, since a single denied version has no safe fallback target and has to be a dead end.
repodata.json is filtered, including its .zst and .gz variants. Denied and hidden versions are dropped from it, so a solver never picks one. A .conda or .tar.bz2 download is authorized, and a denied version returns 403.
Quarantine windows are not applied to conda packages.
Two repodata variants cannot be filtered and are answered 404 rather than passed through: .bz2, for which no re-encoder exists, and CEP-16 sharded repodata (repodata_shards.msgpack.zst and the per-shard files). Clients read the 404 as “variant not offered” and fall back to repodata.json.zst or plain repodata.json, both of which are filtered.
Repodata that cannot be parsed or re-encoded fails open. The upstream body is streamed through unfiltered and the error is logged, so a corrupt index does not take a whole channel down. A denied version in such an index is still blocked when a client tries to download it.
channeldata.json and notices.json stream through, since neither is used for solving.
The channel is carried in the purl namespace, so a rule reads pkg:conda/<channel>/<name>@<version>. An upstream that serves a channel at its root, such as https://conda.anaconda.org/<channel> configured as a remote, yields an empty namespace, and a rule meant to match every channel needs namespace: "*". Build strings such as py311h38be061_0 are not part of the coordinate, so denying a version denies every build of it.
A channel whose repodata sets a CEP-15 base_url pointing at another host moves the downloads off the firewall entirely. Filtering still governs what the solver can pick, but the per-download check is bypassed, so proxy such a channel with its base_url in mind.
Reading a conda-forge-scale index needs max_manifest_size raised above its 64 MiB default.
primary.xml is filtered, with denied and hidden versions dropped from the package list, and repomd.xml is filtered to match, since it carries the checksum of primary.xml. A .rpm download is authorized, and a denied version returns 403.
A rule names a package as pkg:rpm/<name>@<version>-<release>, with no namespace. The epoch and the architecture are not part of the coordinate, so a rule covers every architecture of a build. Quarantine windows are not applied to RPM packages.
Rewriting repomd.xml invalidates the detached signature the repository publishes for it, so a client that verifies repository metadata rejects the filtered document. Such a client needs repo_gpgcheck=0. Per-package signature verification, gpgcheck=1, is unaffected and should stay on, since the packages themselves are never modified.
Where that trade is not acceptable, preserve_manifest keeps the upstream signature intact and gives up filtering. Downloads are still authorized, so a denied version is blocked when a client fetches it rather than kept out of the index it resolves from.
The sparse index is filtered: each crate’s index file, which holds one line per version. A denied or hidden version stays listed and is marked yanked, the mechanism crates.io itself uses for a withdrawn release, so cargo does not pick it when it resolves. Cargo still downloads a version that Cargo.lock already pins, so the difference between the two actions is again the download: a denied version returns 403, with a message naming the rule and the ruleset, which cargo prints, and a hidden one is served. Dropping a denied line instead would fail such a build with cargo’s own failed to select a version, which says nothing of the firewall. A rule that denies a crate as a whole, with no version, also refuses its index file, which fails the resolve before a version is chosen.
A download is checked only when its URL names the crate and the version, either in cargo’s default .../<crate>/<version>/download form or as a .../<crate>/<crate>-<version>.crate file. crates.io, JFrog Artifactory and Sonatype Nexus all use one of them. A registry whose config.json sets a download URL template that puts the crate elsewhere, such as in the hostname, still has its index filtered, but its downloads are not checked.
config.json lists no versions and is not filtered. Its download URL is rewritten, by the firewall or by an integrated Virtual Registry, so that the downloads come back through it. The index files and config.json are answered without ETag or Last-Modified, so cargo cannot revalidate a copy filtered under an earlier ruleset.
A version in its quarantine window is dropped from the index file, going by the pubtime on its line. A line without one is not quarantined. Unlike a yanked version, a dropped one cannot be resolved at all, so a Cargo.lock that pins it fails until the window has passed. A crate whose every version is in quarantine has its index file refused with 403.
An Artifactory Cargo repository on the git index, behind a Virtual Registry, is not filtered, since cargo fetches that index with git. Only its downloads are checked: cargo still resolves a denied version, and the download is refused with 403. hide and quarantine have no effect. Cargo downloads through the Virtual Registry only when Artifactory’s custom base URL names the registry. Otherwise it fetches crates straight from Artifactory, and the firewall checks none of them.
A rule names a crate as pkg:cargo/<crate>, with no namespace, and its versions with vers:cargo/ ranges. From 0.12.0, or Virtual Registry 0.24.0 with its integrated firewall, a crate name matches in any case, as crates.io refuses a name that differs from another only in case, so a rule on Inflector also matches inflector. That lets a rule on a whole crate refuse its index file, whose path cargo asks for in lowercase.
A standalone firewall serves crates.io from a registry whose remote_url is https://index.crates.io, routed by host, since index.crates.io serves nothing below a path prefix. crates.io serves its crates from another host, static.crates.io, and the firewall fetches them from there under the same registry, so that registry’s rules and routes cover both. Point cargo at the firewall with a sparse+ URL, such as sparse+https://cargo-firewall.example.com/, as a source replacement for crates.io in .cargo/config.toml. If a proxy in front of the firewall terminates TLS, set the registry’s base_url to the address clients use, since that is the address written into the download URL.
A Cargo repository in JFrog Artifactory is recognized from its /artifactory/api/cargo/<repo>/index/ path, with remote_url set to the root of the Artifactory instance. It serves the index and the crates from one host.
From 0.12.0, a Cargo repository in Sonatype Nexus is recognized from its /repository/<repo>/ path, or /nexus/repository/<repo>/ under the /nexus context path, with remote_url set to the root of the Nexus instance. Nexus serves only the sparse index, and the crates from the same host.
VS Code reaches the Visual Studio Marketplace through two listings, which are both filtered: extensionquery, the POST behind the Extensions view and every search in it, and the per-extension latest endpoint, which VS Code reads to switch an extension to its pre-release version. In both, the download links are rewritten to point at the registry, and each VSIX download is authorized before it starts. The VSIX itself is passed through unmodified, so the signature VS Code checks it against stays valid. Icons, READMEs and the signature are fetched from the Marketplace’s CDN directly, and are never refused.
Unlike every other ecosystem, a deny leaves the extension listed. Its download returns 403, so the attempt is made and recorded in the audit log. Removing it from the listing would mean no attempt and nothing to record. VS Code reports the refused download as a VSIX that is not a valid zip file, End of central directory record signature not found, and shows the user nothing of the rule’s reason, so the audit log is the only place it appears.
hide removes the extension, or the version, from the listings, and the latest endpoint answers 404 for a hidden extension, as the Marketplace does for one that does not exist.
A version in its quarantine window is dropped from the listings and replaced with the newest version on the same track, release or pre-release, that is out of quarantine. Leaving it listed would make VS Code pick it and fail on the download. A download of a quarantined version is still refused. The Marketplace’s download URL carries no publish time, so the firewall stamps one onto each link it rewrites, which redirects.signing keeps a client from editing. With signing on, a download whose URL carries no stamp is refused, and recorded with block_reason: unsigned_url.
A rule names an extension as pkg:vscode-extension/<publisher>/<extension>@<version>, in lowercase. A rule on a version covers the builds for every platform.
An extension pack, such as ms-python.python, installs other extensions with it. VS Code installs a pack all or nothing, so the action on a member decides whether the pack installs:
| Action on a member | Result |
|---|---|
hide |
The pack installs without the member. |
| Quarantine | The pack installs with an older version of the member. |
deny |
The member’s download fails, and VS Code uninstalls the pack. Members that installed before the failure are left behind. |
To keep a member out of a pack, hide it. To block a pack, deny the pack itself, not a member.
The Extensions view asks for the full version history of many extensions at once, and such a listing runs past 100 MiB decompressed. max_manifest_size has to be raised from its 64 MiB default, to about 256 MiB, or the firewall refuses the listing and the Extensions view stays empty. The firewall logs upstream manifest exceeds maximum size when it refuses one.
A standalone firewall serves the Marketplace from a registry whose remote_url is https://marketplace.visualstudio.com. VS Code has no registry flag. Point extensionsGallery.serviceUrl at the firewall’s /_apis/public/gallery, in the installation’s product.json or through the ExtensionGalleryServiceUrl device policy. In product.json, also clear extensionsGallery.resourceUrlTemplate: while it is set, VS Code builds download URLs from it and ignores the firewall’s rewritten ones.
The Extensions view only connects to a gallery over HTTPS. Over plain HTTP it reports Failed to fetch and the firewall sees no request, although code --install-extension works. Terminate TLS in front of the firewall, and set the registry’s base_url to the HTTPS URL.
Nothing in an image pull is rewritten: the tag list is passed on whole, and there is no quarantine. The firewall checks each request as follows:
| Request | Checked against |
|---|---|
/v2/<repository>/manifests/<tag> |
The repository and the tag qualifier. |
/v2/<repository>/manifests/<digest> |
The repository and the digest as the version. |
/v2/<repository>/blobs/<digest>, .../tags/list, .../referrers/<digest> |
The repository alone. |
/v2/, /v2/_catalog |
Nothing. Passed through. |
A deny returns 403 with the distribution specification’s DENIED error, and a client that sent a GET prints its message, the rule’s reason included. A HEAD response has no body, so Docker and containerd show a deny of a tag as a bare 403. Since nothing is rewritten, there is nothing to hide an image from: a hide rule lets the pull through, and so does a deny in hide or report mode.
Each manifest request names a tag or a digest, never both, so which rule applies depends on how the client pulls:
HEAD, then fetch the manifest by digest. A rule naming the digest stops them on a pull by tag as well. A rule that allows only some tags of a denied repository does not work for them, since the fetch by digest carries no tag.How a rule names an image, and how a docker purl is read, is under OCI images in the ruleset reference.
Route an OCI registry by host. A client names a registry by its host and requests /v2/ at the root, so a path_prefix route never sees its requests. The prefix of a repository manager, such as /repository/<repo> in Sonatype Nexus, or the repository key after /v2/ in JFrog Artifactory, is not set aside for OCI, so such requests match no rule. A push through a standalone firewall returns 405.
The client fetches its tokens from the realm in the upstream’s WWW-Authenticate header, and follows blob redirects, such as Docker Hub’s to its CDN, on its own, so it has to reach those hosts directly. A Docker registry-mirrors entry and a containerd hosts.toml mirror both fall back to the upstream when the firewall refuses a request, so a deny holds only for a client that cannot reach the upstream registry itself.
The Virtual Registry checks each manifest request, also one served from its cache, and fetches tag lists and referrers through the firewall, which refuses them for a repository denied as a whole. Blobs are not checked, so a client that already knows a layer’s digest can download it.