Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Security Guide

This guide covers HPM’s security features, the threat model, package signing, and operational best practices.

Integrity and reproducibility

HPM protects against tampering and drift through three layers.

SHA-256 checksums

Every package HPM installs is hashed as installed — a SHA-256 over the installed tree’s relative paths and file contents, each framed by its length — and the hash is recorded in hpm.lock as v2:<hex>. Lockfiles written before this format record a bare <hex> digest of the same paths and contents without the framing; hpm still verifies those as they are:

# hpm.lock (excerpt)

[package]
name = "acme/my-tools"
version = "1.0.0"

[dependencies."acme/utility-nodes"]
version = "1.2.0"
checksum = "v2:a3f2b8c9..."

[dependencies."acme/utility-nodes".source]
type = "url"
url = "https://packages.studio.example/utility-nodes-1.2.0.zip"
version = "1.2.0"

[metadata]
generated_at = "2026-03-14T10:30:00Z"
hpm_version = "0.40.2"
platform = "linux-x86_64"

Verification happens at two points:

  • On download: the archive bytes are hashed and compared against the registry entry’s cksum before anything is extracted. A mismatch removes the corrupt cached archive and aborts the install. Registry entries without a checksum install with a warning.
  • On every hpm install: each package hpm.lock pins at the version the manifest asks for is verified against its locked checksum, whether it is freshly downloaded (before it is stored) or reused from ~/.hpm/packages/. A machine that has never installed the package fetches it and verifies it the same way.

A mismatch at either point aborts with a clear error — corrupted or tampered packages never silently reach Houdini.

Lock file pinning

hpm.lock pins the exact version and a checksum of every registry and URL package installed, including the ones installed because another package requires them. It does not pin Python packages: it records their constraints, and uv resolves them again on each install (see the lock file reference). Commit it to version control. In CI, use --frozen-lockfile to fail the build if the lock would need to change:

hpm install --frozen-lockfile

This catches three failure modes:

  • The lock file is missing entirely.
  • A dependency’s constraint or a registry’s contents have drifted since the lock was written.
  • A registry or URL dependency is not pinned with a checksum: under --frozen-lockfile every one must be, so a frozen install reproduces exact bytes.

Staleness detection

Lock files include a generated_at timestamp. HPM warns on install and audit if the lock is older than 90 days — a heuristic for “you probably haven’t checked for security fixes in a while”. The warning is advisory; it does not block the install.

Package signing

hpm pack can sign the archive it produces with an Ed25519 key.

hpm signs, but does not verify. Signing is a produce-only feature. hpm emits a signature and keyId, and the registry entry carries sig/kid fields, but no hpm install path reads or checks them — the only integrity check on download is the SHA-256 checksum. Verifying a signature is currently the responsibility of whoever consumes the artifact (your registry, your CI, or a manual openssl check). Everything in this section describes the wire format such an external verifier needs; none of it describes a check hpm performs on your behalf.

Wire format

PropertyValue
Signature algorithmEd25519 (RFC 8032).
Private key formatPKCS#8 PEM (a BEGIN PRIVATE KEY block). Generated by openssl genpkey -algorithm ed25519.
Public key formatSubjectPublicKeyInfo PEM (-----BEGIN PUBLIC KEY-----). Extracted with openssl pkey -pubout.
Signature encodingStandard base64 (RFC 4648, alphabet A–Z a–z 0–9 + /, = padding). Emitted as fileSignature. Verifiers must use the standard alphabet, not base64url.
Key identifierFirst 8 bytes of the Ed25519 public key, hex-encoded (16 characters). Emitted as keyId. Lets registries index multiple keys per creator without transmitting the full public key on every artifact.
Signed payloadThe raw bytes of the produced .zip archive.

Generating a key pair

openssl genpkey -algorithm ed25519 -out signing.pem
openssl pkey -in signing.pem -pubout -out signing.pub.pem

Keep signing.pem private and outside the package directory (hpm pack refuses to package a PEM private key, or a link pointing outside the package). Publish signing.pub.pem through your registry or creator dashboard so consumers know what to verify against.

Signing a package

Three equivalent ways, tried in this order:

# 1. Explicit flag
hpm pack --key ~/.hpm/signing.pem

# 2. Environment variable. Either a path, or inline PEM content
#    (detected by a leading "-----BEGIN" marker). The inline form is meant
#    for CI systems that inject secrets as plain strings.
export HPM_SIGNING_KEY="$(cat signing.pem)"
hpm pack

# 3. Configured fallback in ~/.hpm/config.toml
# [signing]
# key_path = "/Users/me/.hpm/signing.pem"
hpm pack

The resolution order is flag → env → config. The first that’s set wins.

Output

With --json, hpm pack emits a machine-readable record suitable for CI pipelines and registry upload tooling:

{
  "archive": "dist/my-tools-1.0.0-linux-x86_64.zip",
  "sha256": "a3f2b8c9...",
  "signature": "base64-standard-encoded-ed25519-signature",
  "key_id": "7a1c3e5f9b2d4860",
  "platform": "linux-x86_64"
}

signature and key_id are present only when a signing key was supplied. platform is present only when the manifest declares [compat].platforms.

The wire format described above — PKCS#8 PEM keys, Ed25519 signatures, standard base64, key_id as the first 8 bytes of the public key in hex — is pinned by a known-answer test over a fixed key and message. Ed25519 is deterministic (RFC 8032), so a signature is reproducible byte for byte, and an upgrade of ed25519-dalek, sha2 or base64 that changed the encoding fails that test rather than silently invalidating every signature already published.

Operational guidance

  • Store the private PEM in a secret manager (Vault, Infisical, GitHub Actions secrets) rather than on disk in CI runners.
  • Treat keyId as public — it leaks nothing about the private key, but anchors verification to a specific key version.
  • Rotate by generating a new key pair, publishing the new keyId, and re-signing future releases. Your verifier should accept both the old and new keyId during the overlap window.
  • A keyId mismatch at verification time means either the wrong public key is configured, or the signer rotated without updating the registry. Note that this check happens in your verifier — hpm does not perform it (see the note under Package signing).
  • A registry that stores signatures should also publish its signers’ public keys; that is the key source an external verifier resolves keyId against.

hpm audit

hpm audit

Audit runs against the current project and reports:

CheckEmits
HTTP URLs in [dependencies] (only the url = … form)WARN per offending dependency.
hpm.lock presencePASS or WARN (No lock file found).
hpm.lock stalenessPASS (recent) or WARN (Lock file is N days old) when N > 90.
hpm.lock readableFAIL (Failed to load lock file: ...) when it cannot be parsed.
Package checksum verificationPASS or FAIL (Checksum verification failed: ...).
Installed files against their install recordsPASS (Installed files match their install records) or a FAIL per recorded file that is missing, truncated or changed. Packages installed before hpm 0.36.0 have no record and are skipped.

HTTP URLs and a missing or stale lock are advisory warnings. A checksum mismatch, a missing, truncated or changed installed file, or an unreadable hpm.lock is an integrity failure: it prints FAIL and hpm audit exits 1, so it can gate CI.

Example output:

HPM Security Audit
========================================

  PASS All URLs use HTTPS
  PASS Lock file exists (hpm.lock)
  PASS Lock file is recent
  PASS Package checksums verified
  PASS Installed files match their install records

No security issues found.

Transport security

  • HPM uses rustls for all HTTPS (no OpenSSL). Certificates are verified against the operating system’s trust store (through rustls-platform-verifier), so which roots are trusted is whatever each machine trusts: a root added to a studio’s machines is trusted by HPM too.
  • Registry answers and package archives are fetched only over HTTPS, or plain HTTP to this machine (localhost, 127.0.0.0/8, ::1) for local mirrors. Redirects follow the same rule and never step down from HTTPS to HTTP. Git registries accept https://, ssh://, file://, git@host:path or a local path, never git:// or http://, and never a URL or host starting with -.
  • TLS and checksums protect different things. A download is checked against the registry’s checksum and, when the project has a lockfile entry for that version, against the locked tree checksum. On a first resolve with no lockfile, the checksum arrives from the same registry over the same connection, so it detects corruption, not a compromised registry or a TLS-level attacker; a registry entry without a checksum installs with only a warning. Commit hpm.lock so later installs are pinned to bytes you have already seen.

What hpm does to an archive before trusting it

A package archive comes from wherever its registry entry or URL points, so hpm treats its contents as untrusted input:

  • Identity. The archive’s own hpm.toml must declare the package and version that were requested. An archive claiming to be another package is refused, so it cannot occupy that package’s place in the store.
  • Confinement. Every entry is extracted inside the install directory. Names with an absolute path, a drive, a .. component, a backslash, a colon or a NUL are refused, and symlink entries are skipped.
  • Permissions. Extracted files never receive setuid, setgid or sticky bits, or group or world write permission.
  • Size. An archive may expand to at most 1,000,000 entries and 256 GiB.
  • Formats. Only stored and deflated zip entries, and tar.gz, are decoded.

Names and versions from manifests, lock files and registries are checked before they are used in a path, so none of them can address a location outside the store, the cache or the staging directory.

Text from registries and manifests is printed with control characters and Unicode bidirectional controls removed, so it cannot inject terminal escape sequences.

Where hpm writes

hpm writes under ~/.hpm/, in the project’s hpm.lock and .hpm/, and, for hpm global, one file per package in Houdini’s preferences directory. Files and directories lists every path.

Houdini’s packages/ directory is the only one hpm writes to without owning it. It is shared with SideFX’s files, other tools, and anything you put there by hand. hpm therefore never scans it to decide what to delete: writes are confined to the hpm- prefixed file for the package being installed, and deletions to the exact file recorded in the ledger at ~/.hpm/global/houdini-{X.Y}.json.

