cartography 0.107.0rc2__py3-none-any.whl → 0.108.0__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.

Files changed (58) hide show
  1. cartography/_version.py +2 -2
  2. cartography/cli.py +10 -0
  3. cartography/config.py +5 -0
  4. cartography/data/indexes.cypher +0 -10
  5. cartography/data/jobs/cleanup/github_repos_cleanup.json +2 -0
  6. cartography/intel/aws/__init__.py +1 -0
  7. cartography/intel/aws/cloudtrail.py +17 -4
  8. cartography/intel/aws/cloudtrail_management_events.py +560 -16
  9. cartography/intel/aws/cloudwatch.py +150 -4
  10. cartography/intel/aws/ec2/security_groups.py +140 -122
  11. cartography/intel/aws/ec2/snapshots.py +47 -84
  12. cartography/intel/aws/ec2/subnets.py +37 -63
  13. cartography/intel/aws/ecr.py +55 -80
  14. cartography/intel/aws/ecs.py +17 -0
  15. cartography/intel/aws/elasticache.py +102 -79
  16. cartography/intel/aws/guardduty.py +275 -0
  17. cartography/intel/aws/resources.py +2 -0
  18. cartography/intel/aws/secretsmanager.py +62 -44
  19. cartography/intel/github/repos.py +370 -28
  20. cartography/intel/sentinelone/__init__.py +8 -2
  21. cartography/intel/sentinelone/application.py +248 -0
  22. cartography/intel/sentinelone/utils.py +20 -1
  23. cartography/models/aws/cloudtrail/management_events.py +95 -6
  24. cartography/models/aws/cloudtrail/trail.py +21 -0
  25. cartography/models/aws/cloudwatch/log_metric_filter.py +79 -0
  26. cartography/models/aws/cloudwatch/metric_alarm.py +53 -0
  27. cartography/models/aws/ec2/networkinterfaces.py +2 -0
  28. cartography/models/aws/ec2/security_group_rules.py +109 -0
  29. cartography/models/aws/ec2/security_groups.py +90 -0
  30. cartography/models/aws/ec2/snapshots.py +58 -0
  31. cartography/models/aws/ec2/subnet_instance.py +2 -0
  32. cartography/models/aws/ec2/subnet_networkinterface.py +2 -0
  33. cartography/models/aws/ec2/subnets.py +65 -0
  34. cartography/models/aws/ec2/volumes.py +20 -0
  35. cartography/models/aws/ecr/__init__.py +0 -0
  36. cartography/models/aws/ecr/image.py +41 -0
  37. cartography/models/aws/ecr/repository.py +72 -0
  38. cartography/models/aws/ecr/repository_image.py +95 -0
  39. cartography/models/aws/ecs/tasks.py +24 -1
  40. cartography/models/aws/elasticache/__init__.py +0 -0
  41. cartography/models/aws/elasticache/cluster.py +65 -0
  42. cartography/models/aws/elasticache/topic.py +67 -0
  43. cartography/models/aws/guardduty/__init__.py +1 -0
  44. cartography/models/aws/guardduty/findings.py +102 -0
  45. cartography/models/aws/secretsmanager/secret.py +106 -0
  46. cartography/models/github/dependencies.py +74 -0
  47. cartography/models/github/manifests.py +49 -0
  48. cartography/models/sentinelone/application.py +44 -0
  49. cartography/models/sentinelone/application_version.py +96 -0
  50. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/METADATA +3 -3
  51. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/RECORD +55 -36
  52. cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json +0 -24
  53. cartography/data/jobs/cleanup/aws_import_secrets_cleanup.json +0 -8
  54. cartography/data/jobs/cleanup/aws_import_snapshots_cleanup.json +0 -30
  55. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/WHEEL +0 -0
  56. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/entry_points.txt +0 -0
  57. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/licenses/LICENSE +0 -0
  58. {cartography-0.107.0rc2.dist-info → cartography-0.108.0.dist-info}/top_level.txt +0 -0
