git-pkgs /proxy

A lightweight caching proxy for package registries.

★ 301⑂ 57👁 3⑃ 649● 181▤ 18
GoGPL-3.0Created 2026-01-20git-pkgs.dev
下载:v0.11.0v0.11.0 ↓0.11.02026-11-02
+2
日增长
301
stars
57
forks
3
watchers
649
prs
181
issues
18
releases

README

git-pkgs proxy

A caching proxy for package registries. Speeds up package downloads by caching artifacts locally, reducing bandwidth usage and improving reliability.

 Version Cooldown

Most supply chain attacks rely on speed: a malicious version gets published and consumed by automated pipelines within minutes, before anyone notices. The cooldown feature adds a quarantine period to newly published versions. When enabled, the proxy strips versions from metadata responses until they've aged past a configurable threshold.

yaml
cooldown:
  default: "3d"               hide versions published less than 3 days ago
  ecosystems:
    npm: "7d"                 npm gets a longer window
    cargo: "0"                disable for cargo
  packages:
    "pkg:npm/lodash": "0"     exempt trusted packages


A 3-day cooldown means that when lodash publishes version 4.18.0, your builds keep using 4.17.21 until 3 days have passed. If the new release turns out to be compromised, you were never exposed.

Resolution order: package override, then ecosystem override, then global default. This lets you set a conservative default and carve out exceptions for packages where you need faster updates. See docs/configuration.md for the full config reference.

One instance can offer several cooldown policies through named profiles. Configure cooldown.profiles and point clients at paths such as /cooldown/3d/npm/ or /cooldown/7d/cargo/. Profiles share the package cache; existing URLs keep using the global policy.

 Artifact Scanning

Cooldown only looks at a version's publish timestamp — it never inspects the actual bytes. Artifact scanning closes that gap: when enabled, every artifact is staged into storage and scanned by one or more external services (trivy, ClamAV, Wiz, or anything else that speaks a small HTTP/JSON contract) before it's committed to the cache and served to clients.

yaml
scanning:
  enabled: true
  signing_key: ${PROXY_SCANNING_SIGNING_KEY}
  scanners:
    - name: clamav
      url: http://clamav-adapter:8080/scan
      mode: block              a block verdict deletes the artifact and returns 403
    - name: trivy
      url: http://trivy-adapter:8081/scan
      mode: monitor             findings are logged, never gate caching
      ecosystems: [npm, pypi]


The proxy never uploads artifact bytes to a scanner. Each scanner is notified with package metadata plus a short-lived signed URL; the scanner pulls the bytes itself from the proxy's own storage. Scanners run concurrently, and the first block-mode scanner to report a verdict of not-allowed wins immediately, canceling the rest. See docs/configuration.md for the full config reference and the scanner HTTP contract.

 Supported Registries

| Registry | Language/Platform | Cooldown | Completed |
|----------|-------------------|:--------:|:---------:|
| npm | JavaScript | Yes | ✓ |
| Cargo | Rust | Yes | ✓ |
| RubyGems | Ruby | Yes | ✓ |
| Go proxy | Go | Yes† | ✓ |
| Hex | Elixir | Yes | ✓ |
| pub.dev | Dart | Ye

Top issues

Latest release

v0.11.0 v0.11.0 2026-11-02
- Serve Git repositories and LFS objects from a local cache, FreeBSD repositories at /freebsd/{name}/, additional Maven repositories at /maven/{name}/, the Go vulnerability database at /go/vulndb, and npm attestations.
- Host generic files next to npm and Composer packages, and mirror PyPI, conda, Composer, Helm, Homebrew, Julia, CRAN and Swift packages. proxy mirror --latest mirrors only the newest version.
- Apply cooldown to Go modules and Maven and show the cooldown configuration in the web UI. When publish times are missing or unreadable, return an error instead of unfiltered metadata.

Snapshot: 2026-11-28T10:06:57Z · Data license Apache-2.0 · JSON