@burdenoff/fluidgrids-fe-sdk 2026.1113.10 → 2026.1113.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/{AiStudioPage-VxCnlq_r.js → AiStudioPage-C040XZyS.js} +4 -4
  2. package/dist/{DataSinkDashboardPage-CDwbkGHh.js → DataSinkDashboardPage-BoyLrZnt.js} +1 -1
  3. package/dist/{ExecutionDetailPage-HtS19b0X.js → ExecutionDetailPage-C0lNp122.js} +9 -9
  4. package/dist/{ExecutionsListPage-CJqBT2xe.js → ExecutionsListPage-BpHBy1JU.js} +6 -6
  5. package/dist/{FailureTriagePanel-DA91XKVj.js → FailureTriagePanel-CbDIdU8s.js} +1 -1
  6. package/dist/{FluidGridsProvider-BXQTsUUW.js → FluidGridsProvider-CPLfIarV.js} +58 -7
  7. package/dist/{HistoryPage-Bjl0YbNG.js → HistoryPage-CCZS-hPw.js} +1 -1
  8. package/dist/{InsightsPage-B9DQ1yA8.js → InsightsPage-C-Nm9YNI.js} +5 -5
  9. package/dist/{NodesPage-B8fqXtey.js → NodesPage-C3sh0aL9.js} +1 -1
  10. package/dist/{OpenTemplateAsCodeButton-BdcTxemq.js → OpenTemplateAsCodeButton-C-6JVZoS.js} +1 -1
  11. package/dist/{PaidTemplateConfirm-CIDph--N.js → PaidTemplateConfirm-D20JFNCb.js} +1 -1
  12. package/dist/{QuotaExhaustedDialog-CRd7SYXz.js → QuotaExhaustedDialog-DTpI0jfj.js} +1 -1
  13. package/dist/{SettingsPage-S8_SgU9s.js → SettingsPage-CnGs6Ggy.js} +813 -9
  14. package/dist/{TaskQueuesPage-DsGNGmGN.js → TaskQueuesPage-DLzuumGp.js} +1 -1
  15. package/dist/{TemplateCard-BqWjHUzk.js → TemplateCard-C_YMW80k.js} +45 -35
  16. package/dist/{TemplateConfigurationModal-CxUEsjbr.js → TemplateConfigurationModal-DmM7s1zk.js} +2 -2
  17. package/dist/{TemplateDetailPanel-BxFNnlXm.js → TemplateDetailPanel-k0esV8pr.js} +12 -15
  18. package/dist/{TemplatePreview-BZVn6L-8.js → TemplatePreview-aKYt0Kad.js} +5 -5
  19. package/dist/{TemplatesPage-9_44jYuL.js → TemplatesPage-DIVghCB6.js} +13 -11
  20. package/dist/{WorkflowBuilder-DVtVPQkq.js → WorkflowBuilder-BsDvbIpS.js} +6 -6
  21. package/dist/{WorkflowBuilder-moMdJ83j.js → WorkflowBuilder-knGFBAAk.js} +4 -4
  22. package/dist/{WorkflowSearchRedirect-Ddv1GDOl.js → WorkflowSearchRedirect-DFsQzQw9.js} +1 -1
  23. package/dist/{WorkflowShareDialog-BcfzZDOj.js → WorkflowShareDialog-D8psodlb.js} +1 -1
  24. package/dist/{WorkflowsList-DqNyX65P.js → WorkflowsList-DEN-0uQe.js} +10 -10
  25. package/dist/{agentTools-C6PPmcJz.js → agentTools-BTld9unj.js} +3 -3
  26. package/dist/{ai-usage-D7SjIkUZ.js → ai-usage-DVtvLZ2P.js} +1 -1
  27. package/dist/{app-BIsCEL65.js → app-4Qdv2_5b.js} +4 -4
  28. package/dist/{assert-rules-C5739QR0.js → assert-rules-BbSyxL5d.js} +1 -1
  29. package/dist/{attach-node-helpers-CCWFS75V.js → attach-node-helpers-4d-YMaBH.js} +1 -1
  30. package/dist/{canvasNoteTools-CJzCcA-A.js → canvasNoteTools-C9vJMuXY.js} +2 -2
  31. package/dist/executions.js +2 -2
  32. package/dist/{flow-builder-DSKuzsVe.js → flow-builder-ConlP_db.js} +64 -52
  33. package/dist/{graphql-types-C5Tr6508.js → graphql-types-D82O-0XY.js} +513 -47
  34. package/dist/history.js +1 -1
  35. package/dist/{index-8Ai8teoo.d.ts → index-BVCOwqsN.d.ts} +1340 -85
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.js +49 -49
  38. package/dist/{label-CDy86rIZ.js → label-BMVzJ2yW.js} +2 -2
  39. package/dist/{logs-panel-_Dl5Nrdn.js → logs-panel-BgGt_dFm.js} +1 -1
  40. package/dist/{node-detail-view-BCG3MA47.js → node-detail-view-C4jNBsfW.js} +10 -10
  41. package/dist/{node-editor-tab-body-D1mGxSFV.js → node-editor-tab-body-CYeFTQr6.js} +3 -3
  42. package/dist/{node-operation-selection-bFx9s45-.js → node-operation-selection-DHbtGNrG.js} +9 -9
  43. package/dist/node-type-icon-DEAztACh.js +28 -0
  44. package/dist/nodes.js +1 -1
  45. package/dist/observability.d.ts +1 -1
  46. package/dist/observability.js +2 -2
  47. package/dist/{popover-CDOlW_mU.js → popover-DhwmsszC.js} +106 -5
  48. package/dist/{quick-config-panel-Ds3_l-3-.js → quick-config-panel-c8JQlXuc.js} +5 -5
  49. package/dist/{run-list-links-DZ8Q5l35.js → run-list-links-CPJimzkr.js} +1 -1
  50. package/dist/{run-mode-BMxym0mD.js → run-mode-Du-fvjtE.js} +1 -1
  51. package/dist/{schedule-panel-DExtrJhg.js → schedule-panel-CBab8kSL.js} +309 -66
  52. package/dist/settings.js +1 -1
  53. package/dist/{sidebar-node-editor-sig409hs.js → sidebar-node-editor-Bo_XRHJs.js} +5 -5
  54. package/dist/store-icon-BOiBSHY6.js +100 -0
  55. package/dist/{template-code-CobAYaeH.js → template-code-CEjudJEY.js} +1 -1
  56. package/dist/template-preview-BpP8QMAe.js +32 -0
  57. package/dist/templates.js +2 -2
  58. package/dist/{use-workflow-tests-BUzndyWO.js → use-workflow-tests-Lz8fPQZg.js} +2 -2
  59. package/dist/{useAgentDefinitions-JeTU3Axe.js → useAgentDefinitions-Bs_ci53W.js} +1 -1
  60. package/dist/{useDurableParity-BIh8h9oO.js → useDurableParity-DrahdkaR.js} +1 -1
  61. package/dist/{useExecutions-CtpcnNXY.js → useExecutions-6P7ohzlh.js} +2 -2
  62. package/dist/{useGlobalStoreClient-BrBZo54N.js → useGlobalStoreClient-B42oOe9Q.js} +1 -1
  63. package/dist/{useObservability-D3c2BemM.js → useObservability-BSLLLev9.js} +1 -1
  64. package/dist/{useRunHistory-C9To9FVu.js → useRunHistory-DuKiGSuF.js} +2 -2
  65. package/dist/{useWorkflowCodeExport-CEYZ0_Po.js → useWorkflowCodeExport-D80HIo-F.js} +2 -2
  66. package/dist/{useWorkflows-BLG1ycnl.js → useWorkflows-B5kFIfrZ.js} +1 -1
  67. package/dist/workflow-builder.js +5 -5
  68. package/dist/{workflow-code-transfer-Dbnvw5fc.js → workflow-code-transfer-50pRK3nx.js} +1 -1
  69. package/dist/workflow-pages.d.ts +1 -1
  70. package/dist/workflow-pages.js +15 -15
  71. package/dist/workflow-preview.js +1 -1
  72. package/dist/workflows-list.js +1 -1
  73. package/package.json +1 -1
  74. package/dist/node-type-icon-D28t8I64.js +0 -35
  75. package/dist/template-preview-C01KV277.js +0 -29
@@ -4,24 +4,24 @@ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
4
  import { s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-dcxg6zG6.js";
5
5
  import { n as useManagedAiPolicyAuthority } from "./ManagedAiPolicyAuthorityContext-CNkxIOZ1.js";
6
6
  import { c as budgetInputValue, d as withBudgetMode, f as EffectBadge, m as useActionPolicies, n as checkCodecServerUrl, p as effectLabel, s as BUDGET_DIMENSIONS, u as withBudgetLimit } from "./codec-client-CAYl6j46.js";
7
- import { i as isAutonomyLevel, o as useAutonomyLevelCopy, t as AUTONOMY_LEVELS } from "./run-mode-BMxym0mD.js";
7
+ import { i as isAutonomyLevel, o as useAutonomyLevelCopy, t as AUTONOMY_LEVELS } from "./run-mode-Du-fvjtE.js";
8
8
  import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
9
- import { o as throwIfResultError, t as describeOperationError } from "./errors-xPZ-IbQd.js";
9
+ import { o as throwIfResultError, r as isForbiddenError, t as describeOperationError } from "./errors-xPZ-IbQd.js";
10
10
  import { d as useFluidGridsFlag, m as usePhaseCFlags, t as FLUIDGRIDS_FLAGS, u as useDurableParityEnabled } from "./feature-flags-B_b8PJ6Z.js";
11
+ import { QI as WorkflowSecuritySeverity, XI as WorkflowSearchAttributeType, ZI as WorkflowSecurityCheck } from "./graphql-types-D82O-0XY.js";
11
12
  import { M as saveCodecServerSettings, _ as fetchPauseRules, a as createPauseRule, c as deletePauseRule, f as fetchArchiveSettings, g as fetchCodecServerSettings, j as saveArchiveSettings, l as deleteSearchAttribute, o as createSearchAttribute, r as clearArchiveSettings, x as fetchSearchAttributes } from "./api-CEnNq15C.js";
12
13
  import { i as NativeSelect, o as StatusPill, t as FieldError, u as useResource } from "./shared-C0LCTtyh.js";
13
- import { OI as WorkflowSearchAttributeType } from "./graphql-types-C5Tr6508.js";
14
- import { A as useFlowStore } from "./node-operation-selection-bFx9s45-.js";
15
- import { Tt as useSaveStatusStore, Yt as findSaveConflict } from "./FluidGridsProvider-BXQTsUUW.js";
16
- import { a as useLogStreamDestinations, i as useLogStreamDestinationActions } from "./useObservability-D3c2BemM.js";
14
+ import { A as useFlowStore } from "./node-operation-selection-DHbtGNrG.js";
15
+ import { Tt as useSaveStatusStore, Yt as findSaveConflict } from "./FluidGridsProvider-CPLfIarV.js";
16
+ import { a as useLogStreamDestinations, i as useLogStreamDestinationActions } from "./useObservability-BSLLLev9.js";
17
17
  import { n as useConnections } from "./useConnections-BlB0gbOB.js";
18
- import { Nt as useUpdateWorkflowDefinitionMutation, Rt as useWorkflowDefinitionQuery, Vt as useWorkflowDefinitionsQuery, n as useAgentDefinitions } from "./useAgentDefinitions-JeTU3Axe.js";
18
+ import { Nt as useUpdateWorkflowDefinitionMutation, Rt as useWorkflowDefinitionQuery, Vt as useWorkflowDefinitionsQuery, n as useAgentDefinitions } from "./useAgentDefinitions-Bs_ci53W.js";
19
19
  import { a as formToInput$2, i as emptyAgentForm, n as agentToForm, o as grantDays, r as describeRule, t as AgentFormError } from "./agent-form-D0uLvzx4.js";
20
20
  import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
21
21
  import { n as getGlobalStoreClient } from "./global-client-DP_Wxe5t.js";
22
22
  import { t as FluidGridsDocsLink } from "./FluidGridsDocsLink-JxkBpOeb.js";
23
23
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
24
- import { useNavigate, useParams } from "react-router";
24
+ import { Link, useNavigate, useParams } from "react-router";
25
25
  import { Icon } from "@iconify/react";
26
26
  import { cn } from "@burdenoff/fe-libs/utils";
27
27
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -712,6 +712,264 @@ const WorkflowNotificationSettingsDocument = {
712
712
  }]
713
713
  };
714
714
 
715
+ // src/generated/documents/wspace/WorkspaceSecurityReportDocument.ts
716
+ const WorkspaceSecurityReportDocument = {
717
+ "kind": "Document",
718
+ "definitions": [{
719
+ "kind": "OperationDefinition",
720
+ "operation": "query",
721
+ "name": {
722
+ "kind": "Name",
723
+ "value": "WorkspaceSecurityReport"
724
+ },
725
+ "variableDefinitions": [{
726
+ "kind": "VariableDefinition",
727
+ "variable": {
728
+ "kind": "Variable",
729
+ "name": {
730
+ "kind": "Name",
731
+ "value": "input"
732
+ }
733
+ },
734
+ "type": {
735
+ "kind": "NamedType",
736
+ "name": {
737
+ "kind": "Name",
738
+ "value": "WorkspaceSecurityReportInput"
739
+ }
740
+ },
741
+ "directives": []
742
+ }],
743
+ "directives": [],
744
+ "selectionSet": {
745
+ "kind": "SelectionSet",
746
+ "selections": [{
747
+ "kind": "Field",
748
+ "name": {
749
+ "kind": "Name",
750
+ "value": "workspaceSecurityReport"
751
+ },
752
+ "arguments": [{
753
+ "kind": "Argument",
754
+ "name": {
755
+ "kind": "Name",
756
+ "value": "input"
757
+ },
758
+ "value": {
759
+ "kind": "Variable",
760
+ "name": {
761
+ "kind": "Name",
762
+ "value": "input"
763
+ }
764
+ }
765
+ }],
766
+ "directives": [],
767
+ "selectionSet": {
768
+ "kind": "SelectionSet",
769
+ "selections": [
770
+ {
771
+ "kind": "Field",
772
+ "name": {
773
+ "kind": "Name",
774
+ "value": "generatedAt"
775
+ },
776
+ "arguments": [],
777
+ "directives": []
778
+ },
779
+ {
780
+ "kind": "Field",
781
+ "name": {
782
+ "kind": "Name",
783
+ "value": "checks"
784
+ },
785
+ "arguments": [],
786
+ "directives": []
787
+ },
788
+ {
789
+ "kind": "Field",
790
+ "name": {
791
+ "kind": "Name",
792
+ "value": "workflowsScanned"
793
+ },
794
+ "arguments": [],
795
+ "directives": []
796
+ },
797
+ {
798
+ "kind": "Field",
799
+ "name": {
800
+ "kind": "Name",
801
+ "value": "truncated"
802
+ },
803
+ "arguments": [],
804
+ "directives": []
805
+ },
806
+ {
807
+ "kind": "Field",
808
+ "name": {
809
+ "kind": "Name",
810
+ "value": "notes"
811
+ },
812
+ "arguments": [],
813
+ "directives": []
814
+ },
815
+ {
816
+ "kind": "Field",
817
+ "name": {
818
+ "kind": "Name",
819
+ "value": "counts"
820
+ },
821
+ "arguments": [],
822
+ "directives": [],
823
+ "selectionSet": {
824
+ "kind": "SelectionSet",
825
+ "selections": [{
826
+ "kind": "Field",
827
+ "name": {
828
+ "kind": "Name",
829
+ "value": "check"
830
+ },
831
+ "arguments": [],
832
+ "directives": []
833
+ }, {
834
+ "kind": "Field",
835
+ "name": {
836
+ "kind": "Name",
837
+ "value": "count"
838
+ },
839
+ "arguments": [],
840
+ "directives": []
841
+ }]
842
+ }
843
+ },
844
+ {
845
+ "kind": "Field",
846
+ "name": {
847
+ "kind": "Name",
848
+ "value": "findings"
849
+ },
850
+ "arguments": [],
851
+ "directives": [],
852
+ "selectionSet": {
853
+ "kind": "SelectionSet",
854
+ "selections": [
855
+ {
856
+ "kind": "Field",
857
+ "name": {
858
+ "kind": "Name",
859
+ "value": "check"
860
+ },
861
+ "arguments": [],
862
+ "directives": []
863
+ },
864
+ {
865
+ "kind": "Field",
866
+ "name": {
867
+ "kind": "Name",
868
+ "value": "severity"
869
+ },
870
+ "arguments": [],
871
+ "directives": []
872
+ },
873
+ {
874
+ "kind": "Field",
875
+ "name": {
876
+ "kind": "Name",
877
+ "value": "workflowKey"
878
+ },
879
+ "arguments": [],
880
+ "directives": []
881
+ },
882
+ {
883
+ "kind": "Field",
884
+ "name": {
885
+ "kind": "Name",
886
+ "value": "workflowName"
887
+ },
888
+ "arguments": [],
889
+ "directives": []
890
+ },
891
+ {
892
+ "kind": "Field",
893
+ "name": {
894
+ "kind": "Name",
895
+ "value": "version"
896
+ },
897
+ "arguments": [],
898
+ "directives": []
899
+ },
900
+ {
901
+ "kind": "Field",
902
+ "name": {
903
+ "kind": "Name",
904
+ "value": "active"
905
+ },
906
+ "arguments": [],
907
+ "directives": []
908
+ },
909
+ {
910
+ "kind": "Field",
911
+ "name": {
912
+ "kind": "Name",
913
+ "value": "nodeId"
914
+ },
915
+ "arguments": [],
916
+ "directives": []
917
+ },
918
+ {
919
+ "kind": "Field",
920
+ "name": {
921
+ "kind": "Name",
922
+ "value": "nodeType"
923
+ },
924
+ "arguments": [],
925
+ "directives": []
926
+ },
927
+ {
928
+ "kind": "Field",
929
+ "name": {
930
+ "kind": "Name",
931
+ "value": "nodeLabel"
932
+ },
933
+ "arguments": [],
934
+ "directives": []
935
+ },
936
+ {
937
+ "kind": "Field",
938
+ "name": {
939
+ "kind": "Name",
940
+ "value": "message"
941
+ },
942
+ "arguments": [],
943
+ "directives": []
944
+ },
945
+ {
946
+ "kind": "Field",
947
+ "name": {
948
+ "kind": "Name",
949
+ "value": "connectionId"
950
+ },
951
+ "arguments": [],
952
+ "directives": []
953
+ },
954
+ {
955
+ "kind": "Field",
956
+ "name": {
957
+ "kind": "Name",
958
+ "value": "latestVersion"
959
+ },
960
+ "arguments": [],
961
+ "directives": []
962
+ }
963
+ ]
964
+ }
965
+ }
966
+ ]
967
+ }
968
+ }]
969
+ }
970
+ }]
971
+ };
972
+
715
973
  // src/modules/action-policies/utils/policy-form.ts
