cartography 0.106.0rc1__py3-none-any.whl → 0.107.0rc1__py3-none-any.whl
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.
Potentially problematic release.
This version of cartography might be problematic. Click here for more details.
- cartography/_version.py +2 -2
- cartography/cli.py +131 -2
- cartography/client/core/tx.py +62 -0
- cartography/config.py +42 -0
- cartography/driftdetect/cli.py +3 -2
- cartography/graph/cleanupbuilder.py +47 -0
- cartography/graph/job.py +42 -0
- cartography/graph/querybuilder.py +136 -2
- cartography/graph/statement.py +1 -1
- cartography/intel/airbyte/__init__.py +105 -0
- cartography/intel/airbyte/connections.py +120 -0
- cartography/intel/airbyte/destinations.py +81 -0
- cartography/intel/airbyte/organizations.py +59 -0
- cartography/intel/airbyte/sources.py +78 -0
- cartography/intel/airbyte/tags.py +64 -0
- cartography/intel/airbyte/users.py +106 -0
- cartography/intel/airbyte/util.py +122 -0
- cartography/intel/airbyte/workspaces.py +63 -0
- cartography/intel/aws/__init__.py +1 -0
- cartography/intel/aws/cloudtrail_management_events.py +364 -0
- cartography/intel/aws/codebuild.py +132 -0
- cartography/intel/aws/efs.py +80 -0
- cartography/intel/aws/inspector.py +3 -13
- cartography/intel/aws/resources.py +4 -0
- cartography/intel/aws/sns.py +62 -2
- cartography/intel/entra/users.py +84 -42
- cartography/intel/scaleway/__init__.py +127 -0
- cartography/intel/scaleway/iam/__init__.py +0 -0
- cartography/intel/scaleway/iam/apikeys.py +71 -0
- cartography/intel/scaleway/iam/applications.py +71 -0
- cartography/intel/scaleway/iam/groups.py +71 -0
- cartography/intel/scaleway/iam/users.py +71 -0
- cartography/intel/scaleway/instances/__init__.py +0 -0
- cartography/intel/scaleway/instances/flexibleips.py +86 -0
- cartography/intel/scaleway/instances/instances.py +92 -0
- cartography/intel/scaleway/projects.py +79 -0
- cartography/intel/scaleway/storage/__init__.py +0 -0
- cartography/intel/scaleway/storage/snapshots.py +86 -0
- cartography/intel/scaleway/storage/volumes.py +84 -0
- cartography/intel/scaleway/utils.py +37 -0
- cartography/intel/sentinelone/__init__.py +63 -0
- cartography/intel/sentinelone/account.py +140 -0
- cartography/intel/sentinelone/agent.py +139 -0
- cartography/intel/sentinelone/api.py +113 -0
- cartography/intel/sentinelone/utils.py +9 -0
- cartography/models/airbyte/__init__.py +0 -0
- cartography/models/airbyte/connection.py +138 -0
- cartography/models/airbyte/destination.py +75 -0
- cartography/models/airbyte/organization.py +19 -0
- cartography/models/airbyte/source.py +75 -0
- cartography/models/airbyte/stream.py +74 -0
- cartography/models/airbyte/tag.py +69 -0
- cartography/models/airbyte/user.py +111 -0
- cartography/models/airbyte/workspace.py +46 -0
- cartography/models/aws/cloudtrail/management_events.py +64 -0
- cartography/models/aws/codebuild/__init__.py +0 -0
- cartography/models/aws/codebuild/project.py +49 -0
- cartography/models/aws/ecs/containers.py +19 -0
- cartography/models/aws/ecs/task_definitions.py +38 -0
- cartography/models/aws/efs/access_point.py +77 -0
- cartography/models/aws/sns/topic_subscription.py +74 -0
- cartography/models/core/common.py +1 -0
- cartography/models/core/relationships.py +44 -0
- cartography/models/entra/user.py +17 -51
- cartography/models/scaleway/__init__.py +0 -0
- cartography/models/scaleway/iam/__init__.py +0 -0
- cartography/models/scaleway/iam/apikey.py +96 -0
- cartography/models/scaleway/iam/application.py +52 -0
- cartography/models/scaleway/iam/group.py +95 -0
- cartography/models/scaleway/iam/user.py +60 -0
- cartography/models/scaleway/instance/__init__.py +0 -0
- cartography/models/scaleway/instance/flexibleip.py +52 -0
- cartography/models/scaleway/instance/instance.py +118 -0
- cartography/models/scaleway/organization.py +19 -0
- cartography/models/scaleway/project.py +48 -0
- cartography/models/scaleway/storage/__init__.py +0 -0
- cartography/models/scaleway/storage/snapshot.py +78 -0
- cartography/models/scaleway/storage/volume.py +51 -0
- cartography/models/sentinelone/__init__.py +1 -0
- cartography/models/sentinelone/account.py +40 -0
- cartography/models/sentinelone/agent.py +50 -0
- cartography/sync.py +11 -4
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/METADATA +20 -16
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/RECORD +88 -27
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/WHEEL +0 -0
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/entry_points.txt +0 -0
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.106.0rc1.dist-info → cartography-0.107.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import OtherRelationships
|
|
11
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class ScalewayInstanceProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name")
|
|
18
|
+
tags: PropertyRef = PropertyRef("tags")
|
|
19
|
+
commercial_type: PropertyRef = PropertyRef("commercial_type")
|
|
20
|
+
creation_date: PropertyRef = PropertyRef("creation_date")
|
|
21
|
+
dynamic_ip_required: PropertyRef = PropertyRef("dynamic_ip_required")
|
|
22
|
+
routed_ip_enabled: PropertyRef = PropertyRef("routed_ip_enabled")
|
|
23
|
+
enable_ipv6: PropertyRef = PropertyRef("enable_ipv6")
|
|
24
|
+
hostname: PropertyRef = PropertyRef("hostname")
|
|
25
|
+
private_ip: PropertyRef = PropertyRef("private_ip")
|
|
26
|
+
mac_address: PropertyRef = PropertyRef("mac_address")
|
|
27
|
+
modification_date: PropertyRef = PropertyRef("modification_date")
|
|
28
|
+
state: PropertyRef = PropertyRef("state")
|
|
29
|
+
location_cluster_id: PropertyRef = PropertyRef("location.cluster_id")
|
|
30
|
+
location_hypervisor_id: PropertyRef = PropertyRef("location.hypervisor_id")
|
|
31
|
+
location_node_id: PropertyRef = PropertyRef("location.node_id")
|
|
32
|
+
location_platform_id: PropertyRef = PropertyRef("location.platform_id")
|
|
33
|
+
ipv6_address: PropertyRef = PropertyRef("ipv6.address")
|
|
34
|
+
ipv6_gateway: PropertyRef = PropertyRef("ipv6.gateway")
|
|
35
|
+
ipv6_netmask: PropertyRef = PropertyRef("ipv6.netmask")
|
|
36
|
+
boot_type: PropertyRef = PropertyRef("boot_type")
|
|
37
|
+
state_detail: PropertyRef = PropertyRef("state_detail")
|
|
38
|
+
arch: PropertyRef = PropertyRef("arch")
|
|
39
|
+
private_nics: PropertyRef = PropertyRef("private_nics")
|
|
40
|
+
zone: PropertyRef = PropertyRef("zone")
|
|
41
|
+
end_of_service: PropertyRef = PropertyRef("end_of_service")
|
|
42
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class ScalewayInstanceToVolumeProperties(CartographyRelProperties):
|
|
47
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass(frozen=True)
|
|
51
|
+
# (:ScalewayVolume)<-[:MOUNTS]-(:ScalewayInstance)
|
|
52
|
+
class ScalewayInstanceToVolumeRel(CartographyRelSchema):
|
|
53
|
+
target_node_label: str = "ScalewayVolume"
|
|
54
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
55
|
+
{"id": PropertyRef("volumes_id", one_to_many=True)},
|
|
56
|
+
)
|
|
57
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
58
|
+
rel_label: str = "MOUNTS"
|
|
59
|
+
properties: ScalewayInstanceToVolumeProperties = (
|
|
60
|
+
ScalewayInstanceToVolumeProperties()
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass(frozen=True)
|
|
65
|
+
class ScalewayInstanceToFlexibleIpProperties(CartographyRelProperties):
|
|
66
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@dataclass(frozen=True)
|
|
70
|
+
# (:ScalewayFlexibleIp)-[:IDENTIFIES]->(:ScalewayInstance)
|
|
71
|
+
class ScalewayInstanceToFlexibleIpRel(CartographyRelSchema):
|
|
72
|
+
target_node_label: str = "ScalewayFlexibleIp"
|
|
73
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
74
|
+
{"id": PropertyRef("public_ips", one_to_many=True)},
|
|
75
|
+
)
|
|
76
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
77
|
+
rel_label: str = "IDENTIFIES"
|
|
78
|
+
properties: ScalewayInstanceToFlexibleIpProperties = (
|
|
79
|
+
ScalewayInstanceToFlexibleIpProperties()
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# TODO: Link to Image with image.id
|
|
84
|
+
# TODO: Link to SecurityGroup with security_group.id
|
|
85
|
+
# TODO: Link to PlacementGroup with placement_group.id
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@dataclass(frozen=True)
|
|
89
|
+
class ScalewayInstanceToProjectRelProperties(CartographyRelProperties):
|
|
90
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@dataclass(frozen=True)
|
|
94
|
+
# (:ScalewayProject)-[:RESOURCE]->(:ScalewayInstance)
|
|
95
|
+
class ScalewayInstanceToProjectRel(CartographyRelSchema):
|
|
96
|
+
target_node_label: str = "ScalewayProject"
|
|
97
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
98
|
+
{"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)},
|
|
99
|
+
)
|
|
100
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
101
|
+
rel_label: str = "RESOURCE"
|
|
102
|
+
properties: ScalewayInstanceToProjectRelProperties = (
|
|
103
|
+
ScalewayInstanceToProjectRelProperties()
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@dataclass(frozen=True)
|
|
108
|
+
class ScalewayInstanceSchema(CartographyNodeSchema):
|
|
109
|
+
label: str = "ScalewayInstance"
|
|
110
|
+
properties: ScalewayInstanceProperties = ScalewayInstanceProperties()
|
|
111
|
+
sub_resource_relationship: ScalewayInstanceToProjectRel = (
|
|
112
|
+
ScalewayInstanceToProjectRel()
|
|
113
|
+
)
|
|
114
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
115
|
+
[
|
|
116
|
+
ScalewayInstanceToVolumeRel(),
|
|
117
|
+
]
|
|
118
|
+
)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True)
|
|
9
|
+
class ScalewayOrganizationNodeProperties(CartographyNodeProperties):
|
|
10
|
+
id: PropertyRef = PropertyRef("id")
|
|
11
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class ScalewayOrganizationSchema(CartographyNodeSchema):
|
|
16
|
+
label: str = "ScalewayOrganization"
|
|
17
|
+
properties: ScalewayOrganizationNodeProperties = (
|
|
18
|
+
ScalewayOrganizationNodeProperties()
|
|
19
|
+
)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class ScalewayProjectNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
name: PropertyRef = PropertyRef("name")
|
|
17
|
+
created_at: PropertyRef = PropertyRef("created_at")
|
|
18
|
+
updated_at: PropertyRef = PropertyRef("updated_at")
|
|
19
|
+
description: PropertyRef = PropertyRef("description")
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class ScalewayProjectToOrganizationRelProperties(CartographyRelProperties):
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
# (:ScalewayOrganization)-[:RESOURCE]->(:ScalewayProject)
|
|
30
|
+
class ScalewayProjectToOrganizationRel(CartographyRelSchema):
|
|
31
|
+
target_node_label: str = "ScalewayOrganization"
|
|
32
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
33
|
+
{"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
|
|
34
|
+
)
|
|
35
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
36
|
+
rel_label: str = "RESOURCE"
|
|
37
|
+
properties: ScalewayProjectToOrganizationRelProperties = (
|
|
38
|
+
ScalewayProjectToOrganizationRelProperties()
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclass(frozen=True)
|
|
43
|
+
class ScalewayProjectSchema(CartographyNodeSchema):
|
|
44
|
+
label: str = "ScalewayProject"
|
|
45
|
+
properties: ScalewayProjectNodeProperties = ScalewayProjectNodeProperties()
|
|
46
|
+
sub_resource_relationship: ScalewayProjectToOrganizationRel = (
|
|
47
|
+
ScalewayProjectToOrganizationRel()
|
|
48
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import OtherRelationships
|
|
11
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class ScalewayVolumeSnapshotNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name")
|
|
18
|
+
tags: PropertyRef = PropertyRef("tags")
|
|
19
|
+
volume_type: PropertyRef = PropertyRef("volume_type")
|
|
20
|
+
size: PropertyRef = PropertyRef("size")
|
|
21
|
+
state: PropertyRef = PropertyRef("state")
|
|
22
|
+
creation_date: PropertyRef = PropertyRef("creation_date")
|
|
23
|
+
modification_date: PropertyRef = PropertyRef("modification_date")
|
|
24
|
+
error_reason: PropertyRef = PropertyRef("error_reason")
|
|
25
|
+
zone: PropertyRef = PropertyRef("zone")
|
|
26
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class ScalewayVolumeSnapshotToProjectRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
# (:ScalewayProject)-[:RESOURCE]->(:ScalewayVolumeSnapshot)
|
|
36
|
+
class ScalewayVolumeSnapshotToProjectRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "ScalewayProject"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)},
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: ScalewayVolumeSnapshotToProjectRelProperties = (
|
|
44
|
+
ScalewayVolumeSnapshotToProjectRelProperties()
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class ScalewayVolumeSnapshotToInstanceVolumeProperties(CartographyRelProperties):
|
|
50
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@dataclass(frozen=True)
|
|
54
|
+
# (:ScalewayVolume)-[:HAS]->(:ScalewayVolumeSnapshot)
|
|
55
|
+
class ScalewayVolumeSnapshotToInstanceVolumeRel(CartographyRelSchema):
|
|
56
|
+
target_node_label: str = "ScalewayVolume"
|
|
57
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
58
|
+
{"id": PropertyRef("base_volume.id")},
|
|
59
|
+
)
|
|
60
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
61
|
+
rel_label: str = "HAS"
|
|
62
|
+
properties: ScalewayVolumeSnapshotToInstanceVolumeProperties = (
|
|
63
|
+
ScalewayVolumeSnapshotToInstanceVolumeProperties()
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@dataclass(frozen=True)
|
|
68
|
+
class ScalewayVolumeSnapshotSchema(CartographyNodeSchema):
|
|
69
|
+
label: str = "ScalewayVolumeSnapshot"
|
|
70
|
+
properties: ScalewayVolumeSnapshotNodeProperties = (
|
|
71
|
+
ScalewayVolumeSnapshotNodeProperties()
|
|
72
|
+
)
|
|
73
|
+
sub_resource_relationship: ScalewayVolumeSnapshotToProjectRel = (
|
|
74
|
+
ScalewayVolumeSnapshotToProjectRel()
|
|
75
|
+
)
|
|
76
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
77
|
+
rels=[ScalewayVolumeSnapshotToInstanceVolumeRel()],
|
|
78
|
+
)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class ScalewayVolumeNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
name: PropertyRef = PropertyRef("name")
|
|
17
|
+
export_uri: PropertyRef = PropertyRef("export_uri")
|
|
18
|
+
size: PropertyRef = PropertyRef("size")
|
|
19
|
+
volume_type: PropertyRef = PropertyRef("volume_type")
|
|
20
|
+
creation_date: PropertyRef = PropertyRef("creation_date")
|
|
21
|
+
modification_date: PropertyRef = PropertyRef("modification_date")
|
|
22
|
+
tags: PropertyRef = PropertyRef("tags")
|
|
23
|
+
state: PropertyRef = PropertyRef("state")
|
|
24
|
+
zone: PropertyRef = PropertyRef("zone")
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
class ScalewayVolumeToProjectRelProperties(CartographyRelProperties):
|
|
30
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
# (:ScalewayProject)-[:RESOURCE]->(:ScalewayVolume)
|
|
35
|
+
class ScalewayVolumeToProjectRel(CartographyRelSchema):
|
|
36
|
+
target_node_label: str = "ScalewayProject"
|
|
37
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
38
|
+
{"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)},
|
|
39
|
+
)
|
|
40
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
41
|
+
rel_label: str = "RESOURCE"
|
|
42
|
+
properties: ScalewayVolumeToProjectRelProperties = (
|
|
43
|
+
ScalewayVolumeToProjectRelProperties()
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass(frozen=True)
|
|
48
|
+
class ScalewayVolumeSchema(CartographyNodeSchema):
|
|
49
|
+
label: str = "ScalewayVolume"
|
|
50
|
+
properties: ScalewayVolumeNodeProperties = ScalewayVolumeNodeProperties()
|
|
51
|
+
sub_resource_relationship: ScalewayVolumeToProjectRel = ScalewayVolumeToProjectRel()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# SentinelOne data models
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True)
|
|
9
|
+
class S1AccountNodeProperties(CartographyNodeProperties):
|
|
10
|
+
"""
|
|
11
|
+
Properties for SentinelOne Account nodes
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
# Required unique identifier
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
|
|
17
|
+
# Automatic fields (set by cartography)
|
|
18
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
19
|
+
|
|
20
|
+
# Business fields from SentinelOne API
|
|
21
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
22
|
+
account_type: PropertyRef = PropertyRef("account_type")
|
|
23
|
+
active_agents: PropertyRef = PropertyRef("active_agents")
|
|
24
|
+
created_at: PropertyRef = PropertyRef("created_at")
|
|
25
|
+
expiration: PropertyRef = PropertyRef("expiration")
|
|
26
|
+
number_of_sites: PropertyRef = PropertyRef("number_of_sites")
|
|
27
|
+
state: PropertyRef = PropertyRef("state")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(frozen=True)
|
|
31
|
+
class S1AccountSchema(CartographyNodeSchema):
|
|
32
|
+
"""
|
|
33
|
+
Schema for SentinelOne Account nodes
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
label: str = "S1Account"
|
|
37
|
+
properties: S1AccountNodeProperties = S1AccountNodeProperties()
|
|
38
|
+
|
|
39
|
+
# S1Account is a top-level tenant-like entity, so no sub_resource_relationship
|
|
40
|
+
sub_resource_relationship: None = None
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class S1AgentNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id", extra_index=True)
|
|
16
|
+
uuid: PropertyRef = PropertyRef("uuid", extra_index=True)
|
|
17
|
+
computer_name: PropertyRef = PropertyRef("computer_name", extra_index=True)
|
|
18
|
+
firewall_enabled: PropertyRef = PropertyRef("firewall_enabled")
|
|
19
|
+
os_name: PropertyRef = PropertyRef("os_name")
|
|
20
|
+
os_revision: PropertyRef = PropertyRef("os_revision")
|
|
21
|
+
domain: PropertyRef = PropertyRef("domain")
|
|
22
|
+
last_active: PropertyRef = PropertyRef("last_active")
|
|
23
|
+
last_successful_scan: PropertyRef = PropertyRef("last_successful_scan")
|
|
24
|
+
scan_status: PropertyRef = PropertyRef("scan_status")
|
|
25
|
+
serial_number: PropertyRef = PropertyRef("serial_number", extra_index=True)
|
|
26
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class S1AgentToAccountRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
# (:S1Agent)<-[:RESOURCE]-(:S1Account)
|
|
36
|
+
class S1AgentToAccount(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "S1Account"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"id": PropertyRef("S1_ACCOUNT_ID", set_in_kwargs=True)},
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: S1AgentToAccountRelProperties = S1AgentToAccountRelProperties()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass(frozen=True)
|
|
47
|
+
class S1AgentSchema(CartographyNodeSchema):
|
|
48
|
+
label: str = "S1Agent"
|
|
49
|
+
properties: S1AgentNodeProperties = S1AgentNodeProperties()
|
|
50
|
+
sub_resource_relationship: S1AgentToAccount = S1AgentToAccount()
|
cartography/sync.py
CHANGED
|
@@ -13,6 +13,7 @@ import neo4j.exceptions
|
|
|
13
13
|
from neo4j import GraphDatabase
|
|
14
14
|
from statsd import StatsClient
|
|
15
15
|
|
|
16
|
+
import cartography.intel.airbyte
|
|
16
17
|
import cartography.intel.analysis
|
|
17
18
|
import cartography.intel.anthropic
|
|
18
19
|
import cartography.intel.aws
|
|
@@ -28,13 +29,17 @@ import cartography.intel.entra
|
|
|
28
29
|
import cartography.intel.gcp
|
|
29
30
|
import cartography.intel.github
|
|
30
31
|
import cartography.intel.gsuite
|
|
32
|
+
import cartography.intel.jamf
|
|
31
33
|
import cartography.intel.kandji
|
|
32
34
|
import cartography.intel.kubernetes
|
|
33
35
|
import cartography.intel.lastpass
|
|
34
36
|
import cartography.intel.oci
|
|
35
37
|
import cartography.intel.okta
|
|
36
38
|
import cartography.intel.openai
|
|
39
|
+
import cartography.intel.pagerduty
|
|
40
|
+
import cartography.intel.scaleway
|
|
37
41
|
import cartography.intel.semgrep
|
|
42
|
+
import cartography.intel.sentinelone
|
|
38
43
|
import cartography.intel.snipeit
|
|
39
44
|
import cartography.intel.tailscale
|
|
40
45
|
import cartography.intel.trivy
|
|
@@ -49,6 +54,7 @@ logger = logging.getLogger(__name__)
|
|
|
49
54
|
TOP_LEVEL_MODULES = OrderedDict(
|
|
50
55
|
{ # preserve order so that the default sync always runs `analysis` at the very end
|
|
51
56
|
"create-indexes": cartography.intel.create_indexes.run,
|
|
57
|
+
"airbyte": cartography.intel.airbyte.start_airbyte_ingestion,
|
|
52
58
|
"anthropic": cartography.intel.anthropic.start_anthropic_ingestion,
|
|
53
59
|
"aws": cartography.intel.aws.start_aws_ingestion,
|
|
54
60
|
"azure": cartography.intel.azure.start_azure_ingestion,
|
|
@@ -68,10 +74,15 @@ TOP_LEVEL_MODULES = OrderedDict(
|
|
|
68
74
|
"lastpass": cartography.intel.lastpass.start_lastpass_ingestion,
|
|
69
75
|
"bigfix": cartography.intel.bigfix.start_bigfix_ingestion,
|
|
70
76
|
"duo": cartography.intel.duo.start_duo_ingestion,
|
|
77
|
+
"scaleway": cartography.intel.scaleway.start_scaleway_ingestion,
|
|
71
78
|
"semgrep": cartography.intel.semgrep.start_semgrep_ingestion,
|
|
72
79
|
"snipeit": cartography.intel.snipeit.start_snipeit_ingestion,
|
|
73
80
|
"tailscale": cartography.intel.tailscale.start_tailscale_ingestion,
|
|
81
|
+
"jamf": cartography.intel.jamf.start_jamf_ingestion,
|
|
82
|
+
"pagerduty": cartography.intel.pagerduty.start_pagerduty_ingestion,
|
|
74
83
|
"trivy": cartography.intel.trivy.start_trivy_ingestion,
|
|
84
|
+
"sentinelone": cartography.intel.sentinelone.start_sentinelone_ingestion,
|
|
85
|
+
# Analysis should be the last stage
|
|
75
86
|
"analysis": cartography.intel.analysis.run,
|
|
76
87
|
}
|
|
77
88
|
)
|
|
@@ -203,10 +214,6 @@ class Sync:
|
|
|
203
214
|
return available_modules
|
|
204
215
|
|
|
205
216
|
|
|
206
|
-
# Used to avoid repeatedly calling Sync.list_intel_modules()
|
|
207
|
-
TOP_LEVEL_MODULES = Sync.list_intel_modules()
|
|
208
|
-
|
|
209
|
-
|
|
210
217
|
def run_with_config(sync: Sync, config: Union[Config, argparse.Namespace]) -> int:
|
|
211
218
|
"""
|
|
212
219
|
Execute the cartography.sync.Sync.run method with parameters built from the given configuration object.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cartography
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.107.0rc1
|
|
4
4
|
Summary: Explore assets and their relationships across your technical infrastructure.
|
|
5
5
|
Maintainer: Cartography Contributors
|
|
6
6
|
License: apache2
|
|
@@ -55,6 +55,7 @@ Requires-Dist: python-dateutil
|
|
|
55
55
|
Requires-Dist: xmltodict
|
|
56
56
|
Requires-Dist: duo-client
|
|
57
57
|
Requires-Dist: cloudflare<5.0.0,>=4.1.0
|
|
58
|
+
Requires-Dist: scaleway>=2.9.0
|
|
58
59
|
Dynamic: license-file
|
|
59
60
|
|
|
60
61
|

|
|
@@ -80,28 +81,31 @@ You can learn more about the story behind Cartography in our [presentation at BS
|
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
## Supported platforms
|
|
83
|
-
- [
|
|
84
|
+
- [Airbyte](https://cartography-cncf.github.io/cartography/modules/airbyte/index.html) - Organization, Workspace, User, Source, Destination, Connection, Tag, Stream
|
|
85
|
+
- [Amazon Web Services](https://cartography-cncf.github.io/cartography/modules/aws/index.html) - ACM, API Gateway, CloudWatch, CodeBuild, Config, EC2, ECS, ECR, Elasticsearch, Elastic Kubernetes Service (EKS), DynamoDB, IAM, Inspector, KMS, Lambda, RDS, Redshift, Route53, S3, Secrets Manager(Secret Versions), Security Hub, SQS, SSM, STS, Tags
|
|
86
|
+
- [Anthropic](https://cartography-cncf.github.io/cartography/modules/anthropic/index.html) - Organization, ApiKey, User, Workspace
|
|
87
|
+
- [BigFix](https://cartography-cncf.github.io/cartography/modules/bigfix/index.html) - Computers
|
|
88
|
+
- [Cloudflare](https://cartography-cncf.github.io/cartography/modules/cloudflare/index.html) - Account, Role, Member, Zone, DNSRecord
|
|
89
|
+
- [Crowdstrike Falcon](https://cartography-cncf.github.io/cartography/modules/crowdstrike/index.html) - Hosts, Spotlight vulnerabilities, CVEs
|
|
90
|
+
- [DigitalOcean](https://cartography-cncf.github.io/cartography/modules/digitalocean/index.html)
|
|
91
|
+
- [Duo](https://cartography-cncf.github.io/cartography/modules/duo/index.html) - Users, Groups, Endpoints
|
|
92
|
+
- [GitHub](https://cartography-cncf.github.io/cartography/modules/github/index.html) - repos, branches, users, teams
|
|
84
93
|
- [Google Cloud Platform](https://cartography-cncf.github.io/cartography/modules/gcp/index.html) - Cloud Resource Manager, Compute, DNS, Storage, Google Kubernetes Engine
|
|
85
94
|
- [Google GSuite](https://cartography-cncf.github.io/cartography/modules/gsuite/index.html) - users, groups
|
|
86
|
-
- [
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
89
|
-
- [DigitalOcean](https://cartography-cncf.github.io/cartography/modules/digitalocean/index.html)
|
|
95
|
+
- [Kandji](https://cartography-cncf.github.io/cartography/modules/kandji/index.html) - Devices
|
|
96
|
+
- [Kubernetes](https://cartography-cncf.github.io/cartography/modules/kubernetes/index.html) - Cluster, Namespace, Service, Pod, Container
|
|
97
|
+
- [Lastpass](https://cartography-cncf.github.io/cartography/modules/lastpass/index.html) - users
|
|
90
98
|
- [Microsoft Azure](https://cartography-cncf.github.io/cartography/modules/azure/index.html) - CosmosDB, SQL, Storage, Virtual Machine
|
|
91
99
|
- [Microsoft Entra ID](https://cartography-cncf.github.io/cartography/modules/entra/index.html) - Users
|
|
92
|
-
- [Kubernetes](https://cartography-cncf.github.io/cartography/modules/kubernetes/index.html) - Cluster, Namespace, Service, Pod, Container
|
|
93
|
-
- [PagerDuty](https://cartography-cncf.github.io/cartography/modules/pagerduty/index.html) - Users, teams, services, schedules, escalation policies, integrations, vendors
|
|
94
|
-
- [Crowdstrike Falcon](https://cartography-cncf.github.io/cartography/modules/crowdstrike/index.html) - Hosts, Spotlight vulnerabilities, CVEs
|
|
95
100
|
- [NIST CVE](https://cartography-cncf.github.io/cartography/modules/cve/index.html) - Common Vulnerabilities and Exposures (CVE) data from NIST database
|
|
96
|
-
- [
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
99
|
-
- [
|
|
101
|
+
- [Okta](https://cartography-cncf.github.io/cartography/modules/okta/index.html) - users, groups, organizations, roles, applications, factors, trusted origins, reply URIs
|
|
102
|
+
- [OpenAI](https://cartography-cncf.github.io/cartography/modules/openai/index.html) - Organization, AdminApiKey, User, Project, ServiceAccount, ApiKey
|
|
103
|
+
- [Oracle Cloud Infrastructure](https://cartography-cncf.github.io/cartography/modules/oci/index.html) - IAM
|
|
104
|
+
- [PagerDuty](https://cartography-cncf.github.io/cartography/modules/pagerduty/index.html) - Users, teams, services, schedules, escalation policies, integrations, vendors
|
|
105
|
+
- [Scaleway](https://cartography-cncf.github.io/cartography/modules/scaleway/index.html) - Projects, IAM, Local Storage, Instances
|
|
106
|
+
- [SentinelOne](https://cartography-cncf.github.io/cartography/modules/sentinelone/index.html) - Accounts, Agents
|
|
100
107
|
- [SnipeIT](https://cartography-cncf.github.io/cartography/modules/snipeit/index.html) - Users, Assets
|
|
101
108
|
- [Tailscale](https://cartography-cncf.github.io/cartography/modules/tailscale/index.html) - Tailnet, Users, Devices, Groups, Tags, PostureIntegrations
|
|
102
|
-
- [Cloudflare](https://cartography-cncf.github.io/cartography/modules/cloudflare/index.html) - Account, Role, Member, Zone, DNSRecord
|
|
103
|
-
- [OpenAI](https://cartography-cncf.github.io/cartography/modules/openai/index.html) - Organization, AdminApiKey, User, Project, ServiceAccount, ApiKey
|
|
104
|
-
- [Anthropic](https://cartography-cncf.github.io/cartography/modules/anthropic/index.html) - Organization, ApiKey, User, Workspace
|
|
105
109
|
- [Trivy Scanner](https://cartography-cncf.github.io/cartography/modules/trivy/index.html) - AWS ECR Images
|
|
106
110
|
|
|
107
111
|
|