@x12i/memorix-retrieval 1.36.0 → 1.38.0

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 (69) hide show
  1. package/catalox-seeds/inputs/entity-descriptors/assets.json +28 -0
  2. package/catalox-seeds/inputs/entity-descriptors/subnets.json +100 -1
  3. package/catalox-seeds/inputs/entity-descriptors/topology-zones.json +45 -2
  4. package/catalox-seeds/inputs/entity-descriptors/vulnerabilities-groups.json +23 -1
  5. package/catalox-seeds/inputs/entity-descriptors/vulnerabilities.json +22 -2
  6. package/catalox-seeds/inputs/graph-descriptors/asset-subnet-paths-graph.json +41 -0
  7. package/catalox-seeds/inputs/graph-descriptors/asset-topology-vulnerabilities-graph.json +9 -2
  8. package/catalox-seeds/inputs/graph-descriptors/asset-vulnerability-group-graph.json +38 -0
  9. package/catalox-seeds/inputs/graph-descriptors/vulnerability-asset-subnet-graph.json +40 -0
  10. package/catalox-seeds/memorix-retrieval-descriptors.manifest.json +459 -7
  11. package/dist/client/catalox-adapter.d.ts.map +1 -1
  12. package/dist/client/catalox-adapter.js +10 -1
  13. package/dist/client/catalox-adapter.js.map +1 -1
  14. package/dist/client/catalox-like.d.ts +6 -0
  15. package/dist/client/catalox-like.d.ts.map +1 -1
  16. package/dist/descriptors/discover-entities.d.ts.map +1 -1
  17. package/dist/descriptors/discover-entities.js +46 -9
  18. package/dist/descriptors/discover-entities.js.map +1 -1
  19. package/dist/graphs/build-graph-directory.d.ts.map +1 -1
  20. package/dist/graphs/build-graph-directory.js +4 -0
  21. package/dist/graphs/build-graph-directory.js.map +1 -1
  22. package/dist/graphs/build-graph-document.d.ts.map +1 -1
  23. package/dist/graphs/build-graph-document.js +524 -28
  24. package/dist/graphs/build-graph-document.js.map +1 -1
  25. package/dist/graphs/fallback-graph-capabilities.d.ts +5 -0
  26. package/dist/graphs/fallback-graph-capabilities.d.ts.map +1 -1
  27. package/dist/graphs/fallback-graph-capabilities.js +171 -15
  28. package/dist/graphs/fallback-graph-capabilities.js.map +1 -1
  29. package/dist/graphs/index.d.ts +2 -1
  30. package/dist/graphs/index.d.ts.map +1 -1
  31. package/dist/graphs/index.js +1 -0
  32. package/dist/graphs/index.js.map +1 -1
  33. package/dist/graphs/load-graph-descriptor.d.ts +12 -3
  34. package/dist/graphs/load-graph-descriptor.d.ts.map +1 -1
  35. package/dist/graphs/load-graph-descriptor.js +56 -12
  36. package/dist/graphs/load-graph-descriptor.js.map +1 -1
  37. package/dist/graphs/record-access.d.ts +24 -0
  38. package/dist/graphs/record-access.d.ts.map +1 -1
  39. package/dist/graphs/record-access.js +84 -1
  40. package/dist/graphs/record-access.js.map +1 -1
  41. package/dist/graphs/types.d.ts +10 -0
  42. package/dist/graphs/types.d.ts.map +1 -1
  43. package/dist/graphs/types.js.map +1 -1
  44. package/dist/graphs/validate-graph-metadata.d.ts +36 -0
  45. package/dist/graphs/validate-graph-metadata.d.ts.map +1 -0
  46. package/dist/graphs/validate-graph-metadata.js +71 -0
  47. package/dist/graphs/validate-graph-metadata.js.map +1 -0
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/seeds/default-seed-spec.d.ts.map +1 -1
  53. package/dist/seeds/default-seed-spec.js +3 -0
  54. package/dist/seeds/default-seed-spec.js.map +1 -1
  55. package/dist/tests/catalox-adapter-scope.test.d.ts +2 -0
  56. package/dist/tests/catalox-adapter-scope.test.d.ts.map +1 -0
  57. package/dist/tests/catalox-adapter-scope.test.js +26 -0
  58. package/dist/tests/catalox-adapter-scope.test.js.map +1 -0
  59. package/dist/tests/graphs.test.js +392 -6
  60. package/dist/tests/graphs.test.js.map +1 -1
  61. package/dist/tests/resolve-filters.test.js +8 -0
  62. package/dist/tests/resolve-filters.test.js.map +1 -1
  63. package/dist/tests/seed-manifest.test.js +3 -0
  64. package/dist/tests/seed-manifest.test.js.map +1 -1
  65. package/dist/tests/validate-graph-metadata.test.d.ts +2 -0
  66. package/dist/tests/validate-graph-metadata.test.d.ts.map +1 -0
  67. package/dist/tests/validate-graph-metadata.test.js +81 -0
  68. package/dist/tests/validate-graph-metadata.test.js.map +1 -0
  69. package/package.json +4 -2
@@ -882,6 +882,14 @@
882
882
  "itemFieldExists": "zone",
883
883
  "itemArrayIncludes": { "field": "reachableFromZones", "value": "OUTSIDE" }
884
884
  }
885
+ },
886
+ {
887
+ "type": "observedInZone",
888
+ "from": { "source": "concept" },
889
+ "to": { "source": "itemField", "field": "zone", "kind": "zoneName" },
890
+ "toObjectType": "topology-zones",
891
+ "toKind": "zoneName",
892
+ "when": { "itemFieldExists": "zone", "itemFieldMissing": "cidr" }
885
893
  }
886
894
  ]
887
895
  },
@@ -904,6 +912,26 @@
904
912
  "neighbor": "from"
905
913
  }
906
914
  ]
915
+ },
916
+ {
917
+ "id": "asset-subnets-by-cidr",
918
+ "source": {
919
+ "kind": "queryByField",
920
+ "objectType": "subnets",
921
+ "sourcePath": "data.subnetCidrs",
922
+ "targetPath": "data.cidr",
923
+ "limit": 20
924
+ },
925
+ "edges": [
926
+ {
927
+ "type": "containedIn",
928
+ "from": { "source": "concept" },
929
+ "to": { "source": "relatedConcept" },
930
+ "toObjectType": "subnets",
931
+ "toKind": "cidr",
932
+ "neighbor": "to"
933
+ }
934
+ ]
907
935
  }
908
936
  ]
909
937
  }
@@ -535,6 +535,7 @@
535
535
  "inputKind": "cidr",
536
536
  "outputKind": "cidr-path-facts",
537
537
  "writeToInsights": false,
538
+ "writeToRootProperty": "possiblePaths",
538
539
  "sources": {
539
540
  "topologyDb": "memorix-knowledge",
540
541
  "topologyCollection": "topology-raw"
@@ -558,7 +559,65 @@
558
559
  ]
559
560
  }
560
561
  },
561
- "relations": {},
562
+ "relations": {
563
+ "subnetAssets": {
564
+ "targetEntity": "assets",
565
+ "type": "oneToMany",
566
+ "source": {
567
+ "contentType": "snapshots",
568
+ "path": "data.cidr"
569
+ },
570
+ "target": {
571
+ "contentType": "snapshots",
572
+ "path": "data.subnetCidrs"
573
+ },
574
+ "defaultMode": "array",
575
+ "defaultArrayProperty": "associatedAssetsSnapshots",
576
+ "targetFields": [
577
+ "ipAddress",
578
+ "hostName",
579
+ "hostType",
580
+ "zones"
581
+ ]
582
+ },
583
+ "subnetZone": {
584
+ "targetEntity": "topology-zones",
585
+ "type": "manyToOne",
586
+ "source": {
587
+ "contentType": "snapshots",
588
+ "path": "data.zone"
589
+ },
590
+ "target": {
591
+ "contentType": "snapshots",
592
+ "path": "data.name"
593
+ },
594
+ "defaultMode": "array",
595
+ "defaultArrayProperty": "associatedTopologyZonesSnapshots",
596
+ "targetFields": [
597
+ "name",
598
+ "zoneClass"
599
+ ]
600
+ }
601
+ },
602
+ "narratives": {
603
+ "has-assets": {
604
+ "label": "Has assets",
605
+ "displayName": "Has assets",
606
+ "description": "Subnet has one or more associated asset snapshots (associatedAssetsSnapshots).",
607
+ "kind": "having-signal",
608
+ "visibility": "user",
609
+ "sourceRef": "associatedAssetsSnapshots",
610
+ "targetEntity": "assets"
611
+ },
612
+ "has-possible-paths": {
613
+ "label": "Has possible paths",
614
+ "displayName": "Has possible paths",
615
+ "description": "Subnet snapshot has non-empty possiblePaths root property (topology path facts).",
616
+ "kind": "having-signal",
617
+ "visibility": "user",
618
+ "sourceRef": "possiblePaths"
619
+ }
620
+ },
562
621
  "graph": {
563
622
  "node": {
564
623
  "kind": "cidr",
@@ -567,6 +626,46 @@
567
626
  "ui": { "icon": "network" }
568
627
  },
569
628
  "edgeTemplates": [
629
+ {
630
+ "id": "subnet-zone-topology",
631
+ "source": {
632
+ "kind": "queryByField",
633
+ "objectType": "topology-zones",
634
+ "sourcePath": "data.zone",
635
+ "targetPath": "data.name",
636
+ "limit": 5
637
+ },
638
+ "edges": [
639
+ {
640
+ "type": "inZone",
641
+ "from": { "source": "concept" },
642
+ "to": { "source": "relatedConcept" },
643
+ "toObjectType": "topology-zones",
644
+ "toKind": "zoneName",
645
+ "neighbor": "to"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "id": "subnet-assets-by-cidr",
651
+ "source": {
652
+ "kind": "queryByField",
653
+ "objectType": "assets",
654
+ "sourcePath": "data.cidr",
655
+ "targetPath": "data.subnetCidrs",
656
+ "limit": 50
657
+ },
658
+ "edges": [
659
+ {
660
+ "type": "containedIn",
661
+ "from": { "source": "relatedConcept" },
662
+ "to": { "source": "concept" },
663
+ "toObjectType": "assets",
664
+ "toKind": "ipAddress",
665
+ "neighbor": "from"
666
+ }
667
+ ]
668
+ },
570
669
  {
571
670
  "id": "subnet-path-facts",
572
671
  "source": { "kind": "pathFacts", "key": "possiblePaths" },
@@ -81,13 +81,56 @@
81
81
  },
82
82
  "associatedProperties": [],
83
83
  "processing": {},
84
- "relations": {},
84
+ "relations": {
85
+ "zoneSubnets": {
86
+ "targetEntity": "subnets",
87
+ "type": "oneToMany",
88
+ "source": {
89
+ "contentType": "snapshots",
90
+ "path": "data.name"
91
+ },
92
+ "target": {
93
+ "contentType": "snapshots",
94
+ "path": "data.zone"
95
+ },
96
+ "defaultMode": "array",
97
+ "defaultArrayProperty": "associatedSubnetsSnapshots",
98
+ "targetFields": [
99
+ "cidr",
100
+ "networkAddress",
101
+ "zone",
102
+ "vr"
103
+ ]
104
+ }
105
+ },
85
106
  "graph": {
86
107
  "node": {
87
108
  "kind": "zoneName",
88
109
  "directoryFields": ["name"],
89
110
  "contentLenses": ["snapshot", "analysis"],
90
111
  "ui": { "icon": "shield" }
91
- }
112
+ },
113
+ "edgeTemplates": [
114
+ {
115
+ "id": "zone-subnets-by-name",
116
+ "source": {
117
+ "kind": "queryByField",
118
+ "objectType": "subnets",
119
+ "sourcePath": "data.name",
120
+ "targetPath": "data.zone",
121
+ "limit": 50
122
+ },
123
+ "edges": [
124
+ {
125
+ "type": "inZone",
126
+ "from": { "source": "relatedConcept" },
127
+ "to": { "source": "concept" },
128
+ "toObjectType": "subnets",
129
+ "toKind": "cidr",
130
+ "neighbor": "from"
131
+ }
132
+ ]
133
+ }
134
+ ]
92
135
  }
93
136
  }
@@ -400,6 +400,28 @@
400
400
  "directoryFields": ["name", "severity", "pluginId", "cveId"],
401
401
  "contentLenses": ["snapshot", "analysis"],
402
402
  "ui": { "icon": "bug" }
403
- }
403
+ },
404
+ "edgeTemplates": [
405
+ {
406
+ "id": "group-vulnerabilities-by-plugin",
407
+ "source": {
408
+ "kind": "queryByField",
409
+ "objectType": "vulnerabilities",
410
+ "sourcePath": "data.pluginId",
411
+ "targetPath": "data.pluginId",
412
+ "limit": 50
413
+ },
414
+ "edges": [
415
+ {
416
+ "type": "inGroup",
417
+ "from": { "source": "relatedConcept" },
418
+ "to": { "source": "concept" },
419
+ "toObjectType": "vulnerabilities",
420
+ "toKind": "hostVulnerability",
421
+ "neighbor": "from"
422
+ }
423
+ ]
424
+ }
425
+ ]
404
426
  }
405
427
  }
@@ -655,11 +655,11 @@
655
655
  "direction": "parentToChild",
656
656
  "source": {
657
657
  "contentType": "snapshots",
658
- "path": "data.assetIp"
658
+ "path": "data.assetIps"
659
659
  },
660
660
  "target": {
661
661
  "contentType": "snapshots",
662
- "path": "data.assetIps"
662
+ "path": "data.assetIp"
663
663
  }
664
664
  }
665
665
  ],
@@ -867,6 +867,26 @@
867
867
  "ui": { "icon": "alert-triangle" }
868
868
  },
869
869
  "edgeTemplates": [
870
+ {
871
+ "id": "vuln-affected-asset",
872
+ "source": {
873
+ "kind": "queryByField",
874
+ "objectType": "assets",
875
+ "sourcePath": "data.assetIp",
876
+ "targetPath": "data.assetIps",
877
+ "limit": 5
878
+ },
879
+ "edges": [
880
+ {
881
+ "type": "affectsAsset",
882
+ "from": { "source": "concept" },
883
+ "to": { "source": "relatedConcept" },
884
+ "toObjectType": "assets",
885
+ "toKind": "ipAddress",
886
+ "neighbor": "to"
887
+ }
888
+ ]
889
+ },
870
890
  {
871
891
  "id": "vuln-in-group",
872
892
  "source": {
@@ -0,0 +1,41 @@
1
+ {
2
+ "id": "asset-subnet-paths-graph",
3
+ "title": "Asset → subnet → paths",
4
+ "focusObjectType": "assets",
5
+ "maxDepth": 3,
6
+ "includeEdgeTemplates": [
7
+ "asset-subnets-by-cidr",
8
+ "asset-topology-associated",
9
+ "subnet-zone-topology",
10
+ "subnet-assets-by-cidr",
11
+ "subnet-path-facts",
12
+ "zone-subnets-by-name"
13
+ ],
14
+ "tiers": [
15
+ {
16
+ "id": "topology",
17
+ "label": "Topology",
18
+ "objectTypes": ["assets", "subnets", "topology-zones"]
19
+ }
20
+ ],
21
+ "nodes": [
22
+ { "objectType": "assets", "tier": "topology" },
23
+ { "objectType": "subnets", "tier": "topology" },
24
+ { "objectType": "topology-zones", "tier": "topology" }
25
+ ],
26
+ "directory": {
27
+ "defaultObjectTypes": ["assets", "subnets", "topology-zones"],
28
+ "searchFields": ["title", "identifierKey"],
29
+ "narrativeFiltersByObjectType": {
30
+ "subnets": [
31
+ { "key": "has-assets", "label": "Has assets" },
32
+ { "key": "has-possible-paths", "label": "Has possible paths" }
33
+ ]
34
+ }
35
+ },
36
+ "ui": {
37
+ "icon": "network",
38
+ "group": "network",
39
+ "order": 30
40
+ }
41
+ }
@@ -2,12 +2,19 @@
2
2
  "id": "asset-topology-vulnerabilities-graph",
3
3
  "title": "Asset topology & vulnerabilities",
4
4
  "focusObjectType": "assets",
5
- "maxDepth": 2,
5
+ "maxDepth": 3,
6
6
  "includeEdgeTemplates": [
7
7
  "asset-topology-associated",
8
+ "asset-subnets-by-cidr",
8
9
  "asset-vulnerabilities-by-ip",
10
+ "vuln-affected-asset",
9
11
  "vuln-in-group",
10
- "vuln-group-by-plugin"
12
+ "vuln-group-by-plugin",
13
+ "group-vulnerabilities-by-plugin",
14
+ "subnet-zone-topology",
15
+ "subnet-assets-by-cidr",
16
+ "subnet-path-facts",
17
+ "zone-subnets-by-name"
11
18
  ],
12
19
  "tiers": [
13
20
  {
@@ -0,0 +1,38 @@
1
+ {
2
+ "id": "asset-vulnerability-group-graph",
3
+ "title": "Asset → vulnerability → group",
4
+ "focusObjectType": "assets",
5
+ "maxDepth": 2,
6
+ "includeEdgeTemplates": [
7
+ "asset-vulnerabilities-by-ip",
8
+ "vuln-affected-asset",
9
+ "vuln-in-group",
10
+ "vuln-group-by-plugin"
11
+ ],
12
+ "tiers": [
13
+ {
14
+ "id": "topology",
15
+ "label": "Assets",
16
+ "objectTypes": ["assets"]
17
+ },
18
+ {
19
+ "id": "vulnerabilities",
20
+ "label": "Vulnerabilities",
21
+ "objectTypes": ["vulnerabilities", "vulnerabilities-groups"]
22
+ }
23
+ ],
24
+ "nodes": [
25
+ { "objectType": "assets", "tier": "topology" },
26
+ { "objectType": "vulnerabilities", "tier": "vulnerabilities" },
27
+ { "objectType": "vulnerabilities-groups", "tier": "vulnerabilities" }
28
+ ],
29
+ "directory": {
30
+ "defaultObjectTypes": ["assets", "vulnerabilities", "vulnerabilities-groups"],
31
+ "searchFields": ["title", "identifierKey"]
32
+ },
33
+ "ui": {
34
+ "icon": "bug",
35
+ "group": "network",
36
+ "order": 40
37
+ }
38
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "vulnerability-asset-subnet-graph",
3
+ "title": "Vulnerability → asset → subnet",
4
+ "focusObjectType": "vulnerabilities",
5
+ "maxDepth": 3,
6
+ "includeEdgeTemplates": [
7
+ "vuln-affected-asset",
8
+ "asset-subnets-by-cidr",
9
+ "asset-topology-associated",
10
+ "subnet-zone-topology",
11
+ "subnet-path-facts"
12
+ ],
13
+ "tiers": [
14
+ {
15
+ "id": "vulnerabilities",
16
+ "label": "Vulnerabilities",
17
+ "objectTypes": ["vulnerabilities"]
18
+ },
19
+ {
20
+ "id": "topology",
21
+ "label": "Topology",
22
+ "objectTypes": ["assets", "subnets", "topology-zones"]
23
+ }
24
+ ],
25
+ "nodes": [
26
+ { "objectType": "vulnerabilities", "tier": "vulnerabilities" },
27
+ { "objectType": "assets", "tier": "topology" },
28
+ { "objectType": "subnets", "tier": "topology" },
29
+ { "objectType": "topology-zones", "tier": "topology" }
30
+ ],
31
+ "directory": {
32
+ "defaultObjectTypes": ["vulnerabilities", "assets", "subnets"],
33
+ "searchFields": ["title", "identifierKey"]
34
+ },
35
+ "ui": {
36
+ "icon": "alert-triangle",
37
+ "group": "network",
38
+ "order": 20
39
+ }
40
+ }