716
974
  const POLICY_EFFECTS = [
717
975
  "REQUIRE_APPROVAL",
@@ -3108,6 +3366,539 @@ function WorkflowNotificationsTab({ workflowKey }) {
3108
3366
  });
3109
3367
  }
3110
3368
 
3369
+ // src/modules/settings/hooks/useWorkspaceSecurityReport.ts
3370
+ /**
3371
+ * The workspace security report (BOFF-9747) for Settings → Security report.
3372
+ *
3373
+ * `workspaceSecurityReport` is computed on demand from the stored workflow
3374
+ * definitions and is for workspace admins only: the gateway answers anyone
3375
+ * else with FORBIDDEN, which the hook reports as `forbidden` rather than as a
3376
+ * load failure, so the screen can say who may see the report.
3377
+ */
3378
+ async function fetchWorkspaceSecurityReport() {
3379
+ const result = await getFluidGridsClient().query({
3380
+ query: WorkspaceSecurityReportDocument,
3381
+ variables: {},
3382
+ fetchPolicy: "network-only"
3383
+ });
3384
+ throwIfResultError(result);
3385
+ const report = result.data?.workspaceSecurityReport;
3386
+ if (!report) throw new Error("The security report did not come back.");
3387
+ return report;
3388
+ }
3389
+ const LOADING = {
3390
+ report: null,
3391
+ error: null,
3392
+ forbidden: false,
3393
+ loading: true
3394
+ };
3395
+ function useWorkspaceSecurityReport() {
3396
+ const [state, setState] = useState(LOADING);
3397
+ const [generation, setGeneration] = useState(0);
3398
+ useEffect(() => {
3399
+ let cancelled = false;
3400
+ const load = async () => {
3401
+ try {
3402
+ const report = await fetchWorkspaceSecurityReport();
3403
+ if (!cancelled) setState({
3404
+ report,
3405
+ error: null,
3406
+ forbidden: false,
3407
+ loading: false
3408
+ });
3409
+ } catch (err) {
3410
+ if (!cancelled) setState((current) => ({
3411
+ report: current.report,
3412
+ error: err instanceof Error ? err : new Error(String(err)),
3413
+ forbidden: isForbiddenError(err),
3414
+ loading: false
3415
+ }));
3416
+ }
3417
+ };
3418
+ load();
3419
+ return () => {
3420
+ cancelled = true;
3421
+ };
3422
+ }, [generation]);
3423
+ const refresh = useCallback(() => {
3424
+ setState((current) => ({
3425
+ ...current,
3426
+ loading: true
3427
+ }));
3428
+ setGeneration((value) => value + 1);
3429
+ }, []);
3430
+ return {
3431
+ ...state,
3432
+ refresh
3433
+ };
3434
+ }
3435
+
3436
+ // src/modules/settings/utils/security-report.ts
3437
+ /** Every check the service runs, in the order the screen lists them. */
3438
+ const SECURITY_CHECKS = [
3439
+ "PUBLIC_TRIGGER_WITHOUT_AUTH",
3440
+ "CODE_EXECUTION",
3441
+ "HTTP_TO_PRIVATE_ADDRESS",
3442
+ "SQL_WITH_EXPRESSIONS",
3443
+ "OUTDATED_STORE_NODE"
3444
+ ];
3445
+ /** Severities, most serious first. */
3446
+ const SECURITY_SEVERITIES = [
3447
+ "HIGH",
3448
+ "MEDIUM",
3449
+ "LOW"
3450
+ ];
3451
+ /** The filter value that keeps every check or severity. */
3452
+ const ALL = "ALL";
3453
+ const CHECK_SET = new Set(SECURITY_CHECKS);
3454
+ const SEVERITY_SET = new Set(SECURITY_SEVERITIES);
3455
+ /** A select's value as a check filter; anything unknown keeps every check. */
3456
+ function toCheckFilter(value) {
3457
+ return SECURITY_CHECKS.find((check) => check === value) ?? "ALL";
3458
+ }
3459
+ /** A select's value as a severity filter; anything unknown keeps every severity. */
3460
+ function toSeverityFilter(value) {
3461
+ return SECURITY_SEVERITIES.find((severity) => severity === value) ?? "ALL";
3462
+ }
3463
+ /**
3464
+ * One row per known check, in screen order, with the service's count (taken
3465
+ * before the findings list is cut, so it can be larger than the findings
3466
+ * shown). Checks that did not run show 0 and `ran: false`.
3467
+ */
3468
+ function summarizeChecks(report) {
3469
+ const ran = new Set(report.checks);
3470
+ const counts = /* @__PURE__ */ new Map();
3471
+ for (const entry of report.counts) counts.set(entry.check, entry.count);
3472
+ return SECURITY_CHECKS.map((check) => ({
3473
+ check,
3474
+ count: counts.get(check) ?? 0,
3475
+ ran: ran.has(check)
3476
+ }));
3477
+ }
3478
+ /** The findings that match both filters, in the service's order (most severe first). */
3479
+ function filterFindings(findings, filter) {
3480
+ return findings.filter((finding) => (filter.check === "ALL" || finding.check === filter.check) && (filter.severity === "ALL" || finding.severity === filter.severity));
3481
+ }
3482
+ /** The badge tone for a severity; an unknown value reads as neutral. */
3483
+ function severityTone(severity) {
3484
+ if (!SEVERITY_SET.has(severity)) return "neutral";
3485
+ if (severity === String("HIGH")) return "danger";
3486
+ if (severity === String("MEDIUM")) return "warning";
3487
+ return "neutral";
3488
+ }
3489
+ /** True for a check this SDK knows a label for. */
3490
+ function isKnownCheck(check) {
3491
+ return CHECK_SET.has(check);
3492
+ }
3493
+ /**
3494
+ * Where a finding opens: the builder on the finding's workflow version. The
3495
+ * builder has no node deep link, so the node is named in the row instead.
3496
+ * Relative to the Settings page, like its "Back to Workflows" link.
3497
+ */
3498
+ function findingBuilderPath(finding) {
3499
+ return `../workflow/${encodeURIComponent(finding.workflowKey)}/${encodeURIComponent(finding.version)}`;
3500
+ }
3501
+ /** The node's name for a row: its label, else its id. */
3502
+ function findingNodeName(finding) {
3503
+ const label = finding.nodeLabel?.trim();
3504
+ return label ? label : finding.nodeId;
3505
+ }
3506
+ /** A stable key for a finding row. */
3507
+ function findingKey(finding) {
3508
+ return [
3509
+ finding.check,
3510
+ finding.workflowKey,
3511
+ finding.version,
3512
+ finding.nodeId,
3513
+ finding.connectionId ?? ""
3514
+ ].join("|");
3515
+ }
3516
+
3517
+ // src/modules/settings/utils/security-report-labels.ts
3518
+ const TONE_CLASSES$1 = {
3519
+ danger: "bg-status-error-bg-subtle text-status-error-text border-status-error-border",
3520
+ warning: "bg-status-warning-bg-subtle text-status-warning-text border-status-warning-border",
3521
+ neutral: "bg-surface text-text-secondary border-border-default"
3522
+ };
3523
+ function checkLabel(tr, check) {
3524
+ if (!isKnownCheck(check)) return check;
3525
+ return {
3526
+ ["PUBLIC_TRIGGER_WITHOUT_AUTH"]: tr("fluidgrids.settings.securityReport.check.publicTrigger", "Public trigger without auth"),
3527
+ ["CODE_EXECUTION"]: tr("fluidgrids.settings.securityReport.check.codeExecution", "Code execution"),
3528
+ ["HTTP_TO_PRIVATE_ADDRESS"]: tr("fluidgrids.settings.securityReport.check.httpPrivate", "HTTP to a private address"),
3529
+ ["SQL_WITH_EXPRESSIONS"]: tr("fluidgrids.settings.securityReport.check.sqlExpressions", "SQL built from expressions"),
3530
+ ["OUTDATED_STORE_NODE"]: tr("fluidgrids.settings.securityReport.check.outdatedNode", "Outdated Node Store node")
3531
+ }[check];
3532
+ }
3533
+ function severityLabel(tr, severity) {
3534
+ return {
3535
+ ["HIGH"]: tr("fluidgrids.settings.securityReport.severity.high", "High"),
3536
+ ["MEDIUM"]: tr("fluidgrids.settings.securityReport.severity.medium", "Medium"),
3537
+ ["LOW"]: tr("fluidgrids.settings.securityReport.severity.low", "Low")
3538
+ }[severity];
3539
+ }
3540
+
3541
+ // src/modules/settings/components/SecurityReportParts.tsx
3542
+ /**
3543
+ * Sections of Settings → Security report (BOFF-9747), split out of
3544
+ * SecurityReportTab so each part stays small.
3545
+ */
3546
+ function SeverityBadge({ severity, label }) {
3547
+ return /* @__PURE__ */ jsx(Badge, {
3548
+ variant: "outline",
3549
+ className: cn("text-xs", TONE_CLASSES$1[severityTone(severity)]),
3550
+ children: label
3551
+ });
3552
+ }
3553
+ function FindingRow({ finding, tr }) {
3554
+ return /* @__PURE__ */ jsxs("tr", {
3555
+ className: "border-t border-border-default align-top",
3556
+ "data-testid": "security-report-finding",
3557
+ "data-check": finding.check,
3558
+ "data-severity": finding.severity,
3559
+ children: [
3560
+ /* @__PURE__ */ jsx("td", {
3561
+ className: "px-3 py-2",
3562
+ children: /* @__PURE__ */ jsx(SeverityBadge, {
3563
+ severity: finding.severity,
3564
+ label: severityLabel(tr, finding.severity)
3565
+ })
3566
+ }),
3567
+ /* @__PURE__ */ jsx("td", {
3568
+ className: "px-3 py-2 text-text-primary",
3569
+ children: checkLabel(tr, finding.check)
3570
+ }),
3571
+ /* @__PURE__ */ jsxs("td", {
3572
+ className: "px-3 py-2",
3573
+ children: [/* @__PURE__ */ jsx(Link, {
3574
+ to: findingBuilderPath(finding),
3575
+ className: "font-medium text-text-primary underline-offset-2 hover:underline",
3576
+ "data-testid": "security-report-finding-link",
3577
+ children: finding.workflowName || finding.workflowKey
3578
+ }), /* @__PURE__ */ jsxs("div", {
3579
+ className: "text-xs text-text-muted",
3580
+ children: [
3581
+ tr("fluidgrids.settings.securityReport.versionLabel", "Version"),
3582
+ " ",
3583
+ finding.version,
3584
+ finding.active ? ` · ${tr("fluidgrids.settings.securityReport.activeLabel", "Active")}` : ` · ${tr("fluidgrids.settings.securityReport.draftLabel", "Draft")}`
3585
+ ]
3586
+ })]
3587
+ }),
3588
+ /* @__PURE__ */ jsxs("td", {
3589
+ className: "px-3 py-2",
3590
+ children: [/* @__PURE__ */ jsx("div", {
3591
+ className: "text-text-primary",
3592
+ children: findingNodeName(finding)
3593
+ }), /* @__PURE__ */ jsx("div", {
3594
+ className: "text-xs text-text-muted",
3595
+ children: finding.nodeType
3596
+ })]
3597
+ }),
3598
+ /* @__PURE__ */ jsxs("td", {
3599
+ className: "px-3 py-2 text-text-secondary",
3600
+ children: [finding.message, finding.latestVersion ? /* @__PURE__ */ jsx("div", {
3601
+ className: "text-xs text-text-muted",
3602
+ children: tr("fluidgrids.settings.securityReport.latestVersion", "Newest version: {{version}}", { version: finding.latestVersion })
3603
+ }) : null]
3604
+ })
3605
+ ]
3606
+ });
3607
+ }
3608
+ function ReportForbidden({ tr }) {
3609
+ return /* @__PURE__ */ jsxs("div", {
3610
+ className: "flex items-center gap-2 rounded-lg border border-border-default bg-surface p-3",
3611
+ "data-testid": "security-report-forbidden",
3612
+ role: "note",
3613
+ children: [/* @__PURE__ */ jsx(Icon, {
3614
+ icon: "mdi:shield-lock-outline",
3615
+ width: 18,
3616
+ className: "shrink-0 text-text-secondary"
3617
+ }), /* @__PURE__ */ jsx("p", {
3618
+ className: "text-sm text-text-secondary",
3619
+ children: tr("fluidgrids.settings.securityReport.adminsOnly", "Only workspace admins can see this report.")
3620
+ })]
3621
+ });
3622
+ }
3623
+ function ReportLoadFailed({ tr, error, onRetry }) {
3624
+ return /* @__PURE__ */ jsxs("div", {
3625
+ className: "space-y-3 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3",
3626
+ "data-testid": "security-report-error",
3627
+ role: "alert",
3628
+ children: [/* @__PURE__ */ jsxs("p", {
3629
+ className: "text-sm text-status-error-text",
3630
+ children: [
3631
+ tr("fluidgrids.settings.securityReport.loadFailed", "Could not load the security report."),
3632
+ " ",
3633
+ error.message
3634
+ ]
3635
+ }), /* @__PURE__ */ jsx(Button$1, {
3636
+ variant: "outline",
3637
+ size: "sm",
3638
+ onClick: onRetry,
3639
+ children: tr("fluidgrids.settings.securityReport.retry", "Try again")
3640
+ })]
3641
+ });
3642
+ }
3643
+ function ReportLoading({ tr }) {
3644
+ return /* @__PURE__ */ jsx("p", {
3645
+ className: "text-sm text-text-secondary",
3646
+ "data-testid": "security-report-loading",
3647
+ children: tr("fluidgrids.settings.securityReport.loading", "Checking the workspace's workflows…")
3648
+ });
3649
+ }
3650
+ function ReportHeader({ tr, report, loading, onRefresh }) {
3651
+ return /* @__PURE__ */ jsxs("div", {
3652
+ className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
3653
+ children: [/* @__PURE__ */ jsxs("div", {
3654
+ className: "flex items-start gap-2",
3655
+ children: [/* @__PURE__ */ jsx(Icon, {
3656
+ icon: "mdi:shield-search",
3657
+ width: 18,
3658
+ className: "mt-0.5 shrink-0 text-text-secondary"
3659
+ }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
3660
+ className: "text-sm text-text-secondary",
3661
+ children: tr("fluidgrids.settings.securityReport.intro", "Risky workflows of this workspace, checked from their saved definitions. Only workspace admins see this report.")
3662
+ }), /* @__PURE__ */ jsx("p", {
3663
+ className: "mt-1 text-xs text-text-muted",
3664
+ "data-testid": "security-report-meta",
3665
+ children: tr("fluidgrids.settings.securityReport.meta", "{{count}} workflows checked · {{time}}", {
3666
+ count: report.workflowsScanned,
3667
+ time: new Date(report.generatedAt).toLocaleString()
3668
+ })
3669
+ })] })]
3670
+ }), /* @__PURE__ */ jsxs(Button$1, {
3671
+ variant: "outline",
3672
+ size: "sm",
3673
+ onClick: onRefresh,
3674
+ disabled: loading,
3675
+ "data-testid": "security-report-refresh",
3676
+ children: [/* @__PURE__ */ jsx(Icon, {
3677
+ icon: "mdi:refresh",
3678
+ className: "mr-2",
3679
+ width: 16
3680
+ }), tr("fluidgrids.settings.securityReport.refresh", "Run again")]
3681
+ })]
3682
+ });
3683
+ }
3684
+ function ReportTruncatedNote({ tr }) {
3685
+ return /* @__PURE__ */ jsxs("div", {
3686
+ className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3",
3687
+ "data-testid": "security-report-truncated",
3688
+ role: "note",
3689
+ children: [/* @__PURE__ */ jsx(Icon, {
3690
+ icon: "mdi:alert-outline",
3691
+ width: 18,
3692
+ className: "mt-0.5 shrink-0 text-status-warning-text"
3693
+ }), /* @__PURE__ */ jsx("p", {
3694
+ className: "text-sm text-status-warning-text",
3695
+ children: tr("fluidgrids.settings.securityReport.truncated", "This report is incomplete: some workflows or findings were left out because the report is bounded. Counts still include them.")
3696
+ })]
3697
+ });
3698
+ }
3699
+ function CheckSummary({ tr, summary, check, onCheck }) {
3700
+ return /* @__PURE__ */ jsx("div", {
3701
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",
3702
+ "data-testid": "security-report-summary",
3703
+ children: summary.map((entry) => /* @__PURE__ */ jsxs("button", {
3704
+ type: "button",
3705
+ onClick: () => onCheck(check === entry.check ? "ALL" : toCheckFilter(entry.check)),
3706
+ "aria-pressed": check === entry.check,
3707
+ className: cn("rounded-lg border bg-surface p-3 text-left", check === entry.check ? "border-border-strong" : "border-border-default"),
3708
+ "data-testid": `security-report-count-${entry.check}`,
3709
+ children: [/* @__PURE__ */ jsx("div", {
3710
+ className: "text-2xl font-semibold text-text-primary",
3711
+ children: entry.ran ? entry.count : "–"
3712
+ }), /* @__PURE__ */ jsx("div", {
3713
+ className: "text-xs text-text-secondary",
3714
+ children: checkLabel(tr, entry.check)
3715
+ })]
3716
+ }, entry.check))
3717
+ });
3718
+ }
3719
+ function ReportFilters({ tr, check, severity, onCheck, onSeverity }) {
3720
+ const allLabel = tr("fluidgrids.settings.securityReport.filterAll", "All");
3721
+ return /* @__PURE__ */ jsxs("div", {
3722
+ className: "flex flex-col gap-3 sm:flex-row",
3723
+ children: [/* @__PURE__ */ jsxs(Select, {
3724
+ value: check,
3725
+ onValueChange: (value) => onCheck(toCheckFilter(value)),
3726
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
3727
+ className: "w-full bg-surface border-border-default sm:w-[260px]",
3728
+ "aria-label": tr("fluidgrids.settings.securityReport.checkFilter", "Check"),
3729
+ "data-testid": "security-report-check-filter",
3730
+ children: /* @__PURE__ */ jsx(SelectValue, {})
3731
+ }), /* @__PURE__ */ jsxs(SelectContent, { children: [/* @__PURE__ */ jsx(SelectItem, {
3732
+ value: "ALL",
3733
+ children: allLabel
3734
+ }), SECURITY_CHECKS.map((value) => /* @__PURE__ */ jsx(SelectItem, {
3735
+ value,
3736
+ children: checkLabel(tr, value)
3737
+ }, value))] })]
3738
+ }), /* @__PURE__ */ jsxs(Select, {
3739
+ value: severity,
3740
+ onValueChange: (value) => onSeverity(toSeverityFilter(value)),
3741
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
3742
+ className: "w-full bg-surface border-border-default sm:w-[180px]",
3743
+ "aria-label": tr("fluidgrids.settings.securityReport.severityFilter", "Severity"),
3744
+ "data-testid": "security-report-severity-filter",
3745
+ children: /* @__PURE__ */ jsx(SelectValue, {})
3746
+ }), /* @__PURE__ */ jsxs(SelectContent, { children: [/* @__PURE__ */ jsx(SelectItem, {
3747
+ value: "ALL",
3748
+ children: allLabel
3749
+ }), SECURITY_SEVERITIES.map((value) => /* @__PURE__ */ jsx(SelectItem, {
3750
+ value,
3751
+ children: severityLabel(tr, value)
3752
+ }, value))] })]
3753
+ })]
3754
+ });
3755
+ }
3756
+ function FindingsTable({ tr, findings, hasAnyFindings }) {
3757
+ if (findings.length === 0) return /* @__PURE__ */ jsxs("div", {
3758
+ className: "flex items-center gap-2 rounded-lg border border-border-default bg-surface-sunken p-4",
3759
+ "data-testid": "security-report-empty",
3760
+ children: [/* @__PURE__ */ jsx(Icon, {
3761
+ icon: "mdi:shield-check-outline",
3762
+ width: 18,
3763
+ className: "shrink-0 text-text-secondary"
3764
+ }), /* @__PURE__ */ jsx("p", {
3765
+ className: "text-sm text-text-secondary",
3766
+ children: !hasAnyFindings ? tr("fluidgrids.settings.securityReport.noFindings", "No risky workflows found.") : tr("fluidgrids.settings.securityReport.noMatches", "No findings match these filters.")
3767
+ })]
3768
+ });
3769
+ return /* @__PURE__ */ jsx("div", {
3770
+ className: "overflow-x-auto rounded-lg border border-border-default bg-surface",
3771
+ children: /* @__PURE__ */ jsxs("table", {
3772
+ className: "w-full min-w-[720px] text-sm",
3773
+ "data-testid": "security-report-table",
3774
+ children: [/* @__PURE__ */ jsx("thead", {
3775
+ className: "bg-surface-sunken text-left text-xs text-text-muted",
3776
+ children: /* @__PURE__ */ jsxs("tr", { children: [
3777
+ /* @__PURE__ */ jsx("th", {
3778
+ className: "px-3 py-2 font-medium",
3779
+ children: tr("fluidgrids.settings.securityReport.severityColumn", "Severity")
3780
+ }),
3781
+ /* @__PURE__ */ jsx("th", {
3782
+ className: "px-3 py-2 font-medium",
3783
+ children: tr("fluidgrids.settings.securityReport.checkColumn", "Check")
3784
+ }),
3785
+ /* @__PURE__ */ jsx("th", {
3786
+ className: "px-3 py-2 font-medium",
3787
+ children: tr("fluidgrids.settings.securityReport.workflowColumn", "Workflow")
3788
+ }),
3789
+ /* @__PURE__ */ jsx("th", {
3790
+ className: "px-3 py-2 font-medium",
3791
+ children: tr("fluidgrids.settings.securityReport.nodeColumn", "Node")
3792
+ }),
3793
+ /* @__PURE__ */ jsx("th", {
3794
+ className: "px-3 py-2 font-medium",
3795
+ children: tr("fluidgrids.settings.securityReport.detailsColumn", "What to do")
3796
+ })
3797
+ ] })
3798
+ }), /* @__PURE__ */ jsx("tbody", { children: findings.map((finding) => /* @__PURE__ */ jsx(FindingRow, {
3799
+ finding,
3800
+ tr
3801
+ }, findingKey(finding))) })]
3802
+ })
3803
+ });
3804
+ }
3805
+ function ReportNotes({ tr, notes }) {
3806
+ if (notes.length === 0) return null;
3807
+ return /* @__PURE__ */ jsxs("div", {
3808
+ "data-testid": "security-report-notes",
3809
+ children: [/* @__PURE__ */ jsx("h3", {
3810
+ className: "mb-1 text-sm font-semibold text-text-primary",
3811
+ children: tr("fluidgrids.settings.securityReport.notesTitle", "About this report")
3812
+ }), /* @__PURE__ */ jsx("ul", {
3813
+ className: "list-disc space-y-1 pl-5 text-xs text-text-secondary",
3814
+ children: [...new Set(notes)].map((note) => /* @__PURE__ */ jsx("li", { children: note }, note))
3815
+ })]
3816
+ });
3817
+ }
3818
+ function ReportRefreshFailed({ tr, error }) {
3819
+ return /* @__PURE__ */ jsxs("p", {
3820
+ className: "text-sm text-status-error-text",
3821
+ "data-testid": "security-report-refresh-failed",
3822
+ role: "alert",
3823
+ children: [
3824
+ tr("fluidgrids.settings.securityReport.refreshFailed", "Could not run the report again. This is the last report."),
3825
+ " ",
3826
+ error.message
3827
+ ]
3828
+ });
3829
+ }
3830
+
3831
+ // src/modules/settings/components/SecurityReportTab.tsx
3832
+ /**
3833
+ * Settings → Security report (BOFF-9747): the workspace's risky workflows, the
3834
+ * FluidGrids counterpart of `n8n audit`. Public triggers without auth, code
3835
+ * execution, HTTP calls to private addresses, SQL built from expressions and
3836
+ * outdated Node Store nodes, computed on demand by `workspaceSecurityReport`.
3837
+ *
3838
+ * Workspace admins only: anyone else sees a short note, not an error.
3839
+ */
3840
+ function SecurityReportTab() {
3841
+ const tr = useTr();
3842
+ const { report, loading, error, forbidden, refresh } = useWorkspaceSecurityReport();
3843
+ const [check, setCheck] = useState("ALL");
3844
+ const [severity, setSeverity] = useState("ALL");
3845
+ const summary = useMemo(() => report ? summarizeChecks(report) : [], [report]);
3846
+ const findings = useMemo(() => report ? filterFindings(report.findings, {
3847
+ check,
3848
+ severity
3849
+ }) : [], [
3850
+ report,
3851
+ check,
3852
+ severity
3853
+ ]);
3854
+ if (forbidden) return /* @__PURE__ */ jsx(ReportForbidden, { tr });
3855
+ if (error && !report) return /* @__PURE__ */ jsx(ReportLoadFailed, {
3856
+ tr,
3857
+ error,
3858
+ onRetry: refresh
3859
+ });
3860
+ if (!report) return /* @__PURE__ */ jsx(ReportLoading, { tr });
3861
+ return /* @__PURE__ */ jsxs("div", {
3862
+ className: "space-y-6",
3863
+ "data-testid": "security-report",
3864
+ children: [
3865
+ /* @__PURE__ */ jsx(ReportHeader, {
3866
+ tr,
3867
+ report,
3868
+ loading,
3869
+ onRefresh: refresh
3870
+ }),
3871
+ error ? /* @__PURE__ */ jsx(ReportRefreshFailed, {
3872
+ tr,
3873
+ error
3874
+ }) : null,
3875
+ report.truncated ? /* @__PURE__ */ jsx(ReportTruncatedNote, { tr }) : null,
3876
+ /* @__PURE__ */ jsx(CheckSummary, {
3877
+ tr,
3878
+ summary,
3879
+ check,
3880
+ onCheck: setCheck
3881
+ }),
3882
+ /* @__PURE__ */ jsx(ReportFilters, {
3883
+ tr,
3884
+ check,
3885
+ severity,
3886
+ onCheck: setCheck,
3887
+ onSeverity: setSeverity
3888
+ }),
3889
+ /* @__PURE__ */ jsx(FindingsTable, {
3890
+ tr,
3891
+ findings,
3892
+ hasAnyFindings: report.findings.length > 0
3893
+ }),
3894
+ /* @__PURE__ */ jsx(ReportNotes, {
3895
+ tr,
3896
+ notes: report.notes
3897
+ })
3898
+ ]
3899
+ });
3900
+ }
3901
+
3111
3902
  // src/modules/settings/components/RunControlTab.tsx
3112
3903
  /**
3113
3904
  * Settings → Run control (BOFF-9906, Phase C): the workspace's activity pause
@@ -6697,6 +7488,15 @@ function SettingsPage({ workflowKey: workflowKeyProp } = {}) {
6697
7488
  width: 16
6698
7489
  }), tr("fluidgrids.settings.page.mcpTab", "MCP")]
6699
7490
  }),
7491
+ /* @__PURE__ */ jsxs(TabsTrigger, {
7492
+ value: "security-report",
7493
+ className: "gap-1.5",
7494
+ "data-testid": "fluidgrids-settings-security-report-tab",
7495
+ children: [/* @__PURE__ */ jsx(Icon, {
7496
+ icon: "mdi:shield-search",
7497
+ width: 16
7498
+ }), tr("fluidgrids.settings.page.securityReportTab", "Security report")]
7499
+ }),
6700
7500
  /* @__PURE__ */ jsxs(TabsTrigger, {
6701
7501
  value: "notifications",
6702
7502
  className: "gap-1.5",
@@ -6755,6 +7555,10 @@ function SettingsPage({ workflowKey: workflowKeyProp } = {}) {
6755
7555
  value: "mcp",
6756
7556
  children: /* @__PURE__ */ jsx(McpGatewayTab, { workflowKey })
6757
7557
  }),
7558
+ /* @__PURE__ */ jsx(TabsContent, {
7559
+ value: "security-report",
7560
+ children: /* @__PURE__ */ jsx(SecurityReportTab, {})
7561
+ }),
6758
7562
  /* @__PURE__ */ jsx(TabsContent, {
6759
7563
  value: "notifications",
6760
7564
  children: /* @__PURE__ */ jsx(WorkflowNotificationsTab, { workflowKey })
@@ -6772,4 +7576,4 @@ function SettingsPage({ workflowKey: workflowKeyProp } = {}) {
6772
7576
  });
6773
7577
  }
6774
7578
 
6775
- export { DurableHistoryCapsDocument as a, UpdateDurableHistoryCapsDocument as c, ManagedAiWorkspacePolicyDocument as i, SettingsPage_exports as n, UpdateWorkflowNotificationSettingsDocument as o, WorkflowNotificationSettingsDocument as r, UpdateManagedAiWorkspacePolicyDocument as s, SettingsPage as t };
7579
+ export { ManagedAiWorkspacePolicyDocument as a, UpdateManagedAiWorkspacePolicyDocument as c, WorkflowNotificationSettingsDocument as i, UpdateDurableHistoryCapsDocument as l, SettingsPage_exports as n, DurableHistoryCapsDocument as o, WorkspaceSecurityReportDocument as r, UpdateWorkflowNotificationSettingsDocument as s, SettingsPage as t };