Skip to content

Package publish leaves a legacy ZIP after a rejected release #3677

Description

@SebTardif

Summary

Non-npm-pack package publish stores a new legacy ZIP in Convex, then can reject the release (reusable attempt, version already exists, or a throw before insertReleaseInternal). Those paths never delete the new zip id. discardPendingPackagePublicationInternal only deletes blobs already attached to a pending release.

This is a source-level resource leak. I did not run a live production package publish.

Verification / reproduction

  1. Read convex/packages.ts publishPackageImpl around the legacy zip ctx.storage.store.
  2. Follow the reusable-attempt return, "version already exists" throws, and other returns before insert.
  3. Confirm legacyZipStorageId is not deleted on those paths.

Actual

  • A rejected non-npm-pack publish can leave an unreferenced ZIP in storage.

Expected

  • Store the ZIP after version / reuse checks, or delete legacyZipStorageId on every return or throw before the release row owns clawpackStorageId.
  • Successful insert still retains the downloadable ZIP.

Evidence

Source: convex/packages.ts. Proposed patch: PR #3622.

Sibling: #3613 covers multipart packagesV1 stores, not this publishPackageImpl zip.

Security / privacy

Authenticated publisher storage leak. No secret exposure.

Acceptance criteria

  • Duplicate / rejected insert does not leave a new unreferenced ZIP.
  • Successful insert still stores a downloadable ZIP.
  • Discard of a pending release still only deletes blobs that release owns.

This tracker stays open if PR #3622 is closed without landing on main.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.security

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions