Repository navigation
fix: review batch 5 — data-loss race, cross-format writes, fail-open gates - #434
Merged
Merged
Conversation
…gates Fixes the findings of the fifth codebase review: a race that dropped freshly uploaded files, format handlers acting on repositories of another format, scan gates and quarantines that failed open, and a set of correctness, security and documentation defects across the stack. Data integrity - Lock packages then versions before pruning or trashing empty versions, so a concurrent upload's committed file is never cascaded away. - Hosted format handlers refuse repositories of another format centrally in base.Handler (maven, raw, ivy/sbt, helm, pypi, nuget, ...); pypi and helm queries are format-scoped and raw upserts keep foreign files. - Docker blob DELETE removes only the image's link; the blob goes with the last image and a referenced blob answers 409. - Docker cleanup policies and registry GC honour release-bundle pins. - A signing failure fails deb/rpm metadata generation instead of publishing unsigned indexes; InRelease is signed with the signing subkey. - Bundle archive is a conditional update that no longer clobbers a concurrent promotion. Security - The vuln gate fails unless the scan completed and requested feeds are loaded; responses carry scan_status and failed_scanners. - Re-scans keep an existing secret/vuln quarantine. - CSRF rejects cross-site Basic credentials outside /api/v1; conan v1 delete bodies must be JSON. - Seeded admin-all/anonymous-read targets are immutable; unassigning and disabling share one locked last-admin check. - oa shell completion no longer sends the saved token to another server. Reliability and quotas - Webhook response bodies are stored as valid UTF-8, ending endless redeliveries; RecoveryMiddleware re-panics http.ErrAbortHandler. - Staged nix NARs reserve quota (migration 019); raw PUT prechecks quota; overwrites release the size of the row actually replaced. - Azure Put uploads blocks above 5000 MiB; failed docker commits discard the session; federation peer updates keep undecryptable secrets. - Backups skip service-account grants; restore no longer mistakes any unique violation for the bootstrap admin. API, CLI and CI - Cleanup policy PUT clears keep rules with null; duplicate SSO slugs 409. - OSV fixed_in is package- and branch-aware; EPSS rejects NaN. - Unknown server subcommands error; ./-prefixed upload globs match. - Release workflow no longer moves :latest on re-releases. - OpenAPI, backup, HSTS, TLS-key, apk-snippet and pprof docs corrected. Web - Forced password change redirects mid-session; isAdmin trusts only is_admin; partial quarantine/SBOM failures reported; declarative, attention, quota, AI-poll and exploit-feed edge states fixed; counts are locale-formatted.
Coverage
Go by area
Web by area (lines)
|
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the findings of the fifth codebase review: a race that dropped
freshly uploaded files, format handlers acting on repositories of another
format, scan gates and quarantines that failed open, and a set of
correctness, security and documentation defects across the stack.
Data integrity
so a concurrent upload's committed file is never cascaded away.
in base.Handler (maven, raw, ivy/sbt, helm, pypi, nuget, ...); pypi and
helm queries are format-scoped and raw upserts keep foreign files.
the last image and a referenced blob answers 409.
publishing unsigned indexes; InRelease is signed with the signing subkey.
concurrent promotion.
Security
loaded; responses carry scan_status and failed_scanners.
delete bodies must be JSON.
disabling share one locked last-admin check.
Reliability and quotas
redeliveries; RecoveryMiddleware re-panics http.ErrAbortHandler.
overwrites release the size of the row actually replaced.
the session; federation peer updates keep undecryptable secrets.
unique violation for the bootstrap admin.
API, CLI and CI
Web
is_admin; partial quarantine/SBOM failures reported; declarative,
attention, quota, AI-poll and exploit-feed edge states fixed; counts are
locale-formatted.