Skip to the content.

Threat model

This document states what pullthrough-security is designed to defend against, the trust assumptions it makes, and the threats it explicitly does not cover. It complements the mechanism docs: security-model.md (scanning/provenance/policy) and access-control-and-audit.md (authn/authz/audit).

Assets

Trust boundaries

   developers / CI          PROXY (trusted, you operate it)        upstreams
   (semi-trusted)   ──────▶  authn · authz · policy · cache  ──────▶ (untrusted)
                            scanning · provenance · audit

Threats addressed

T1 — Malicious package / commit reaching builds

A dependency contains a backdoor, data-exfiltration, or build-tampering change. Mitigation: LLM commit scanning produces a risk score and malicious verdict; the policy engine blocks (blockMalicious, blockAtRiskScore) before the artifact is cached or served. Findings and rationale are surfaced in the 403 body and the admin dashboard. Where the malice is in the published artifact rather than in any commit — an extra install script in the tarball, a payload added at publish time — the LLM package-content scan has a model read the unpacked artifact itself and refuses (and evicts) what it judges malicious before the first byte is served. Residual risk: LLM analysis is probabilistic — see Limitations.

T2 — Artifact ↔ source mismatch / unverifiable origin

An artifact’s published bytes don’t correspond to the source it claims, or its origin can’t be established. Mitigation: provenance resolution links artifacts to a repo/commit with a confidence level; policy can require minConfidence, requireSignature, or full requireAttested (verified signature → trusted root), and failClosed to refuse the unverifiable.

T3 — Upstream content tampering / MITM

A compromised mirror or network attacker alters bytes in flight. Mitigation: digest-addressed content (Docker blobs and manifests-by-digest, ecosystem artifacts addressed by hash) is verified against its expected digest before caching or serving — a mismatch aborts the stream. Upstream TLS is verified by default (outbound.tls.minVersion ≥ 1.2; insecureSkipVerify is opt-in and flagged unsafe); private mirrors can pin a CA via outbound.tls.caCertFile or a per-upstream tls override.

T4 — Unauthorized access / tenant abuse

An untrusted party uses the proxy, or one tenant exhausts shared capacity. Mitigation: authentication (static tokens / OIDC-JWT), deny-by-default RBAC scoped per ecosystem+upstream, and per-team quotas (maxRequests/maxBytes/ window). Denied requests never reach an upstream or burn a tenant’s quota. JWT verification rejects alg=none and HMAC algorithms (algorithm-confusion downgrade).

T5 — Credential exposure

Upstream tokens and API keys leak from config or are sent to the wrong party. Mitigation: clients authenticate to the proxy, never to upstreams; the proxy injects upstream credentials server-side. Secrets support ${ENV} and enc:v1: (AES-256-GCM) at-rest encryption, and are kept out of ConfigMaps/images in the deployment manifests. The proxy does not forward an upstream’s login or token endpoints: such a request would be answered for the proxy’s own account and the minted credential relayed to the client. The Conan login endpoints (/v2/users/authenticate, /v2/users/check_credentials) and everything under a registry’s /v2/ that is not a pull endpoint (which is where Artifactory, Nexus and Quay host their token service) are refused for that reason. Package and registry backends are served over GET and HEAD only — any other method is answered with 405 before a backend sees it — so nothing can be published, changed or revoked with the proxy’s credentials. See the limitation on upstream credentials for what remains.

Personal cache links identify a cache user by a secret in the URL their package manager is configured with. Whoever holds the link downloads as that user. Mitigation: a link grants read access to what its user may pull and nothing else — it is not accepted by the links page or the admin API, and package backends are GET/HEAD only. Tokens carry 160 random bits and are stored as SHA-256 hashes only, so neither guessing nor a copy of the registry yields one; an unknown token costs a lookup in the registry’s store only within a budget. The proxy takes the link off the request at its edge: it is not in the request log, the audit log, the download log, traces, cache keys or anything sent upstream, and a refused link is never served as an anonymous request. Links expire (90 days by default), are limited per user, can be revoked by their user and by an operator — one link, or everything issued to a user, on every replica — and each shows its user when, from where and with which tool it was last used. Index documents that contain a user’s link are served Cache-Control: private; the edge gives a link the user’s prefix only where the link starts a value, so a mount path that a package’s author wrote into a URL of their own never turns that URL into one that carries the user’s link. Whatever a backend serves is sandboxed (Content-Security-Policy: sandbox, nosniff), so a file from a repository opened in a browser cannot act on the links page of the same origin. What remains is in the limitations.

T6 — Tampering with accountability records

An attacker covers tracks by editing the audit trail. Mitigation: the audit log is a keyed hash chain (HMAC-SHA256) — any edit, deletion, or reordering is detectable with -verify-audit, which is runnable from monitoring/CI.

T7 — Upstream outage / availability

An upstream is down or rate-limiting. Mitigation: the content-addressable cache continues serving previously pulled artifacts; single-flight collapses concurrent misses; per-upstream credentials raise rate limits (e.g. Docker Hub). This is a side benefit, not a high-availability guarantee.

Trust assumptions

Limitations and non-goals

Data handling

Operator responsibilities