[Developer] report NULLified KB columns in MCP results
This commit is contained in:
@@ -634,17 +634,19 @@ public class OrdsProbeService {
|
||||
|
||||
List<String> masked = new ArrayList<>();
|
||||
for (ProtectedColumn column : sensitiveColumns) {
|
||||
boolean present = false;
|
||||
boolean allNull = true;
|
||||
for (Map<String, Object> row : rows) {
|
||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||
if (entry.getKey().equalsIgnoreCase(column.columnName())) {
|
||||
present = true;
|
||||
allNull = allNull && entry.getValue() == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (present && allNull) {
|
||||
// APEX_JSON omits a ref-cursor column whose value is NULL. The KB
|
||||
// object handlers always select every registered protected column, so
|
||||
// a sensitive column missing from every JSON row is also a NULL result
|
||||
// and must be reported as masked to the MCP/UI caller.
|
||||
if (allNull) {
|
||||
masked.add(column.columnName().toLowerCase(Locale.ROOT) + " [" + column.policyLabel() + "]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user