cartography 0.112.0__py3-none-any.whl → 0.114.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 (82) hide show
  1. cartography/_version.py +2 -2
  2. cartography/cli.py +8 -0
  3. cartography/config.py +4 -0
  4. cartography/data/indexes.cypher +0 -31
  5. cartography/intel/aws/apigatewayv2.py +116 -0
  6. cartography/intel/aws/iam.py +741 -492
  7. cartography/intel/aws/organizations.py +7 -8
  8. cartography/intel/aws/permission_relationships.py +4 -16
  9. cartography/intel/aws/resources.py +2 -0
  10. cartography/intel/azure/__init__.py +16 -0
  11. cartography/intel/azure/app_service.py +105 -0
  12. cartography/intel/azure/functions.py +124 -0
  13. cartography/intel/entra/__init__.py +31 -0
  14. cartography/intel/entra/app_role_assignments.py +277 -0
  15. cartography/intel/entra/applications.py +4 -238
  16. cartography/intel/entra/federation/__init__.py +0 -0
  17. cartography/intel/entra/federation/aws_identity_center.py +77 -0
  18. cartography/intel/entra/service_principals.py +217 -0
  19. cartography/intel/gcp/__init__.py +136 -436
  20. cartography/intel/gcp/clients.py +65 -0
  21. cartography/intel/gcp/compute.py +18 -44
  22. cartography/intel/gcp/crm/__init__.py +0 -0
  23. cartography/intel/gcp/crm/folders.py +108 -0
  24. cartography/intel/gcp/crm/orgs.py +65 -0
  25. cartography/intel/gcp/crm/projects.py +109 -0
  26. cartography/intel/gcp/dns.py +82 -169
  27. cartography/intel/gcp/gke.py +72 -113
  28. cartography/intel/gcp/iam.py +66 -54
  29. cartography/intel/gcp/storage.py +75 -159
  30. cartography/intel/github/__init__.py +41 -0
  31. cartography/intel/github/commits.py +423 -0
  32. cartography/intel/github/repos.py +73 -39
  33. cartography/models/aws/apigatewayv2/__init__.py +0 -0
  34. cartography/models/aws/apigatewayv2/apigatewayv2.py +53 -0
  35. cartography/models/aws/iam/access_key.py +103 -0
  36. cartography/models/aws/iam/account_role.py +24 -0
  37. cartography/models/aws/iam/federated_principal.py +60 -0
  38. cartography/models/aws/iam/group.py +60 -0
  39. cartography/models/aws/iam/group_membership.py +26 -0
  40. cartography/models/aws/iam/inline_policy.py +78 -0
  41. cartography/models/aws/iam/managed_policy.py +51 -0
  42. cartography/models/aws/iam/policy_statement.py +57 -0
  43. cartography/models/aws/iam/role.py +83 -0
  44. cartography/models/aws/iam/root_principal.py +52 -0
  45. cartography/models/aws/iam/service_principal.py +30 -0
  46. cartography/models/aws/iam/sts_assumerole_allow.py +38 -0
  47. cartography/models/aws/iam/user.py +54 -0
  48. cartography/models/azure/__init__.py +0 -0
  49. cartography/models/azure/app_service.py +59 -0
  50. cartography/models/azure/function_app.py +59 -0
  51. cartography/models/entra/entra_user_to_aws_sso.py +41 -0
  52. cartography/models/entra/service_principal.py +104 -0
  53. cartography/models/gcp/compute/subnet.py +74 -0
  54. cartography/models/gcp/crm/__init__.py +0 -0
  55. cartography/models/gcp/crm/folders.py +98 -0
  56. cartography/models/gcp/crm/organizations.py +21 -0
  57. cartography/models/gcp/crm/projects.py +100 -0
  58. cartography/models/gcp/dns.py +109 -0
  59. cartography/models/gcp/gke.py +69 -0
  60. cartography/models/gcp/iam.py +3 -0
  61. cartography/models/gcp/storage/__init__.py +0 -0
  62. cartography/models/gcp/storage/bucket.py +119 -0
  63. cartography/models/github/commits.py +63 -0
  64. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/METADATA +7 -5
  65. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/RECORD +69 -39
  66. cartography/data/jobs/cleanup/aws_import_account_access_key_cleanup.json +0 -17
  67. cartography/data/jobs/cleanup/aws_import_groups_cleanup.json +0 -13
  68. cartography/data/jobs/cleanup/aws_import_principals_cleanup.json +0 -30
  69. cartography/data/jobs/cleanup/aws_import_roles_cleanup.json +0 -13
  70. cartography/data/jobs/cleanup/aws_import_users_cleanup.json +0 -8
  71. cartography/data/jobs/cleanup/gcp_compute_vpc_subnet_cleanup.json +0 -35
  72. cartography/data/jobs/cleanup/gcp_crm_folder_cleanup.json +0 -23
  73. cartography/data/jobs/cleanup/gcp_crm_organization_cleanup.json +0 -17
  74. cartography/data/jobs/cleanup/gcp_crm_project_cleanup.json +0 -23
  75. cartography/data/jobs/cleanup/gcp_dns_cleanup.json +0 -29
  76. cartography/data/jobs/cleanup/gcp_gke_cluster_cleanup.json +0 -17
  77. cartography/data/jobs/cleanup/gcp_storage_bucket_cleanup.json +0 -29
  78. cartography/intel/gcp/crm.py +0 -355
  79. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/WHEEL +0 -0
  80. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/entry_points.txt +0 -0
  81. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/licenses/LICENSE +0 -0
  82. {cartography-0.112.0.dist-info → cartography-0.114.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,109 @@
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 GCPDNSZoneNodeProperties(CartographyNodeProperties):
17
+ id: PropertyRef = PropertyRef("id", extra_index=True)
18
+ name: PropertyRef = PropertyRef("name", extra_index=True)
19
+ dns_name: PropertyRef = PropertyRef("dns_name")
20
+ description: PropertyRef = PropertyRef("description")
21
+ visibility: PropertyRef = PropertyRef("visibility")
22
+ kind: PropertyRef = PropertyRef("kind")
23
+ nameservers: PropertyRef = PropertyRef("nameservers")
24
+ created_at: PropertyRef = PropertyRef("created_at")
25
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class GCPDNSZoneToProjectRelProperties(CartographyRelProperties):
30
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ # (:GCPProject)-[:RESOURCE]->(:GCPDNSZone)
35
+ class GCPDNSZoneToProjectRel(CartographyRelSchema):
36
+ target_node_label: str = "GCPProject"
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: GCPDNSZoneToProjectRelProperties = GCPDNSZoneToProjectRelProperties()
43
+
44
+
45
+ @dataclass(frozen=True)
46
+ class GCPDNSZoneSchema(CartographyNodeSchema):
47
+ label: str = "GCPDNSZone"
48
+ properties: GCPDNSZoneNodeProperties = GCPDNSZoneNodeProperties()
49
+ extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["DNSZone"])
50
+ sub_resource_relationship: GCPDNSZoneToProjectRel = GCPDNSZoneToProjectRel()
51
+
52
+
53
+ @dataclass(frozen=True)
54
+ class GCPRecordSetNodeProperties(CartographyNodeProperties):
55
+ id: PropertyRef = PropertyRef("id", extra_index=True)
56
+ name: PropertyRef = PropertyRef("name", extra_index=True)
57
+ type: PropertyRef = PropertyRef("type")
58
+ ttl: PropertyRef = PropertyRef("ttl")
59
+ data: PropertyRef = PropertyRef("data")
60
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
61
+
62
+
63
+ @dataclass(frozen=True)
64
+ class GCPRecordSetToProjectRelProperties(CartographyRelProperties):
65
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
66
+
67
+
68
+ @dataclass(frozen=True)
69
+ # (:GCPProject)-[:RESOURCE]->(:GCPRecordSet)
70
+ class GCPRecordSetToProjectRel(CartographyRelSchema):
71
+ target_node_label: str = "GCPProject"
72
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
73
+ {"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)}
74
+ )
75
+ direction: LinkDirection = LinkDirection.INWARD
76
+ rel_label: str = "RESOURCE"
77
+ properties: GCPRecordSetToProjectRelProperties = (
78
+ GCPRecordSetToProjectRelProperties()
79
+ )
80
+
81
+
82
+ @dataclass(frozen=True)
83
+ class GCPRecordSetToZoneRelProperties(CartographyRelProperties):
84
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
85
+
86
+
87
+ @dataclass(frozen=True)
88
+ # (:GCPDNSZone)-[:HAS_RECORD]->(:GCPRecordSet)
89
+ class GCPRecordSetToZoneRel(CartographyRelSchema):
90
+ target_node_label: str = "GCPDNSZone"
91
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
92
+ {"id": PropertyRef("zone_id")}
93
+ )
94
+ direction: LinkDirection = LinkDirection.INWARD
95
+ rel_label: str = "HAS_RECORD"
96
+ properties: GCPRecordSetToZoneRelProperties = GCPRecordSetToZoneRelProperties()
97
+
98
+
99
+ @dataclass(frozen=True)
100
+ class GCPRecordSetSchema(CartographyNodeSchema):
101
+ label: str = "GCPRecordSet"
102
+ properties: GCPRecordSetNodeProperties = GCPRecordSetNodeProperties()
103
+ extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["DNSRecord"])
104
+ sub_resource_relationship: GCPRecordSetToProjectRel = GCPRecordSetToProjectRel()
105
+ other_relationships: OtherRelationships = OtherRelationships(
106
+ [
107
+ GCPRecordSetToZoneRel(),
108
+ ]
109
+ )
@@ -0,0 +1,69 @@
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 GCPGKEClusterNodeProperties(CartographyNodeProperties):
15
+ id: PropertyRef = PropertyRef("id", extra_index=True)
16
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
17
+ name: PropertyRef = PropertyRef("name")
18
+ self_link: PropertyRef = PropertyRef("self_link")
19
+ description: PropertyRef = PropertyRef("description")
20
+ logging_service: PropertyRef = PropertyRef("logging_service")
21
+ monitoring_service: PropertyRef = PropertyRef("monitoring_service")
22
+ network: PropertyRef = PropertyRef("network")
23
+ subnetwork: PropertyRef = PropertyRef("subnetwork")
24
+ cluster_ipv4cidr: PropertyRef = PropertyRef("cluster_ipv4cidr")
25
+ zone: PropertyRef = PropertyRef("zone")
26
+ location: PropertyRef = PropertyRef("location")
27
+ endpoint: PropertyRef = PropertyRef("endpoint")
28
+ initial_version: PropertyRef = PropertyRef("initial_version")
29
+ current_master_version: PropertyRef = PropertyRef("current_master_version")
30
+ status: PropertyRef = PropertyRef("status")
31
+ services_ipv4cidr: PropertyRef = PropertyRef("services_ipv4cidr")
32
+ database_encryption: PropertyRef = PropertyRef("database_encryption")
33
+ network_policy: PropertyRef = PropertyRef("network_policy")
34
+ master_authorized_networks: PropertyRef = PropertyRef("master_authorized_networks")
35
+ legacy_abac: PropertyRef = PropertyRef("legacy_abac")
36
+ shielded_nodes: PropertyRef = PropertyRef("shielded_nodes")
37
+ private_nodes: PropertyRef = PropertyRef("private_nodes")
38
+ private_endpoint_enabled: PropertyRef = PropertyRef("private_endpoint_enabled")
39
+ private_endpoint: PropertyRef = PropertyRef("private_endpoint")
40
+ public_endpoint: PropertyRef = PropertyRef("public_endpoint")
41
+ masterauth_username: PropertyRef = PropertyRef("masterauth_username")
42
+ masterauth_password: PropertyRef = PropertyRef("masterauth_password")
43
+ created_at: PropertyRef = PropertyRef("created_at")
44
+
45
+
46
+ @dataclass(frozen=True)
47
+ class GCPGKEClusterToProjectRelProperties(CartographyRelProperties):
48
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
49
+
50
+
51
+ @dataclass(frozen=True)
52
+ # (:GCPProject)-[:RESOURCE]->(:GKECluster)
53
+ class GCPGKEClusterToProjectRel(CartographyRelSchema):
54
+ target_node_label: str = "GCPProject"
55
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
56
+ {"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)}
57
+ )
58
+ direction: LinkDirection = LinkDirection.INWARD
59
+ rel_label: str = "RESOURCE"
60
+ properties: GCPGKEClusterToProjectRelProperties = (
61
+ GCPGKEClusterToProjectRelProperties()
62
+ )
63
+
64
+
65
+ @dataclass(frozen=True)
66
+ class GCPGKEClusterSchema(CartographyNodeSchema):
67
+ label: str = "GKECluster"
68
+ properties: GCPGKEClusterNodeProperties = GCPGKEClusterNodeProperties()
69
+ sub_resource_relationship: GCPGKEClusterToProjectRel = GCPGKEClusterToProjectRel()
@@ -4,6 +4,7 @@ from dataclasses import dataclass
4
4
  from cartography.models.core.common import PropertyRef
