Skip to content

fix: review batch 3 (formats, group metadata, VEX versions, auth, quota, CLI, web paging) - #441

Merged
M0Rf30 merged 2 commits into
mainfrom
fix/review-batch-3
Nov 9, 2026
Merged

M0Rf30 merged 2 commits into
mainfrom
fix/review-batch-3

Conversation

@M0Rf30

@M0Rf30 M0Rf30 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes from the full codebase review. Several findings were already fixed on main (0.21.0) and are skipped: docker blob DELETE scoping, failed-commit upload discard, the deb signing fallback, regen queue runner count, auth_groups uniqueness, the proxy listing index, repository PATCH ordering, Azure block-list Put, the gpg signing subkey, and hosted format mismatch.

Fixed

Formats and clients

  • maven: PUT .../junit/junit/maven-metadata.xml (and its checksums) for single-segment groupIds is acknowledged instead of 400.
  • npm: the abbreviated packument keeps os, cpu, libc, hasInstallScript, funding, acceptDependencies.
  • nuget: requireLicenseAcceptance is parsed as a bool, no longer always false.
  • gomod: uploads reject zip entries outside <module>@<version>/ and more than 500 MiB uncompressed.
  • xz: xzlimit.NewReader reads one stream only and checks the dictionary of every block. pkg/deb uses it too. Before, a second stream or block could make the decoder allocate up to 4 GiB.

Group and metadata workers

  • pacman/deb groups: on a partial run (proxy upstream down), a known arch or dist keeps its previous rows instead of being dropped.
  • Group variants for callers who can't read every member keep the dists/dirs they already served (apk no longer turns empty, deb no longer 404s).
  • claim adopts the new owner when the stored checksum is empty. apk hosted-name shadowing is per directory.
  • The trash purge quota release survives shutdown. The presigned-upload sweep stops with the worker.

Security data

  • VEX fixed status: per-ecosystem comparators (dpkg, rpm, pep440, gem, nuget, maven). 2.36-9 is no longer considered at or above 2.36-9+deb12u3. apk returns "unknown".
  • OSV import: malformed records no longer count as listed, so an archive of malformed records doesn't trigger the stale prune.

Auth and API

  • Project RBAC: owners can reach both cleanup-policy dry-run routes.
  • Project tokens created by a global admin are no longer revoked by unrelated group or SSO changes.
  • Token principals no longer inherit must_change_password, so a bootstrap.adminTokenFile token works on first run.
  • DELETE /api/v1/auth/tokens/{non-uuid} returns 404.
  • curation_mode other than off is rejected for formats that can't enforce it (terraform, nix; repotype.Spec.NoCuration).
  • Promoting a bundle whose current stage was removed from its pipeline returns 409.
  • GET /repositories/{name}/license/scans is paginated (page, per_page ≤ 100, total, has_more). The web UI and oa license list page through it. The maven parent re-check queries only unresolved scans.
  • Mutating requests denied by RBAC or CSRF are audited (DenialAuditMiddleware).
  • MCP search_artifacts rejects empty queries and uses the capped search, with the REST too-broad error.
  • mcp.httpPath is validated.
  • Dead audit action constants are removed, and the docs no longer promise artifact.downloaded.

Database, recovery, quota

  • DeleteNPMPackage locks the package before pruning.
  • Scan completed_at is NULL when unset (license, secret scans).
  • Migration 026: scan_jobs_elect_latest takes an advisory lock, so concurrent scans can't both be latest.
  • Recovery rebuild fails on storage metadata errors instead of silently skipping sidecars. Journal error text is cut on a rune boundary.
  • Promotion consumes its quota reservation after commit (quota.ConsumeN), so reconcile no longer double counts.
  • Federated docker imports reserve quota per row, check digests against blob bytes, and never repoint an existing digest.

Storage and proxy

  • The filesystem alias index builds in the background, with no lock held across the walk.
  • Composer dists without a shasum, nuget .nuspec and conan non-archive files get the repo TTL instead of the immutable pin.
  • An explicit authorization header is never sent with noAuth.
  • OCI digest renewal updates the existing row only.

CLI

  • oa backup download and oa audit export write 0600 files.
  • oa errors when the home directory is unknown.
  • Nexus docker identities are path-validated.
  • An existing literal file wins over glob expansion.
  • oa quota set rejects overflow.

Web

  • Package search paging sends offset (pages 2+ repeated page 1).
  • Stale-response guards in the project home and service-account detail pages.
  • A malformed % in a legacy URL no longer blanks the page.

Verification

  • make lint: 0 issues. make deadcode ok. scripts/dup-check.sh: 0 clones.
  • go test -short -race ./... passes.
  • make generate and make docs-gen: no drift.
  • bun run typecheck, bun test and i18n:check pass.
  • Integration tests (Postgres) were not run locally; CI runs them. They cover the npm delete lock, migration 026, the admin-token revoke SQL and the promote quota flow.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Coverage

