Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ private void processUpdateProduct(AtlasEntity entity, AtlasVertex vertex) throws
String state = vertex.getProperty(STATE_PROPERTY_KEY, String.class);

if (DELETED.name().equals(state)) {
// To allow product restoration but block all other updates if the product is archived
// To allow product restoration and update on daapLineageStatus but block all other updates if the product is archived
boolean isBeingRestored = false;

if (context != null && context.getEntitiesToRestore() != null) {
isBeingRestored = context.getEntitiesToRestore().contains(vertex);
}

if (!isBeingRestored) {
if (!isBeingRestored && !entity.hasAttribute(DAAP_LINEAGE_STATUS_ATTR)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Archived Product Update Bypass Vulnerability

The condition !entity.hasAttribute(DAAP_LINEAGE_STATUS_ATTR) in processUpdateProduct incorrectly allows any update to an archived DataProduct if DAAP_LINEAGE_STATUS_ATTR is present in the update request. This bypasses the intended archive protection, allowing modifications to other attributes beyond just the lineage status.

Fix in Cursor Fix in Web

throw new AtlasBaseException(OPERATION_NOT_SUPPORTED, "Cannot update DataProduct that is Archived!");
}
}
Expand Down
Loading