Watch
1
0
Fork
You've already forked pkg-proxy
1
mirror of https://github.com/git-pkgs/proxy.git synced 2026-11-09 15:49:16 -05:00
pkg-proxy/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
simon chrzanowski 1979fb098e
Accept Swift source repository PURLs in the denylist and retention rules (#641)
* Accept Swift source repository PURLs in the denylist and retention rules

Closes #613. pkg:swift/github.com/apple/swift-nio, as SBOM tools and GHSA
write Swift packages, is resolved to its registry identity through the
upstream's /identifiers:

- Denylist entries are resolved at startup, and the proxy refuses to start
  when one can't be, since a skipped entry would let the version through.
- Retention keys are accepted at validation and kept pending. The
  retention loop resolves them before each sweep, and Swift isn't swept
  while any is pending, so a rule that keeps a package is never skipped.

The mirror's source URL helper moves to the handler as SwiftSourceURL.

* Resolve Swift source denylist entries in proxy mirror too

serve resolved source-form Swift denylist entries through the upstream,
but proxy mirror built its denylist directly, so such an entry never
matched a mirror download. Both now use server.ConfigureDenylist, and
neither runs when an entry can't be resolved.

* Apply Swift source policies to every listed identity

A Swift registry may list several identities for one source repository,
but a denylist entry or retention rule naming the repository only
covered the first. Denying pkg:swift/github.com/acme/widget@1.0.0 let
acme.widget through when the registry listed other.widget first, and a
never-evict rule cleared the cached apple.swift-nio archive when
other.swift-nio came first.

Both now cover every identity the registry lists. A retention rule that
conflicts with another rule for any of them stays pending, with none
applied. Mirroring a source PURL still downloads the first identity.
2026-10-31 11:34:05 +00:00
..
accesslog Attribute requests to a caller and a client tool 2026-10-01 16:15:03 +02:00
config Accept Swift source repository PURLs in the denylist and retention rules (#641) 2026-10-31 11:34:05 +00:00
database Preserve Swift and Go compatibility when upgrading PURL (#642) 2026-10-31 09:49:35 +00:00
denylist Preserve Swift and Go compatibility when upgrading PURL (#642) 2026-10-31 09:49:35 +00:00
enrichment Preserve Swift and Go compatibility when upgrading PURL (#642) 2026-10-31 09:49:35 +00:00
gitcache Spill large Git request bodies into the cache's temporary directory 2026-10-25 09:41:05 +00:00
handler Accept Swift source repository PURLs in the denylist and retention rules (#641) 2026-10-31 11:34:05 +00:00
httpclient Share upstream rate-limit holds across instances 2026-10-25 17:34:08 +01:00
jsonscan Move abbreviated packument detection into internal/metadata/npm 2026-10-25 22:22:00 +01:00
jsonstream Update x/net and remove unused production helpers 2026-10-19 08:35:46 +01:00
memlimit Set the Go memory limit from the cgroup limit 2026-10-25 17:28:52 +01:00
metadata/npm Trim npm attestations doc comments 2026-10-30 08:29:33 +00:00
metrics Send artifacts to the client while a cache miss is stored 2026-10-25 20:31:06 +01:00
mirror Accept Swift source repository PURLs in the denylist and retention rules (#641) 2026-10-31 11:34:05 +00:00
packageurl Preserve Swift and Go compatibility when upgrading PURL (#642) 2026-10-31 09:49:35 +00:00
retention Accept Swift source repository PURLs in the denylist and retention rules (#641) 2026-10-31 11:34:05 +00:00
scanner Send artifacts to the client while a cache miss is stored 2026-10-25 20:31:06 +01:00
server Accept Swift source repository PURLs in the denylist and retention rules (#641) 2026-10-31 11:34:05 +00:00
storage Merge pull request #597 from simonchrz/perf/memory-quick-wins 2026-10-25 18:14:03 +00:00