@@ -303,6 +303,9 @@ func TestShowAccessOnNanoflow_Mock_NotFound(t *testing.T) {
303303// --- NANOFLOW VALIDATION ---
304304
305305func TestValidateNanoflowBody_DisallowedActions (t * testing.T ) {
306+ // EXHAUSTIVE: every type in checkDisallowedNanoflowAction must appear here.
307+ // If a new server-side action is added to the AST but not to the denylist,
308+ // add it here so the test fails visibly.
306309 tests := []struct {
307310 name string
308311 stmt ast.MicroflowStatement
@@ -311,9 +314,24 @@ func TestValidateNanoflowBody_DisallowedActions(t *testing.T) {
311314 {"RaiseError" , & ast.RaiseErrorStmt {}, "ErrorEvent" },
312315 {"JavaAction" , & ast.CallJavaActionStmt {}, "Java" },
313316 {"DatabaseQuery" , & ast.ExecuteDatabaseQueryStmt {}, "database" },
317+ {"CallExternalAction" , & ast.CallExternalActionStmt {}, "external action" },
314318 {"ShowHomePage" , & ast.ShowHomePageStmt {}, "SHOW HOME PAGE" },
315319 {"RestCall" , & ast.RestCallStmt {}, "REST" },
320+ {"SendRestRequest" , & ast.SendRestRequestStmt {}, "REST" },
321+ {"ImportFromMapping" , & ast.ImportFromMappingStmt {}, "import mapping" },
322+ {"ExportToMapping" , & ast.ExportToMappingStmt {}, "export mapping" },
323+ {"TransformJson" , & ast.TransformJsonStmt {}, "JSON transformation" },
316324 {"CallWorkflow" , & ast.CallWorkflowStmt {}, "workflow" },
325+ {"GetWorkflowData" , & ast.GetWorkflowDataStmt {}, "workflow" },
326+ {"GetWorkflows" , & ast.GetWorkflowsStmt {}, "workflow" },
327+ {"GetWorkflowActivityRecords" , & ast.GetWorkflowActivityRecordsStmt {}, "workflow" },
328+ {"WorkflowOperation" , & ast.WorkflowOperationStmt {}, "workflow" },
329+ {"SetTaskOutcome" , & ast.SetTaskOutcomeStmt {}, "workflow" },
330+ {"OpenUserTask" , & ast.OpenUserTaskStmt {}, "workflow" },
331+ {"NotifyWorkflow" , & ast.NotifyWorkflowStmt {}, "workflow" },
332+ {"OpenWorkflow" , & ast.OpenWorkflowStmt {}, "workflow" },
333+ {"LockWorkflow" , & ast.LockWorkflowStmt {}, "workflow" },
334+ {"UnlockWorkflow" , & ast.UnlockWorkflowStmt {}, "workflow" },
317335 }
318336
319337 for _ , tt := range tests {
@@ -338,6 +356,7 @@ func TestValidateNanoflowBody_AllowedActions(t *testing.T) {
338356 {"ShowPage" , & ast.ShowPageStmt {}},
339357 {"CallMicroflow" , & ast.CallMicroflowStmt {}},
340358 {"CallNanoflow" , & ast.CallNanoflowStmt {}},
359+ {"CallJavaScriptAction" , & ast.CallJavaScriptActionStmt {}},
341360 {"CreateVariable" , & ast.DeclareStmt {}},
342361 {"ChangeVariable" , & ast.MfSetStmt {}},
343362 }
0 commit comments