@@ -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,106 @@
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 SecretsManagerSecretNodeProperties(CartographyNodeProperties):
16
+ """
17
+ Properties for AWS Secrets Manager Secret
18
+ """
19
+
20
+ id: PropertyRef = PropertyRef("ARN")
21
+ arn: PropertyRef = PropertyRef("ARN", extra_index=True)
22
+ name: PropertyRef = PropertyRef("Name", extra_index=True)
23
+ description: PropertyRef = PropertyRef("Description")
24
+
25
+ # Rotation properties
26
+ rotation_enabled: PropertyRef = PropertyRef("RotationEnabled")
27
+ rotation_lambda_arn: PropertyRef = PropertyRef("RotationLambdaARN")
28
+ rotation_rules_automatically_after_days: PropertyRef = PropertyRef(
29
+ "RotationRulesAutomaticallyAfterDays"
30
+ )
31
+
32
+ # Date properties (will be converted to epoch timestamps)
33
+ created_date: PropertyRef = PropertyRef("CreatedDate")
34
+ last_rotated_date: PropertyRef = PropertyRef("LastRotatedDate")
35
+ last_changed_date: PropertyRef = PropertyRef("LastChangedDate")
36
+ last_accessed_date: PropertyRef = PropertyRef("LastAccessedDate")
37
+ deleted_date: PropertyRef = PropertyRef("DeletedDate")
38
+
39
+ # Other properties
40
+ kms_key_id: PropertyRef = PropertyRef("KmsKeyId")
41
+ owning_service: PropertyRef = PropertyRef("OwningService")
42
+ primary_region: PropertyRef = PropertyRef("PrimaryRegion")
43
+
44
+ # Standard cartography properties
45
+ region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
46
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
47
+
48
+
49
+ @dataclass(frozen=True)
50
+ class SecretsManagerSecretRelProperties(CartographyRelProperties):
51
+ """
52
+ Properties for relationships between Secret and other nodes
53
+ """
54
+
55
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
56
+
57
+
58
+ @dataclass(frozen=True)
59
+ class SecretsManagerSecretToAWSAccountRel(CartographyRelSchema):
60
+ """
61
+ Relationship between Secret and AWS Account
62
+ """
63
+
64
+ target_node_label: str = "AWSAccount"
65
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
66
+ {"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
67
+ )
68
+ direction: LinkDirection = LinkDirection.INWARD
69
+ rel_label: str = "RESOURCE"
70
+ properties: SecretsManagerSecretRelProperties = SecretsManagerSecretRelProperties()
71
+
72
+
73
+ @dataclass(frozen=True)
74
+ class SecretsManagerSecretToKMSKeyRel(CartographyRelSchema):
75
+ """
76
+ Relationship between Secret and its KMS key
77
+ Only created when KmsKeyId is present
78
+ """
79
+
80
+ target_node_label: str = "AWSKMSKey"
81
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
82
+ {"id": PropertyRef("KmsKeyId")},
83
+ )
84
+ direction: LinkDirection = LinkDirection.OUTWARD
85
+ rel_label: str = "ENCRYPTED_BY"
86
+ properties: SecretsManagerSecretRelProperties = SecretsManagerSecretRelProperties()
87
+
88
+
89
+ @dataclass(frozen=True)
90
+ class SecretsManagerSecretSchema(CartographyNodeSchema):
91
+ """
92
+ Schema for AWS Secrets Manager Secret
93
+ """
94
+
95
+ label: str = "SecretsManagerSecret"
96
+ properties: SecretsManagerSecretNodeProperties = (
97
+ SecretsManagerSecretNodeProperties()
98
+ )
99
+ sub_resource_relationship: SecretsManagerSecretToAWSAccountRel = (
100
+ SecretsManagerSecretToAWSAccountRel()
101
+ )
102
+ other_relationships: OtherRelationships = OtherRelationships(
103
+ [
104
+ SecretsManagerSecretToKMSKeyRel(),
105
+ ],
106
+ )
@@ -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.107.0rc2
3
+ Version: 0.108.0
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