A cloned project is untrusted too. Its .hpm/config.toml may set only [install]; it cannot move hpm’s home, choose a signing key, or redefine your registries. A project whose .hpm or .hpm/packages is a symlink is refused, and a Git registry URL a project declares is validated before it reaches git.

If you relocate the home with [storage].home_dir, pick a path that only your user account can write. hpm does not sandbox itself against other local users.

Best practices

Use HTTPS registries

# Good
[[registries]]
name = "vendor"
url = "https://registry.vendor.example/v1/registry"
type = "api"

# Refused — plaintext leaks names and lets attackers swap archives in flight
[[registries]]
name = "vendor"
url = "http://registry.vendor.example/v1/registry"
type = "api"

HPM refuses the second form; only a registry on this machine may use plain HTTP.

Commit hpm.lock

Treat hpm.lock like Cargo.lock or package-lock.json — check it in, review diffs, and merge conflicts carefully.

Use --frozen-lockfile in CI

- name: Install HPM dependencies
  run: hpm install --frozen-lockfile

Fails fast if the lock is missing or stale. Catches unintended resolver drift before it reaches production.

Run hpm audit in pre-release checks

Cheap, fast, and flags the easy mistakes (HTTP deps, missing or stale lock, checksum drift). Add it to your release workflow.

Review new dependencies

Before adding a dependency:

  • Verify the package is from the creator you expect.
  • Check the repository’s recent activity — is it maintained?
  • Skim the manifest for scripts, native binaries, and [runtime] entries that do more than you want.

HPM gives you reproducible, verifiable installs of whatever you asked for. It cannot tell you whether what you asked for is trustworthy.

Rotate signing keys periodically

Ed25519 keys don’t expire, but a key that leaked a year ago is still a leak. Rotate at studio-appropriate cadence and publish the new keyId.

Threat model

Mitigated

ThreatAttack vectorMitigation
Cache tamperingAttacker modifies a package under ~/.hpm/packages/.SHA-256 verification against hpm.lock before use.
Man-in-the-middleAttacker intercepts a download.TLS (HTTPS only, no downgrade on redirect). The lockfile’s checksum catches substituted bytes for a locked version; a first resolve relies on TLS alone.
Lockfile poisoningAttacker rewrites hpm.lock checksums.Install verifies packages against the lock, so a rewritten checksum fails against the real bytes; a lock rewritten to match substituted bytes is only caught in review. Review lockfile diffs in code review.
Swapped bytes for a locked versionRegistry or mirror serves different bytes for a version the lock pins.Install fails: fetched and stored copies must match the locked checksum.
Dependency driftSame project produces different installs over time.Exact version + checksum pinning for Houdini packages; --frozen-lockfile. Python packages are not pinned by the lock (see below).
Stale dependenciesOld versions with known CVEs.90-day staleness warnings; hpm update surfaces newer versions.
Replay of a vulnerable versionRegistry serves an older artifact than expected.Version and tree checksum are pinned in the lockfile; a registry answering for a different version than asked, or with different bytes for a locked version, is refused. Without a lockfile, the registry’s answer is taken as given.

Not addressed

HPM does not protect you against:

  • Malicious code in a legitimate package. If the author intends to do harm, HPM will faithfully distribute that harm.
  • Unknown signer. An unknown party uploading an archive that claims to be from a creator is not something hpm detects. hpm pack --key produces an Ed25519 signature and keyId, but hpm never verifies them on install — mitigation depends entirely on a verifier your registry or CI runs. See Package signing.
  • Compromised upstream sources. If the registry or Git server itself is compromised, HPM trusts what it serves. Checksums pin the bytes to what the lockfile recorded, but a first-time resolve takes the registry at its word, and there is no signature check to fall back on.
  • Python packages. [python_dependencies] are resolved by uv from the Python package index on each install. hpm.lock pins neither their versions nor their hashes, so a new or replaced release on the index can change what is installed. Pin with == to fix versions; hpm offers no hash pinning for them.
  • Scripts. hpm run and [stage].prepack execute commands a package’s manifest declares, with your permissions. hpm install runs none of them.
  • Zero-day vulnerabilities in dependencies. Use your organization’s security scanning.
  • Supply-chain attacks at the package author. Sign your own releases, encourage consumers to verify, and rotate on suspicion.
  • Local privilege escalation on shared machines. ~/.hpm/ lives in your home directory; anyone with write access to that directory can tamper. Use per-user home directories.

For these threats, layer defenses: code review, dependency scanning (cargo-audit for Rust deps, pip-audit/similar for Python deps), and signature verification at your registry.

Reporting vulnerabilities

Do not open a public issue for security problems. Instead:

  1. Open a private security advisory on GitHub.
  2. Include a reproducer, affected versions, and the impact you observed.
  3. Allow a reasonable window for a fix before public disclosure.

Security releases

Use hpm 0.40.1 or newer. 0.40.0 hardened how hpm treats cloned projects, registries and archives (most of the checks on this page), and 0.40.1 fixes a Windows regression in it. Security-relevant changes are listed under a Security heading in the changelog, and Upgrade notes lists what they require of you.