Coverage vs main
Go, unit + integration 83.3% ±0.0
Go, unit tests only 70.1% ±0.0
Go, integration tests only 54.0% -0.1
Web, lines 90.5% ±0.0
Web, functions 84.7% -0.1
Go by area
Area Coverage vs main
cmd/docgen 80.3% ±0.0
cmd/genformats 90.8% ±0.0
cmd/oa 0.0% ±0.0
cmd/resetpw 0.0% ±0.0
cmd/server 70.0% ±0.0
internal/ai 85.6% ±0.0
internal/api 77.0% ±0.0
internal/apkkeys 77.1% ±0.0
internal/artifactpath 100.0% ±0.0
internal/attest 84.0% ±0.0
internal/attestation 79.2% ±0.0
internal/audit 97.6% ±0.0
internal/auth 91.5% ±0.0
internal/backup 72.4% ±0.0
internal/bgtask 96.8% ±0.0
internal/blockreason 100.0% ±0.0
internal/branding 93.5% ±0.0
internal/bundlechecks 100.0% ±0.0
internal/clientsetup 93.6% ±0.0
internal/config 96.4% ±0.0
internal/cron 90.0% ±0.0
internal/crypto 91.0% ±0.0
internal/curation 99.0% ±0.0
internal/database 75.7% -0.2
internal/declarative 84.1% ±0.0
internal/dtrack 85.3% ±0.0
internal/exploit 93.3% -0.8
internal/federation 81.2% +0.1
internal/format 81.2% ±0.0
internal/formats 88.0% ±0.0
internal/gpgkeys 87.1% ±0.0
internal/group 89.5% ±0.0
internal/httpcache 100.0% ±0.0
internal/httpcompress 93.3% ±0.0
internal/httpx 85.7% ±0.0
internal/imagesbom 81.9% ±0.0
internal/importmeta 93.3% ±0.0
internal/iocopy 100.0% ±0.0
internal/itempath 98.3% ±0.0
internal/lazyre 100.0% ±0.0
internal/license 98.5% ±0.0
internal/licensemeta 87.5% ±0.0
internal/licensepolicy 92.6% ±0.0
internal/limitio 92.9% ±0.0
internal/mcp 89.1% -0.4
internal/metrics 96.2% ±0.0
internal/middleware 93.9% -0.3
internal/netutil 93.4% ±0.0
internal/nixkeys 79.6% ±0.0
internal/oacli 85.0% ±0.0
internal/ocimanifest 100.0% ±0.0
internal/ocipath 100.0% ±0.0
internal/ociref 96.8% ±0.0
internal/osv 89.8% ±0.0
internal/passwd 93.3% ±0.0
internal/pathseg 100.0% ±0.0
internal/pglock 79.0% ±0.0
internal/pkgdeps 88.1% ±0.0
internal/presign 99.2% ±0.0
internal/promote 84.5% -0.2
internal/proxy 86.7% ±0.0
internal/publicurl 96.8% ±0.0
internal/pypisimple 97.9% ±0.0
internal/quarantine 100.0% ±0.0
internal/quayapi 81.2% ±0.0
internal/quota 92.2% +1.5
internal/recovery 85.3% -0.4
internal/registry 100.0% ±0.0
internal/replication 78.1% -0.1
internal/repodispatch 85.1% ±0.0
internal/repotype 97.0% ±0.0
internal/sbom 89.3% -1.3
internal/scanexport 96.4% ±0.0
internal/search 90.7% ±0.0
internal/secrets 91.4% ±0.0
internal/storage 84.8% ±0.0
internal/telemetry 92.2% ±0.0
internal/tiering 83.5% ±0.0
internal/trash 96.7% ±0.0
internal/urlparams 100.0% ±0.0
internal/vuln 89.9% ±0.0
internal/webhook 86.1% ±0.0
internal/worker 82.3% -0.2
internal/workq 79.5% ±0.0
pkg/ansible 89.8% ±0.0
pkg/apk 96.0% ±0.0
pkg/cargo 95.6% ±0.0
pkg/compactindex 97.8% ±0.0
pkg/composer 94.5% ±0.0
pkg/conan 99.2% ±0.0
pkg/conda 94.8% ±0.0
pkg/deb 81.0% +0.8
pkg/delta 71.4% ±0.0
pkg/gemversion 100.0% ±0.0
pkg/gpg 86.5% ±0.0
pkg/helm 97.0% ±0.0
pkg/logger 93.8% ±0.0
pkg/maven 96.7% ±0.0
pkg/nix 99.1% ±0.0
pkg/npm 88.0% ±0.0
pkg/nuget 97.6% ±0.0
pkg/pacman 90.4% ±0.0
pkg/pyversion 100.0% ±0.0
pkg/rpm 92.3% ±0.0
pkg/rpmsign 90.5% ±0.0
pkg/rubymarshal 87.1% ±0.0
pkg/xzlimit 78.0% +14.7
tests/integration 78.8% ±0.0
web 93.7% ±0.0
Web by area (lines)
Area Coverage vs main
src 74.5% ±0.0
src/api 91.7% +1.0
src/components 88.2% ±0.0
src/composables 88.7% ±0.0
src/i18n 98.5% ±0.0
src/lib 99.1% ±0.0
src/pages 91.9% ±0.0
src/pwa 97.6% ±0.0
src/router 98.6% -1.0
src/stores 99.0% ±0.0
src/telemetry 90.9% ±0.0

Full report (HTML, merged profile) in the CI run artifacts

@M0Rf30
M0Rf30 merged commit 73e1a09 into main Nov 9, 2026
25 checks passed
@M0Rf30
M0Rf30 deleted the fix/review-batch-3 branch November 9, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant