Skip to content

Refactor has_release_permission to protect mutations#111021

Open
geoffg-sentry wants to merge 2 commits intomasterfrom
refactor-has-release-permission
Open

Refactor has_release_permission to protect mutations#111021
geoffg-sentry wants to merge 2 commits intomasterfrom
refactor-has-release-permission

Conversation

@geoffg-sentry
Copy link
Contributor

Fixing this three year old weakness 14a6b2c. had_release permission was granting access if a user had any project on a release, which was nasty for mutations where a member shouldn't be able modify a release they don't have access to. We had a number of downstream code vulnerability fixes that stemmed from this, but I'm solving it upstream now.

Changes:

  • has_release_permission Added require_all_projects_param with a false default so it's backward compatible with the previous fixes
    -- when true, checks against request.access.has_projects_access()
  • Org release details PUT/DELETE, release file details PT/DELETE, release files POST, release assembly POST, and release deploys POST are all happy
  • bunch of regression tests

No changes to the read-only endpoints here nor artifactbundle assembly which we recently added explicit project scoping to.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 18, 2026
@geoffg-sentry geoffg-sentry marked this pull request as ready for review March 18, 2026 20:44
@geoffg-sentry geoffg-sentry requested a review from a team March 18, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant