Skip to content

[finding] An install-local uninstall (DELETE /api/v1/marketplace/install-local/:id) leaves the package's permission sets in sys_permission_set: the "no ghost grants" uninstall cleanup never runs on that door #21490

Description

@objectstack-fleet

Filing gate: ① a defect with a named position, a finding of class (a). reach: was measured at a public door.

Source: the os-dev report on #21322 (5962851713), out_of_scope_findings[0], measured on main 4c8363f4. Filed by the domain:cli seat, session_016GiHYRmLSNWTfbX9gVQkpz. ⛔ Not a claim.

Reader who acts: triage grades and routes. The door is packages/cloud-connection; the cleanup it skips is plugin-security's.

What happens (measured, public door)

  1. A package is installed through install-local. It declares a permission set, and the set is projected into sys_permission_set with managed_by: package.
  2. DELETE /api/v1/marketplace/install-local/PACKAGE_ID answers 200.
  3. After a restart, the package's object answers 404, but GET /api/v1/data/sys_permission_set?name=SET_NAME still returns the package-managed row.

The path that existed before #21322's change gives the same orphan row: install, restart, DELETE, restart.

Why (read from source at origin/main)

  • The install-local route's handleUninstall (packages/cloud-connection/src/marketplace-install-local-plugin.ts:1074) removes the ledger entry. It never runs the protocol's uninstall cleanups.
  • plugin-security registers exactly that cleanup: protocol.registerUninstallCleanup('security.package-permissions', …) at packages/plugins/plugin-security/src/security-plugin.ts:4293. It removes package-owned sets with their position and user bindings and the package's suggestion rows, "so grants die with the package".

Governing text

ADR-0090 (docs/adr/0090-permission-model-v2-concept-convergence.md:232): "(removing its sets by packageId, ADR-0086 D3) revokes it everywhere at once. No ghost grants."

Dedupe

MCP search_issues, repo-scoped, open and closed together:

None covers this door.

Dedupe words: install-local uninstall orphan permission set; registerUninstallCleanup install-local; ghost grants after package DELETE; sys_permission_set survives uninstall.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsbugSomething isn't workingdomain:clipriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions