- isHarborRegistry: derive scheme and port from the registry URL via
parseRegistryUrl instead of hardcoding https:// so HTTP-only mirrors and
non-443 ports are detected (same scheme handling as getRegistryAuthHeader).
- isHarborRegistry: only cache the detection result when a definitive answer
was obtained; a transient network error no longer pins "not Harbor" for the
whole TTL and keeps returning _catalog 403s after Harbor recovers.
- getHarborBasicAuth: trim username/password (pasted credentials with trailing
whitespace silently broke Basic auth).
- harborListRepositories: implement real cross-project pagination for the
no-orgPath case (enumerate every project and all repos, paginate the
flattened list) so >100 projects / >100 repos no longer truncate silently
with a hardcoded hasMore=false.
- harborSearchRepositories: sanitize the search term against Harbor's query
grammar (, = ~ ( )) so special characters can't break or alter the q filter;
paginate the project list as well.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Harbor denies access to the V2 _catalog endpoint for robot accounts
(scope registry:catalog:* returns an empty JWT). This adds automatic
Harbor detection and falls back to the native Harbor project API
(/api/v2.0/projects/{name}/repositories) for both catalog listing
and image search.
- Detect Harbor via WWW-Authenticate header + /api/v2.0/ping (cached 5min)
- List repositories through Harbor project API with pagination
- Search repositories using Harbor's q=name=~ filter
- Transparent fallback: no configuration change required
Fixes#360
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add `extraHosts` option to `runContainer` and `runContainerWithStreaming` so arbitrary `HostConfig.ExtraHosts` entries can be passed when spawning containers.
Expose `getOwnExtraHosts()` from `host-path.ts` and forward the cached entries into scanner and self-updater containers, ensuring custom host aliases (e.g. internal registry hostnames) are available inside those sidecars without additional user configuration.