Fix project plugin config get/update#2494
Open
0xcucumbersalad wants to merge 5 commits intodecocms:mainfrom
Open
Fix project plugin config get/update#24940xcucumbersalad wants to merge 5 commits intodecocms:mainfrom
0xcucumbersalad wants to merge 5 commits intodecocms:mainfrom
Conversation
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsShould a new version be published when this PR is merged? React with an emoji to vote on the release type:
Current version: Deployment
|
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.
What is this contribution about?
Fix a cross-organization data access vulnerability in project plugin configs.
Previously, the
getandupsertmethods onProjectPluginConfigsStoragedid not scope queries by organization. This meant a caller with a validprojectIdandpluginIdcould read or modify plugin configs belonging to a project in a different organization — bypassing tenant isolation.This fix:
organizationIdparameter toget()andupsert()in both the storage port interface and the implementation.projectstable and filters byprojects.organization_idso that queries are scoped to the caller's organization.plugin-config-get.ts,plugin-config-update.ts) to passctx.organization!.id.this.get()calls withinupsert(for existing-check, post-update, and post-create reads) that were previously missing the organization scope.How to Test
org_Aandorg_B) each with at least one project that has a plugin config.org_A.PROJECT_PLUGIN_CONFIG_GETwith aprojectIdbelonging toorg_B.null/ config not found (previously would have returnedorg_B's config).PROJECT_PLUGIN_CONFIG_UPDATEtargeting a project inorg_B.org_A.Summary by cubic
Scoped project plugin config get/update and project slug lookups to the current organization to fix cross-tenant access. Prevents reading or editing configs or projects across orgs.
Written for commit 4600428. Summary will update on new commits.