cartography 0.107.0rc2__py3-none-any.whl → 0.108.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 +10 -0
- cartography/config.py +5 -0
- cartography/data/indexes.cypher +0 -8
- cartography/data/jobs/cleanup/github_repos_cleanup.json +2 -0
- cartography/intel/aws/__init__.py +1 -0
- cartography/intel/aws/cloudwatch.py +77 -0
- cartography/intel/aws/ec2/security_groups.py +140 -122
- cartography/intel/aws/ec2/snapshots.py +47 -84
- cartography/intel/aws/ec2/subnets.py +1 -1
- cartography/intel/aws/ecs.py +17 -0
- cartography/intel/aws/guardduty.py +275 -0
- cartography/intel/aws/resources.py +2 -0
- cartography/intel/github/repos.py +370 -28
- cartography/intel/sentinelone/__init__.py +8 -2
- cartography/intel/sentinelone/application.py +248 -0
- cartography/intel/sentinelone/utils.py +20 -1
- cartography/models/aws/cloudwatch/log_metric_filter.py +79 -0
- cartography/models/aws/ec2/networkinterfaces.py +2 -0
- cartography/models/aws/ec2/security_group_rules.py +109 -0
- cartography/models/aws/ec2/security_groups.py +90 -0
- cartography/models/aws/ec2/snapshots.py +58 -0
- cartography/models/aws/ec2/subnet_instance.py +2 -0
- cartography/models/aws/ec2/subnet_networkinterface.py +2 -0
- cartography/models/aws/ec2/volumes.py +20 -0
- cartography/models/aws/ecs/tasks.py +24 -1
- cartography/models/aws/guardduty/__init__.py +1 -0
- cartography/models/aws/guardduty/findings.py +102 -0
- cartography/models/github/dependencies.py +74 -0
- cartography/models/github/manifests.py +49 -0
- cartography/models/sentinelone/application.py +44 -0
- cartography/models/sentinelone/application_version.py +96 -0
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/METADATA +3 -3
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/RECORD +38 -28
- cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json +0 -24
- cartography/data/jobs/cleanup/aws_import_snapshots_cleanup.json +0 -30
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/WHEEL +0 -0
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/entry_points.txt +0 -0
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.107.0rc2.dist-info → cartography-0.108.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -46,6 +46,7 @@ class ECSTaskNodeProperties(CartographyNodeProperties):
|
|
|
46
46
|
ephemeral_storage_size_in_gib: PropertyRef = PropertyRef(
|
|
47
47
|
"ephemeralStorage.sizeInGiB"
|
|
48
48
|
)
|
|
49
|
+
network_interface_id: PropertyRef = PropertyRef("networkInterfaceId")
|
|
49
50
|
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
50
51
|
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
51
52
|
|
|
@@ -100,11 +101,33 @@ class ECSTaskToAWSAccountRel(CartographyRelSchema):
|
|
|
100
101
|
properties: ECSTaskToAWSAccountRelProperties = ECSTaskToAWSAccountRelProperties()
|
|
101
102
|
|
|
102
103
|
|
|
104
|
+
@dataclass(frozen=True)
|
|
105
|
+
class ECSTaskToNetworkInterfaceRelProperties(CartographyRelProperties):
|
|
106
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@dataclass(frozen=True)
|
|
110
|
+
class ECSTaskToNetworkInterfaceRel(CartographyRelSchema):
|
|
111
|
+
target_node_label: str = "NetworkInterface"
|
|
112
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
113
|
+
{"id": PropertyRef("networkInterfaceId")}
|
|
114
|
+
)
|
|
115
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
116
|
+
rel_label: str = "NETWORK_INTERFACE"
|
|
117
|
+
properties: ECSTaskToNetworkInterfaceRelProperties = (
|
|
118
|
+
ECSTaskToNetworkInterfaceRelProperties()
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
103
122
|
@dataclass(frozen=True)
|
|
104
123
|
class ECSTaskSchema(CartographyNodeSchema):
|
|
105
124
|
label: str = "ECSTask"
|
|
106
125
|
properties: ECSTaskNodeProperties = ECSTaskNodeProperties()
|
|
107
126
|
sub_resource_relationship: ECSTaskToAWSAccountRel = ECSTaskToAWSAccountRel()
|
|
108
127
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
109
|
-
[
|
|
128
|
+
[
|
|
129
|
+
ECSTaskToContainerInstanceRel(),
|
|
130
|
+
ECSTaskToECSClusterRel(),
|
|
131
|
+
ECSTaskToNetworkInterfaceRel(),
|
|
132
|
+
]
|
|
110
133
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# GuardDuty models
|
|
@@ -0,0 +1,102 @@
|
|
|
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.nodes import ExtraNodeLabels
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
8
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
9
|
+
from cartography.models.core.relationships import LinkDirection
|
|
10
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
11
|
+
from cartography.models.core.relationships import OtherRelationships
|
|
12
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass(frozen=True)
|
|
16
|
+
class GuardDutyFindingNodeProperties(CartographyNodeProperties):
|
|
17
|
+
id: PropertyRef = PropertyRef("id")
|
|
18
|
+
arn: PropertyRef = PropertyRef("arn", extra_index=True)
|
|
19
|
+
title: PropertyRef = PropertyRef("title")
|
|
20
|
+
description: PropertyRef = PropertyRef("description")
|
|
21
|
+
type: PropertyRef = PropertyRef("type")
|
|
22
|
+
severity: PropertyRef = PropertyRef("severity")
|
|
23
|
+
confidence: PropertyRef = PropertyRef("confidence")
|
|
24
|
+
eventfirstseen: PropertyRef = PropertyRef("eventfirstseen")
|
|
25
|
+
eventlastseen: PropertyRef = PropertyRef("eventlastseen")
|
|
26
|
+
accountid: PropertyRef = PropertyRef("accountid")
|
|
27
|
+
region: PropertyRef = PropertyRef("region")
|
|
28
|
+
detectorid: PropertyRef = PropertyRef("detectorid")
|
|
29
|
+
resource_type: PropertyRef = PropertyRef("resource_type")
|
|
30
|
+
resource_id: PropertyRef = PropertyRef("resource_id")
|
|
31
|
+
archived: PropertyRef = PropertyRef("archived")
|
|
32
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True)
|
|
36
|
+
class GuardDutyFindingToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
37
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(frozen=True)
|
|
41
|
+
class GuardDutyFindingToAWSAccountRel(CartographyRelSchema):
|
|
42
|
+
target_node_label: str = "AWSAccount"
|
|
43
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
44
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
45
|
+
)
|
|
46
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
47
|
+
rel_label: str = "RESOURCE"
|
|
48
|
+
properties: GuardDutyFindingToAWSAccountRelRelProperties = (
|
|
49
|
+
GuardDutyFindingToAWSAccountRelRelProperties()
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@dataclass(frozen=True)
|
|
54
|
+
class GuardDutyFindingToEC2InstanceRelRelProperties(CartographyRelProperties):
|
|
55
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@dataclass(frozen=True)
|
|
59
|
+
class GuardDutyFindingToEC2InstanceRel(CartographyRelSchema):
|
|
60
|
+
target_node_label: str = "EC2Instance"
|
|
61
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
62
|
+
{"id": PropertyRef("resource_id")},
|
|
63
|
+
)
|
|
64
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
65
|
+
rel_label: str = "AFFECTS"
|
|
66
|
+
properties: GuardDutyFindingToEC2InstanceRelRelProperties = (
|
|
67
|
+
GuardDutyFindingToEC2InstanceRelRelProperties()
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass(frozen=True)
|
|
72
|
+
class GuardDutyFindingToS3BucketRelRelProperties(CartographyRelProperties):
|
|
73
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@dataclass(frozen=True)
|
|
77
|
+
class GuardDutyFindingToS3BucketRel(CartographyRelSchema):
|
|
78
|
+
target_node_label: str = "S3Bucket"
|
|
79
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
80
|
+
{"id": PropertyRef("resource_id")},
|
|
81
|
+
)
|
|
82
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
83
|
+
rel_label: str = "AFFECTS"
|
|
84
|
+
properties: GuardDutyFindingToS3BucketRelRelProperties = (
|
|
85
|
+
GuardDutyFindingToS3BucketRelRelProperties()
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@dataclass(frozen=True)
|
|
90
|
+
class GuardDutyFindingSchema(CartographyNodeSchema):
|
|
91
|
+
label: str = "GuardDutyFinding"
|
|
92
|
+
properties: GuardDutyFindingNodeProperties = GuardDutyFindingNodeProperties()
|
|
93
|
+
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["Risk"])
|
|
94
|
+
sub_resource_relationship: GuardDutyFindingToAWSAccountRel = (
|
|
95
|
+
GuardDutyFindingToAWSAccountRel()
|
|
96
|
+
)
|
|
97
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
98
|
+
[
|
|
99
|
+
GuardDutyFindingToEC2InstanceRel(),
|
|
100
|
+
GuardDutyFindingToS3BucketRel(),
|
|
101
|
+
],
|
|
102
|
+
)
|
|
@@ -0,0 +1,74 @@
|
|
|
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 GitHubDependencyNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name")
|
|
18
|
+
original_name: PropertyRef = PropertyRef("original_name")
|
|
19
|
+
version: PropertyRef = PropertyRef("version")
|
|
20
|
+
ecosystem: PropertyRef = PropertyRef("ecosystem")
|
|
21
|
+
package_manager: PropertyRef = PropertyRef("package_manager")
|
|
22
|
+
repo_name: PropertyRef = PropertyRef("repo_name")
|
|
23
|
+
manifest_file: PropertyRef = PropertyRef("manifest_file")
|
|
24
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class GitHubDependencyToRepositoryRelProperties(CartographyRelProperties):
|
|
29
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
30
|
+
requirements: PropertyRef = PropertyRef("requirements")
|
|
31
|
+
manifest_path: PropertyRef = PropertyRef("manifest_path")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
class GitHubDependencyToRepositoryRel(CartographyRelSchema):
|
|
36
|
+
target_node_label: str = "GitHubRepository"
|
|
37
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
38
|
+
{"id": PropertyRef("repo_url", set_in_kwargs=True)}
|
|
39
|
+
)
|
|
40
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
41
|
+
rel_label: str = "REQUIRES"
|
|
42
|
+
properties: GitHubDependencyToRepositoryRelProperties = (
|
|
43
|
+
GitHubDependencyToRepositoryRelProperties()
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass(frozen=True)
|
|
48
|
+
class DependencyGraphManifestToDependencyRelProperties(CartographyRelProperties):
|
|
49
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@dataclass(frozen=True)
|
|
53
|
+
class DependencyGraphManifestToDependencyRel(CartographyRelSchema):
|
|
54
|
+
target_node_label: str = "DependencyGraphManifest"
|
|
55
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
56
|
+
{"id": PropertyRef("manifest_id", set_in_kwargs=True)}
|
|
57
|
+
)
|
|
58
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
59
|
+
rel_label: str = "HAS_DEP"
|
|
60
|
+
properties: DependencyGraphManifestToDependencyRelProperties = (
|
|
61
|
+
DependencyGraphManifestToDependencyRelProperties()
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@dataclass(frozen=True)
|
|
66
|
+
class GitHubDependencySchema(CartographyNodeSchema):
|
|
67
|
+
label: str = "Dependency"
|
|
68
|
+
properties: GitHubDependencyNodeProperties = GitHubDependencyNodeProperties()
|
|
69
|
+
sub_resource_relationship: GitHubDependencyToRepositoryRel = (
|
|
70
|
+
GitHubDependencyToRepositoryRel()
|
|
71
|
+
)
|
|
72
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
73
|
+
[DependencyGraphManifestToDependencyRel()]
|
|
74
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
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 DependencyGraphManifestNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
blob_path: PropertyRef = PropertyRef("blob_path")
|
|
17
|
+
filename: PropertyRef = PropertyRef("filename")
|
|
18
|
+
dependencies_count: PropertyRef = PropertyRef("dependencies_count")
|
|
19
|
+
repo_url: PropertyRef = PropertyRef("repo_url")
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class DependencyGraphManifestToRepositoryRelProperties(CartographyRelProperties):
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
class DependencyGraphManifestToRepositoryRel(CartographyRelSchema):
|
|
30
|
+
target_node_label: str = "GitHubRepository"
|
|
31
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
32
|
+
{"id": PropertyRef("repo_url", set_in_kwargs=True)}
|
|
33
|
+
)
|
|
34
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
35
|
+
rel_label: str = "HAS_MANIFEST"
|
|
36
|
+
properties: DependencyGraphManifestToRepositoryRelProperties = (
|
|
37
|
+
DependencyGraphManifestToRepositoryRelProperties()
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@dataclass(frozen=True)
|
|
42
|
+
class DependencyGraphManifestSchema(CartographyNodeSchema):
|
|
43
|
+
label: str = "DependencyGraphManifest"
|
|
44
|
+
properties: DependencyGraphManifestNodeProperties = (
|
|
45
|
+
DependencyGraphManifestNodeProperties()
|
|
46
|
+
)
|
|
47
|
+
sub_resource_relationship: DependencyGraphManifestToRepositoryRel = (
|
|
48
|
+
DependencyGraphManifestToRepositoryRel()
|
|
49
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
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 S1ApplicationNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
name: PropertyRef = PropertyRef("name")
|
|
17
|
+
vendor: PropertyRef = PropertyRef("vendor")
|
|
18
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class S1ApplicationToAccountRelProperties(CartographyRelProperties):
|
|
23
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
# (:S1Application)<-[:RESOURCE]-(:S1Account)
|
|
28
|
+
class S1ApplicationToAccount(CartographyRelSchema):
|
|
29
|
+
target_node_label: str = "S1Account"
|
|
30
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
31
|
+
{"id": PropertyRef("S1_ACCOUNT_ID", set_in_kwargs=True)},
|
|
32
|
+
)
|
|
33
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
34
|
+
rel_label: str = "RESOURCE"
|
|
35
|
+
properties: S1ApplicationToAccountRelProperties = (
|
|
36
|
+
S1ApplicationToAccountRelProperties()
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(frozen=True)
|
|
41
|
+
class S1ApplicationSchema(CartographyNodeSchema):
|
|
42
|
+
label: str = "S1Application"
|
|
43
|
+
properties: S1ApplicationNodeProperties = S1ApplicationNodeProperties()
|
|
44
|
+
sub_resource_relationship: S1ApplicationToAccount = S1ApplicationToAccount()
|
|
@@ -0,0 +1,96 @@
|
|
|
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 S1ApplicationVersionNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id", extra_index=True)
|
|
17
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
18
|
+
application_name: PropertyRef = PropertyRef("application_name")
|
|
19
|
+
application_vendor: PropertyRef = PropertyRef("application_vendor")
|
|
20
|
+
version: PropertyRef = PropertyRef("version")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class S1ApplicationVersionToAccountRelProperties(CartographyRelProperties):
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
# (:S1ApplicationVersion)<-[:RESOURCE]-(:S1Account)
|
|
30
|
+
class S1ApplicationVersionToAccount(CartographyRelSchema):
|
|
31
|
+
target_node_label: str = "S1Account"
|
|
32
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
33
|
+
{"id": PropertyRef("S1_ACCOUNT_ID", set_in_kwargs=True)},
|
|
34
|
+
)
|
|
35
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
36
|
+
rel_label: str = "RESOURCE"
|
|
37
|
+
properties: S1ApplicationVersionToAccountRelProperties = (
|
|
38
|
+
S1ApplicationVersionToAccountRelProperties()
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclass(frozen=True)
|
|
43
|
+
class S1AgentToApplicationVersionRelProperties(CartographyRelProperties):
|
|
44
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
45
|
+
installeddatetime: PropertyRef = PropertyRef("installed_dt")
|
|
46
|
+
installationpath: PropertyRef = PropertyRef("installation_path")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass(frozen=True)
|
|
50
|
+
# (:S1Agent)-[:HAS_INSTALLED]->(:S1ApplicationVersion)
|
|
51
|
+
class S1AgentToS1ApplicationVersion(CartographyRelSchema):
|
|
52
|
+
target_node_label: str = "S1Agent"
|
|
53
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
54
|
+
{"uuid": PropertyRef("agent_uuid")},
|
|
55
|
+
)
|
|
56
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
57
|
+
rel_label: str = "HAS_INSTALLED"
|
|
58
|
+
properties: S1AgentToApplicationVersionRelProperties = (
|
|
59
|
+
S1AgentToApplicationVersionRelProperties()
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass(frozen=True)
|
|
64
|
+
class S1ApplicationVersionToApplicationRelProperties(CartographyRelProperties):
|
|
65
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass(frozen=True)
|
|
69
|
+
# (:S1ApplicationVersion)<-[:VERSION]-(:S1Application)
|
|
70
|
+
class S1ApplicationVersionToApplication(CartographyRelSchema):
|
|
71
|
+
target_node_label: str = "S1Application"
|
|
72
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
73
|
+
{"id": PropertyRef("application_id")},
|
|
74
|
+
)
|
|
75
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
76
|
+
rel_label: str = "VERSION"
|
|
77
|
+
properties: S1ApplicationVersionToApplicationRelProperties = (
|
|
78
|
+
S1ApplicationVersionToApplicationRelProperties()
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@dataclass(frozen=True)
|
|
83
|
+
class S1ApplicationVersionSchema(CartographyNodeSchema):
|
|
84
|
+
label: str = "S1ApplicationVersion"
|
|
85
|
+
properties: S1ApplicationVersionNodeProperties = (
|
|
86
|
+
S1ApplicationVersionNodeProperties()
|
|
87
|
+
)
|
|
88
|
+
sub_resource_relationship: S1ApplicationVersionToAccount = (
|
|
89
|
+
S1ApplicationVersionToAccount()
|
|
90
|
+
)
|
|
91
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
92
|
+
[
|
|
93
|
+
S1AgentToS1ApplicationVersion(),
|
|
94
|
+
S1ApplicationVersionToApplication(),
|
|
95
|
+
],
|
|
96
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cartography
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.108.0rc1
|
|
4
4
|
Summary: Explore assets and their relationships across your technical infrastructure.
|
|
5
5
|
Maintainer: Cartography Contributors
|
|
6
6
|
License: apache2
|
|
@@ -82,14 +82,14 @@ You can learn more about the story behind Cartography in our [presentation at BS
|
|
|
82
82
|
|
|
83
83
|
## Supported platforms
|
|
84
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
|
|
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, GuardDuty, IAM, Inspector, KMS, Lambda, RDS, Redshift, Route53, S3, Secrets Manager(Secret Versions), Security Hub, SQS, SSM, STS, Tags
|
|
86
86
|
- [Anthropic](https://cartography-cncf.github.io/cartography/modules/anthropic/index.html) - Organization, ApiKey, User, Workspace
|
|
87
87
|
- [BigFix](https://cartography-cncf.github.io/cartography/modules/bigfix/index.html) - Computers
|
|
88
88
|
- [Cloudflare](https://cartography-cncf.github.io/cartography/modules/cloudflare/index.html) - Account, Role, Member, Zone, DNSRecord
|
|
89
89
|
- [Crowdstrike Falcon](https://cartography-cncf.github.io/cartography/modules/crowdstrike/index.html) - Hosts, Spotlight vulnerabilities, CVEs
|
|
90
90
|
- [DigitalOcean](https://cartography-cncf.github.io/cartography/modules/digitalocean/index.html)
|
|
91
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
|
|
92
|
+
- [GitHub](https://cartography-cncf.github.io/cartography/modules/github/index.html) - repos, branches, users, teams, dependency graph manifests, dependencies
|
|
93
93
|
- [Google Cloud Platform](https://cartography-cncf.github.io/cartography/modules/gcp/index.html) - Cloud Resource Manager, Compute, DNS, Storage, Google Kubernetes Engine
|
|
94
94
|
- [Google GSuite](https://cartography-cncf.github.io/cartography/modules/gsuite/index.html) - users, groups
|
|
95
95
|
- [Kandji](https://cartography-cncf.github.io/cartography/modules/kandji/index.html) - Devices
|