5
5
  from cartography.models.core.nodes import CartographyNodeProperties
6
6
  from cartography.models.core.nodes import CartographyNodeSchema
7
+ from cartography.models.core.nodes import ExtraNodeLabels
7
8
  from cartography.models.core.relationships import CartographyRelProperties
8
9
  from cartography.models.core.relationships import CartographyRelSchema
9
10
  from cartography.models.core.relationships import LinkDirection
@@ -61,6 +62,8 @@ class GCPServiceAccountSchema(CartographyNodeSchema):
61
62
  label: str = "GCPServiceAccount"
62
63
  properties: GCPServiceAccountNodeProperties = GCPServiceAccountNodeProperties()
63
64
  sub_resource_relationship: GCPPrincipalToProject = GCPPrincipalToProject()
65
+ # Service accounts are principals; add shared label for cross-module queries
66
+ extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["GCPPrincipal"])
64
67
 
65
68
 
66
69
  @dataclass(frozen=True)
File without changes
@@ -0,0 +1,119 @@
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 GCPBucketNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("id", extra_index=True)
17
+ # Preserve legacy field for compatibility with existing queries
18
+ bucket_id: PropertyRef = PropertyRef("bucket_id")
19
+ project_number: PropertyRef = PropertyRef("project_number")
20
+ self_link: PropertyRef = PropertyRef("self_link")
21
+ kind: PropertyRef = PropertyRef("kind")
22
+ location: PropertyRef = PropertyRef("location")
23
+ location_type: PropertyRef = PropertyRef("location_type")
24
+ meta_generation: PropertyRef = PropertyRef("meta_generation")
25
+ storage_class: PropertyRef = PropertyRef("storage_class")
26
+ time_created: PropertyRef = PropertyRef("time_created")
27
+ retention_period: PropertyRef = PropertyRef("retention_period")
28
+ iam_config_bucket_policy_only: PropertyRef = PropertyRef(
29
+ "iam_config_bucket_policy_only"
30
+ )
31
+ owner_entity: PropertyRef = PropertyRef("owner_entity")
32
+ owner_entity_id: PropertyRef = PropertyRef("owner_entity_id")
33
+ versioning_enabled: PropertyRef = PropertyRef("versioning_enabled")
34
+ log_bucket: PropertyRef = PropertyRef("log_bucket")
35
+ requester_pays: PropertyRef = PropertyRef("requester_pays")
36
+ default_kms_key_name: PropertyRef = PropertyRef("default_kms_key_name")
37
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
38
+
39
+
40
+ @dataclass(frozen=True)
41
+ class GCPBucketToProjectRelProperties(CartographyRelProperties):
42
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
43
+
44
+
45
+ @dataclass(frozen=True)
46
+ # (:GCPProject)-[:RESOURCE]->(:GCPBucket)
47
+ class GCPBucketToProjectRel(CartographyRelSchema):
48
+ target_node_label: str = "GCPProject"
49
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
50
+ {"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)}
51
+ )
52
+ direction: LinkDirection = LinkDirection.INWARD
53
+ rel_label: str = "RESOURCE"
54
+ properties: GCPBucketToProjectRelProperties = GCPBucketToProjectRelProperties()
55
+
56
+
57
+ @dataclass(frozen=True)
58
+ class GCPBucketSchema(CartographyNodeSchema):
59
+ label: str = "GCPBucket"
60
+ properties: GCPBucketNodeProperties = GCPBucketNodeProperties()
61
+ sub_resource_relationship: GCPBucketToProjectRel = GCPBucketToProjectRel()
62
+
63
+
64
+ @dataclass(frozen=True)
65
+ class GCPBucketLabelNodeProperties(CartographyNodeProperties):
66
+ id: PropertyRef = PropertyRef("id", extra_index=True)
67
+ key: PropertyRef = PropertyRef("key", extra_index=True)
68
+ value: PropertyRef = PropertyRef("value")
69
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
70
+
71
+
72
+ @dataclass(frozen=True)
73
+ class GCPBucketLabelToProjectRelProperties(CartographyRelProperties):
74
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
75
+
76
+
77
+ @dataclass(frozen=True)
78
+ # (:GCPProject)-[:RESOURCE]->(:GCPBucketLabel)
79
+ class GCPBucketLabelToProjectRel(CartographyRelSchema):
80
+ target_node_label: str = "GCPProject"
81
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
82
+ {"id": PropertyRef("PROJECT_ID", set_in_kwargs=True)}
83
+ )
84
+ direction: LinkDirection = LinkDirection.INWARD
85
+ rel_label: str = "RESOURCE"
86
+ properties: GCPBucketLabelToProjectRelProperties = (
87
+ GCPBucketLabelToProjectRelProperties()
88
+ )
89
+
90
+
91
+ @dataclass(frozen=True)
92
+ class GCPBucketLabelToBucketRelProperties(CartographyRelProperties):
93
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
94
+
95
+
96
+ @dataclass(frozen=True)
97
+ # (:GCPBucket)-[:LABELED]->(:GCPBucketLabel)
98
+ class GCPBucketLabelToBucketRel(CartographyRelSchema):
99
+ target_node_label: str = "GCPBucket"
100
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
101
+ {"id": PropertyRef("bucket_id")}
102
+ )
103
+ direction: LinkDirection = LinkDirection.INWARD
104
+ rel_label: str = "LABELED"
105
+ properties: GCPBucketLabelToBucketRelProperties = (
106
+ GCPBucketLabelToBucketRelProperties()
107
+ )
108
+
109
+
110
+ @dataclass(frozen=True)
111
+ class GCPBucketLabelSchema(CartographyNodeSchema):
112
+ label: str = "GCPBucketLabel"
113
+ properties: GCPBucketLabelNodeProperties = GCPBucketLabelNodeProperties()
114
+ sub_resource_relationship: GCPBucketLabelToProjectRel = GCPBucketLabelToProjectRel()
115
+ other_relationships: OtherRelationships = OtherRelationships(
116
+ [
117
+ GCPBucketLabelToBucketRel(),
118
+ ]
119
+ )
@@ -0,0 +1,63 @@
1
+ """
2
+ Data model for GitHub commit tracking, specifically for tracking which GitHubUsers have committed
3
+ to which GitHubRepositories in the last 30 days.
4
+
5
+ This uses MatchLinks to connect existing GitHubUser nodes to GitHubRepository nodes based on
6
+ commit data from a separate GitHub API call.
7
+ """
8
+
9
+ from dataclasses import dataclass
10
+
11
+ from cartography.models.core.common import PropertyRef
12
+ from cartography.models.core.relationships import CartographyRelProperties
13
+ from cartography.models.core.relationships import CartographyRelSchema
14
+ from cartography.models.core.relationships import LinkDirection
15
+ from cartography.models.core.relationships import make_source_node_matcher
16
+ from cartography.models.core.relationships import make_target_node_matcher
17
+ from cartography.models.core.relationships import SourceNodeMatcher
18
+ from cartography.models.core.relationships import TargetNodeMatcher
19
+
20
+
21
+ @dataclass(frozen=True)
22
+ class GitHubUserCommittedToRepoRelProperties(CartographyRelProperties):
23
+ """
24
+ Properties for the COMMITTED_TO relationship between GitHubUser and GitHubRepository.
25
+ """
26
+
27
+ # Required for all MatchLinks
28
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
29
+ _sub_resource_label: PropertyRef = PropertyRef(
30
+ "_sub_resource_label", set_in_kwargs=True
31
+ )
32
+ _sub_resource_id: PropertyRef = PropertyRef("_sub_resource_id", set_in_kwargs=True)
33
+
34
+ # Rich relationship properties
35
+ commit_count: PropertyRef = PropertyRef("commit_count")
36
+ last_commit_date: PropertyRef = PropertyRef("last_commit_date")
37
+ first_commit_date: PropertyRef = PropertyRef("first_commit_date")
38
+
39
+
40
+ @dataclass(frozen=True)
41
+ class GitHubUserCommittedToRepoRel(CartographyRelSchema):
42
+ """
43
+ MatchLink schema for connecting GitHubUser nodes to GitHubRepository nodes
44
+ based on commits in the last 30 days.
45
+ """
46
+
47
+ target_node_label: str = "GitHubRepository"
48
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
49
+ {
50
+ "id": PropertyRef("repo_url"),
51
+ }
52
+ )
53
+ source_node_label: str = "GitHubUser"
54
+ source_node_matcher: SourceNodeMatcher = make_source_node_matcher(
55
+ {
56
+ "id": PropertyRef("user_url"),
57
+ }
58
+ )
59
+ direction: LinkDirection = LinkDirection.OUTWARD
60
+ rel_label: str = "COMMITTED_TO"
61
+ properties: GitHubUserCommittedToRepoRelProperties = (
62
+ GitHubUserCommittedToRepoRelProperties()
63
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cartography
3
- Version: 0.112.0
3
+ Version: 0.114.0
4
4
  Summary: Explore assets and their relationships across your technical infrastructure.
5
5
  Maintainer: Cartography Contributors
6
6
  License-Expression: Apache-2.0
@@ -25,7 +25,7 @@ Requires-Dist: backoff>=2.1.2
25
25
  Requires-Dist: boto3>=1.15.1
26
26
  Requires-Dist: botocore>=1.18.1
27
27
  Requires-Dist: dnspython>=1.15.0
28
- Requires-Dist: neo4j>=4.4.4
28
+ Requires-Dist: neo4j>=5.28.2
29
29
  Requires-Dist: policyuniverse>=1.1.0.0
30
30
  Requires-Dist: google-api-python-client>=1.7.8
31
31
  Requires-Dist: google-auth>=2.37.0
@@ -42,6 +42,7 @@ Requires-Dist: azure-cli-core>=2.26.0
42
42
  Requires-Dist: azure-mgmt-compute>=5.0.0
43
43
  Requires-Dist: azure-mgmt-resource>=10.2.0
44
44
  Requires-Dist: azure-mgmt-cosmosdb>=6.0.0
45
+ Requires-Dist: azure-mgmt-web>=7.0.0
45
46
  Requires-Dist: msrestazure>=0.6.4
46
47
  Requires-Dist: azure-mgmt-storage>=16.0.0
47
48
  Requires-Dist: azure-mgmt-sql<=1.0.0
@@ -55,6 +56,7 @@ Requires-Dist: xmltodict
55
56
  Requires-Dist: duo-client
56
57
  Requires-Dist: cloudflare<5.0.0,>=4.1.0
57
58
  Requires-Dist: scaleway>=2.9.0
59
+ Requires-Dist: google-cloud-resource-manager>=1.14.2
58
60
  Dynamic: license-file
59
61
 
60
62
  ![Cartography](docs/root/images/logo-horizontal.png)
@@ -95,10 +97,10 @@ You can learn more about the story behind Cartography in our [presentation at BS
95
97
  - [Keycloak](https://cartography-cncf.github.io/cartography/modules/keycloak/index.html) - Realms, Users, Groups, Roles, Scopes, Clients, IdentityProviders, Authentication Flows, Authentication Executions, Organizations, Organization Domains
96
98
  - [Kubernetes](https://cartography-cncf.github.io/cartography/modules/kubernetes/index.html) - Cluster, Namespace, Service, Pod, Container, ServiceAccount, Role, RoleBinding, ClusterRole, ClusterRoleBinding, OIDCProvider
97
99
  - [Lastpass](https://cartography-cncf.github.io/cartography/modules/lastpass/index.html) - users
98
- - [Microsoft Azure](https://cartography-cncf.github.io/cartography/modules/azure/index.html) - CosmosDB, SQL, Storage, Virtual Machine
99
- - [Microsoft Entra ID](https://cartography-cncf.github.io/cartography/modules/entra/index.html) - Users
100
+ - [Microsoft Azure](https://cartography-cncf.github.io/cartography/modules/azure/index.html) - App Service, CosmosDB, Functions, SQL, Storage, Virtual Machine
101
+ - [Microsoft Entra ID](https://cartography-cncf.github.io/cartography/modules/entra/index.html) - Users, Groups, Applications, OUs, App Roles, federation to AWS Identity Center
100
102
  - [NIST CVE](https://cartography-cncf.github.io/cartography/modules/cve/index.html) - Common Vulnerabilities and Exposures (CVE) data from NIST database
101
- - [Okta](https://cartography-cncf.github.io/cartography/modules/okta/index.html) - users, groups, organizations, roles, applications, factors, trusted origins, reply URIs
103
+ - [Okta](https://cartography-cncf.github.io/cartography/modules/okta/index.html) - users, groups, organizations, roles, applications, factors, trusted origins, reply URIs, federation to AWS roles, federation to AWS Identity Center
102
104
  - [OpenAI](https://cartography-cncf.github.io/cartography/modules/openai/index.html) - Organization, AdminApiKey, User, Project, ServiceAccount, ApiKey
103
105
  - [Oracle Cloud Infrastructure](https://cartography-cncf.github.io/cartography/modules/oci/index.html) - IAM
104
106
  - [PagerDuty](https://cartography-cncf.github.io/cartography/modules/pagerduty/index.html) - Users, teams, services, schedules, escalation policies, integrations, vendors