How it works
Every listing and every download goes through the same checks, in a fixed order. This page describes that order, how file hashes are pinned, and what a client sees for each decision.
The request path
Your package managers send their requests to Pratique instead of to the public registries. Pratique asks the registry on their behalf, decides, and answers the client as the registry would.
Threat data reaches Pratique on its own schedule. OSV changes are picked up every 5 minutes, and your own threat feeds refresh every 15 minutes.
Listings and downloads
A client makes two kinds of request, and Pratique decides on both.
- A listing is the list of a package's releases. Pratique checks each version in it. Versions that a client cannot download are marked or left out, so the package manager picks the newest cleared version by itself.
- A download is a request for one file. Pratique runs the same checks again here, because a lockfile or a direct URL never reads the listing. This is the hard stop.
If no version of a package is cleared, the listing itself is refused with HTTP 403. The message names the reason for the newest version and links to the package page.
The order of checks
For each version, Pratique runs these checks in order. The first check that applies makes the decision, and the checks after it do not run. The package page shows the same list under Why, with the result of each check.
| Step | Check | If it applies |
|---|---|---|
| 1 | Blocked by a person, this version | Refused |
| 2 | Blocked by a person, whole package | Refused |
| 3 | Allowed by a person, this version | Cleared, subject to the hash checks |
| 4 | Known malware, from OSV or one of your threat feeds | Refused |
| 5 | File changed upstream (Composer: the release moved to a different Git commit) | Refused |
| 6 | Allowed by a person, whole package | Cleared, subject to the hash checks |
| 7 | Version known: the version can be read from the file name | Refused if not |
| 8 | Publish time known: the registry gives a publish time | Refused if not, because its age cannot be verified |
| 9 | Risk rules set to block | Refused |
| 10 | Quarantine: the release is younger than the quarantine window | Held until the window ends, unless fast-tracked |
A version that passes all ten checks is Cleared: it is past the quarantine window with no malware reports.
Some consequences of this order:
- A person's block wins over everything. It applies even to a private package.
- An allow on one version outranks the malware check. An allow on a whole package does not, so a malware report still refuses that version.
- Warn rules never stop a download. A risk rule set to warn adds a flag to the package page and
a
flaggedevent to the log. Only rules set to block take part in step 9. See risk rules. - Fast-track is part of the quarantine step. A held release can skip the rest of its quarantine when it is named as the fix for a vulnerability that you are exposed to, and nothing suggests an account takeover. Malware reports, blocking rules and a person's decision still apply first. See fast-track security fixes.
- Teams can have their own quarantine and rules. A token in a team gets that team's policy. Known malware and a person's decision apply to everyone. See teams.
An AI triage agent can place a hold on a recent version. A hold acts as a block on that version, but a person's allow for the whole package outranks it. See AI triage.
Hash verification
After the policy checks clear a download, Pratique checks the file itself.
- No declared hash. If the registry declares no hash for the file, it is refused.
- Unexpected host. If the registry's metadata points at a host that Pratique does not expect, the file is refused.
- First download. Pratique downloads the file and compares it with the hash the registry declares. If they differ, the file is refused and an incident opens.
- Pinned on first sight. Pratique records the hash the first time it sees a file. If the registry later declares a different hash for the same file, the file is refused and an incident opens.
- Every delivery. Stored files are hashed again on the way out. Pratique holds back the last byte until the hash matches, so a client never receives a complete changed file.
- Removed files. A file that storage cleanup removed must come back identical when it is fetched again. If it does not, it is refused and an incident opens.
Two registries work differently. Packagist publishes no file hashes, so Pratique pins each Composer release's Git commit and the hash of its first download. The Go module proxy lists no hashes, so each Go file is verified against Go's public checksum database. See Composer and Go.
Metadata cache
Pratique reuses a package's list of releases for 5 minutes before it asks the registry again. You can set
this from 1 minute to 24 hours, under Settings or with metadata_cache in the
config file. See settings.
The cache does not weaken policy. Quarantine, rules, exceptions and threat data are checked on every request, and downloads are still verified against their hash. A longer cache only means that new releases and removals show up later.
Backdated releases
An attacker who controls a registry account could add a release with a date in the past, so that it looks older than the quarantine window. Pratique records when it last read each package's listing. If a release appears with a date older than a listing that did not include it, its quarantine clock starts when Pratique first sees it, and an incident opens. Pratique allows one hour for registry replicas that lag behind.
The first time Pratique sees a package, it has no history, so it accepts the registry's dates. Request your important packages early. Composer and Go have their own rules for dates. See Composer and Go.
What clients see
| Decision | In a listing | On a direct download |
|---|---|---|
| Cleared | Listed as usual, with addresses on Pratique. | The file. Warn rules that match add a flagged event. |
| Held | npm: marked deprecated. pip and uv: marked yanked. Composer and Go: left out. In each case, an install without a pinned version picks the newest cleared version. | HTTP 403, with a message that says when it clears and links to the package page. |
| Refused | The same as held. | HTTP 403, with a message that gives the reason and links to the package page. For known malware, it also says to treat any machine that installed it as compromised. |
The deprecation or yank message has this form:
Pratique: held, in quarantine until 2026-12-08 09:15 UTC. To see why, or request an exception, open https://pratique.example.com/packages/npm/some-package?version=4.3.0#why
The 403 on a download has this form:
pratique: refused some-package@1.0.1: known malware (MAL-2026-1234). If this version is already installed anywhere, treat that machine as compromised and tell your security team. To see why, or request an exception, open https://pratique.example.com/packages/npm/some-package?version=1.0.1#why
Each client shows these messages in its own way. See npm, Python, Composer and Go.
The audit log
Pratique records each decision in its audit log: who asked, from which address, the package, the version, the decision and the rule that made it. A listing that withholds versions is recorded too. Only files that a client received count as downloads. Resolving a dependency or sending a HEAD request does not.
The log is a hash chain. Each event's hash covers its contents and the previous hash, so a change to past
events breaks the chain. You can sign it with a key and check it with pratique verify-log. See
monitoring.
You read the log under Activity, where you can filter it by decision, client, package, version, registry and rule, and export it as CSV. See the dashboard.