Repository navigation
Fix: Scope changelog DB lookup to caller's authorized parent record - #603
Open
PujaDeshmukh17 wants to merge 3 commits into
Open
PujaDeshmukh17 wants to merge 3 commits into
PujaDeshmukh17 wants to merge 3 commits into
Conversation
PujaDeshmukh17
had a problem deploying
to
pr-analysis
October 14, 2026 07:21 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Describe your changes
The changelog action was vulnerable to IDOR (CWE-639, CWE-284). A caller could supply an arbitrary attachment ID in the OData navigation path and retrieve the changelog for any SDM document in the repository, regardless of whether the source document belonged to a parent record they were authorized to access.
Neither the Named user flow (repository-level role check only) nor the Technical user flow (service account, full access) provided record-level protection in SDM. The only authorization gate needed to be at the CAP/DB layer, and it was missing.
The changelog handler now verifies that the requested attachment belongs to the caller's own parent record before fetching its history from SDM. Previously, any authenticated user could retrieve the changelog of any document in the repository by supplying an arbitrary attachment ID. The fix scopes the database lookup to the caller's authorized record, so an unauthorized ID is rejected before the SDM call is ever made. Existing behavior is preserved where the parent record cannot be determined. A failing unit test was updated to reflect the new error type thrown by the handler.
Any documentation
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested