Repository navigation
Conversation
akgarg06
had a problem deploying
to
pr-analysis
November 2, 2026 08:38 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
November 2, 2026 08:38 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
November 2, 2026 08:43 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
November 2, 2026 08:43 — 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.
Jira task : https://jira.tools.sap/browse/RBSDMS-1202
Issue
The
changelogaction had two security gaps:1. Missing parent-scope enforcement (DB layer)
DBQuery.getObjectIdForAttachmentIDaccepted only the attachmentIDas a filter. The handler retrieved attachment data without verifying that the attachment belonged to the parent record in the request, enabling cross-record data access (IDOR). When the attachment had noobjectId(e.g. a stub record),row.get("objectId").toString()threw aNullPointerException, returning a 500 instead of a meaningful error.2. Missing ACL pre-check (SDM layer)
SDM's
getChangeLogAPI does not enforce user-level access control — it returns changelog data regardless of whether the requesting user has permission to view the document. Without a pre-check, any authenticated user could fetch the changelog of any attachment they could name.Fix
DB layer — parent-scoped attachment lookup
SDMServiceGenericHandler.javaupIdKey(e.g.up__ID) from the draft attachment entity viaSDMUtils.getUpIdKey.upId(parent record key value) from the request CQN viaSDMUtils.fetchUPIDFromCQN.FILE_NOT_FOUND_ERRORif parent scope cannot be determined or the attachment is not found within the authorized parent.lookupAttachmentScopedconsolidating draft/active entity fallback with parent-scoped DB calls.DBQuery.javagetObjectIdForAttachmentIDoverload acceptingupIdKeyandupId, scoping the query with.where(doc.get("ID").eq(id).and(doc.get(upIdKey).eq(upId))).SDM layer — ACL pre-check via
getObjectSDMServiceGenericHandler.javasdmService.getObject(objectId)beforesdmService.getChangeLog(objectId).getObjectreturnsnull→ throwsFILE_NOT_FOUND_ERROR.getObjectthrows an access-denied exception (HTTP 403 from SDM, translated bySDMServiceImpltoUSER_NOT_AUTHORISED_ERROR) → rethrows asCHANGELOG_NOT_AUTHORISED_ERRORand aborts before callinggetChangeLog. Condition usesequals(SDMUtils.getErrorMessage("USER_NOT_AUTHORISED_ERROR"))to match the already-translated message, not the raw SDM response body.SDMErrorMessages.javaCHANGELOG_NOT_AUTHORISED_ERROR= "You do not have the required permissions to view the changelog. Please contact your administrator for access." — separate from the existingUSER_NOT_AUTHORISED_ERRORused for upload permission errors, ensuring no impact on existing upload flows.Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested