cartography 0.96.0rc3__py3-none-any.whl → 0.96.1__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/data/jobs/cleanup/github_repos_cleanup.json +25 -0
- cartography/intel/aws/ec2/auto_scaling_groups.py +147 -185
- cartography/intel/aws/ec2/instances.py +2 -0
- cartography/intel/aws/ec2/network_acls.py +2 -1
- cartography/intel/aws/ec2/subnets.py +2 -0
- cartography/intel/aws/iam.py +4 -3
- cartography/intel/cve/feed.py +6 -3
- cartography/intel/github/repos.py +209 -27
- cartography/intel/github/teams.py +160 -38
- cartography/models/aws/ec2/auto_scaling_groups.py +204 -0
- cartography/models/aws/ec2/launch_configurations.py +55 -0
- cartography/models/aws/ec2/network_acl_rules.py +1 -0
- cartography/models/github/teams.py +29 -0
- cartography/util.py +22 -0
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/METADATA +1 -1
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/RECORD +20 -18
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/LICENSE +0 -0
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/WHEEL +0 -0
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/entry_points.txt +0 -0
- {cartography-0.96.0rc3.dist-info → cartography-0.96.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
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 AutoScalingGroupNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef('AutoScalingGroupARN')
|
|
17
|
+
arn: PropertyRef = PropertyRef('AutoScalingGroupARN')
|
|
18
|
+
capacityrebalance: PropertyRef = PropertyRef('CapacityRebalance')
|
|
19
|
+
createdtime: PropertyRef = PropertyRef('CreatedTime')
|
|
20
|
+
defaultcooldown: PropertyRef = PropertyRef('DefaultCooldown')
|
|
21
|
+
desiredcapacity: PropertyRef = PropertyRef('DesiredCapacity')
|
|
22
|
+
healthcheckgraceperiod: PropertyRef = PropertyRef('HealthCheckGracePeriod')
|
|
23
|
+
healthchecktype: PropertyRef = PropertyRef('HealthCheckType')
|
|
24
|
+
launchconfigurationname: PropertyRef = PropertyRef('LaunchConfigurationName')
|
|
25
|
+
launchtemplatename: PropertyRef = PropertyRef('LaunchTemplateName')
|
|
26
|
+
launchtemplateid: PropertyRef = PropertyRef('LaunchTemplateId')
|
|
27
|
+
launchtemplateversion: PropertyRef = PropertyRef('LaunchTemplateVersion')
|
|
28
|
+
maxinstancelifetime: PropertyRef = PropertyRef('MaxInstanceLifetime')
|
|
29
|
+
maxsize: PropertyRef = PropertyRef('MaxSize')
|
|
30
|
+
minsize: PropertyRef = PropertyRef('MinSize')
|
|
31
|
+
name: PropertyRef = PropertyRef('AutoScalingGroupName')
|
|
32
|
+
newinstancesprotectedfromscalein: PropertyRef = PropertyRef('NewInstancesProtectedFromScaleIn')
|
|
33
|
+
region: PropertyRef = PropertyRef('Region', set_in_kwargs=True)
|
|
34
|
+
status: PropertyRef = PropertyRef('Status')
|
|
35
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# EC2 to AutoScalingGroup
|
|
39
|
+
@dataclass(frozen=True)
|
|
40
|
+
class EC2InstanceToAwsAccountRelProperties(CartographyRelProperties):
|
|
41
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class EC2InstanceToAWSAccount(CartographyRelSchema):
|
|
46
|
+
target_node_label: str = 'AWSAccount'
|
|
47
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
48
|
+
{'id': PropertyRef('AWS_ID', set_in_kwargs=True)},
|
|
49
|
+
)
|
|
50
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
51
|
+
rel_label: str = "RESOURCE"
|
|
52
|
+
properties: EC2InstanceToAwsAccountRelProperties = EC2InstanceToAwsAccountRelProperties()
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@dataclass(frozen=True)
|
|
56
|
+
class EC2InstanceToAutoScalingGroupRelProperties(CartographyRelProperties):
|
|
57
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@dataclass(frozen=True)
|
|
61
|
+
class EC2InstanceToAutoScalingGroup(CartographyRelSchema):
|
|
62
|
+
target_node_label: str = 'AutoScalingGroup'
|
|
63
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
64
|
+
{'id': PropertyRef('AutoScalingGroupARN')},
|
|
65
|
+
)
|
|
66
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
67
|
+
rel_label: str = "MEMBER_AUTO_SCALE_GROUP"
|
|
68
|
+
properties: EC2InstanceToAutoScalingGroupRelProperties = EC2InstanceToAutoScalingGroupRelProperties()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass(frozen=True)
|
|
72
|
+
class EC2InstanceAutoScalingGroupProperties(CartographyNodeProperties):
|
|
73
|
+
id: PropertyRef = PropertyRef('InstanceId')
|
|
74
|
+
instanceid: PropertyRef = PropertyRef('InstanceId', extra_index=True)
|
|
75
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
76
|
+
region: PropertyRef = PropertyRef('Region', set_in_kwargs=True)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@dataclass(frozen=True)
|
|
80
|
+
class EC2InstanceAutoScalingGroupSchema(CartographyNodeSchema):
|
|
81
|
+
label: str = 'EC2Instance'
|
|
82
|
+
properties: EC2InstanceAutoScalingGroupProperties = EC2InstanceAutoScalingGroupProperties()
|
|
83
|
+
sub_resource_relationship: EC2InstanceToAWSAccount = EC2InstanceToAWSAccount()
|
|
84
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
85
|
+
[
|
|
86
|
+
EC2InstanceToAutoScalingGroup(),
|
|
87
|
+
],
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# EC2Subnet to AutoScalingGroup
|
|
92
|
+
@dataclass(frozen=True)
|
|
93
|
+
class EC2SubnetToAwsAccountRelProperties(CartographyRelProperties):
|
|
94
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@dataclass(frozen=True)
|
|
98
|
+
class EC2SubnetToAWSAccount(CartographyRelSchema):
|
|
99
|
+
target_node_label: str = 'AWSAccount'
|
|
100
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
101
|
+
{'id': PropertyRef('AWS_ID', set_in_kwargs=True)},
|
|
102
|
+
)
|
|
103
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
104
|
+
rel_label: str = "RESOURCE"
|
|
105
|
+
properties: EC2SubnetToAwsAccountRelProperties = EC2SubnetToAwsAccountRelProperties()
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@dataclass(frozen=True)
|
|
109
|
+
class EC2SubnetToAutoScalingGroupRelProperties(CartographyRelProperties):
|
|
110
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@dataclass(frozen=True)
|
|
114
|
+
class EC2SubnetToAutoScalingGroup(CartographyRelSchema):
|
|
115
|
+
target_node_label: str = 'AutoScalingGroup'
|
|
116
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
117
|
+
{'id': PropertyRef('AutoScalingGroupARN')},
|
|
118
|
+
)
|
|
119
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
120
|
+
rel_label: str = "VPC_IDENTIFIER"
|
|
121
|
+
properties: EC2SubnetToAutoScalingGroupRelProperties = EC2SubnetToAutoScalingGroupRelProperties()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@dataclass(frozen=True)
|
|
125
|
+
class EC2SubnetAutoScalingGroupNodeProperties(CartographyNodeProperties):
|
|
126
|
+
id: PropertyRef = PropertyRef('VPCZoneIdentifier')
|
|
127
|
+
subnetid: PropertyRef = PropertyRef('VPCZoneIdentifier', extra_index=True)
|
|
128
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@dataclass(frozen=True)
|
|
132
|
+
class EC2SubnetAutoScalingGroupSchema(CartographyNodeSchema):
|
|
133
|
+
label: str = 'EC2Subnet'
|
|
134
|
+
properties: EC2SubnetAutoScalingGroupNodeProperties = EC2SubnetAutoScalingGroupNodeProperties()
|
|
135
|
+
sub_resource_relationship: EC2SubnetToAWSAccount = EC2SubnetToAWSAccount()
|
|
136
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
137
|
+
[
|
|
138
|
+
EC2SubnetToAutoScalingGroup(),
|
|
139
|
+
],
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# AutoScalingGroup
|
|
144
|
+
@dataclass(frozen=True)
|
|
145
|
+
class AutoScalingGroupToAwsAccountRelProperties(CartographyRelProperties):
|
|
146
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@dataclass(frozen=True)
|
|
150
|
+
class AutoScalingGroupToAWSAccount(CartographyRelSchema):
|
|
151
|
+
target_node_label: str = 'AWSAccount'
|
|
152
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
153
|
+
{'id': PropertyRef('AWS_ID', set_in_kwargs=True)},
|
|
154
|
+
)
|
|
155
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
156
|
+
rel_label: str = "RESOURCE"
|
|
157
|
+
properties: AutoScalingGroupToAwsAccountRelProperties = AutoScalingGroupToAwsAccountRelProperties()
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
@dataclass(frozen=True)
|
|
161
|
+
class AutoScalingGroupToLaunchTemplateRelProperties(CartographyRelProperties):
|
|
162
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@dataclass(frozen=True)
|
|
166
|
+
class AutoScalingGroupToLaunchTemplate(CartographyRelSchema):
|
|
167
|
+
target_node_label: str = 'LaunchTemplate'
|
|
168
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
169
|
+
{'id': PropertyRef('LaunchTemplateId')},
|
|
170
|
+
)
|
|
171
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
172
|
+
rel_label: str = "HAS_LAUNCH_TEMPLATE"
|
|
173
|
+
properties: AutoScalingGroupToLaunchTemplateRelProperties = AutoScalingGroupToLaunchTemplateRelProperties()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
@dataclass(frozen=True)
|
|
177
|
+
class AutoScalingGroupToLaunchConfigurationRelProperties(CartographyRelProperties):
|
|
178
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
@dataclass(frozen=True)
|
|
182
|
+
class AutoScalingGroupToLaunchConfiguration(CartographyRelSchema):
|
|
183
|
+
target_node_label: str = 'LaunchConfiguration'
|
|
184
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
185
|
+
{'name': PropertyRef('LaunchConfigurationName')},
|
|
186
|
+
)
|
|
187
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
188
|
+
rel_label: str = "HAS_LAUNCH_CONFIG"
|
|
189
|
+
properties: AutoScalingGroupToLaunchConfigurationRelProperties = (
|
|
190
|
+
AutoScalingGroupToLaunchConfigurationRelProperties()
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@dataclass(frozen=True)
|
|
195
|
+
class AutoScalingGroupSchema(CartographyNodeSchema):
|
|
196
|
+
label: str = 'AutoScalingGroup'
|
|
197
|
+
properties: AutoScalingGroupNodeProperties = AutoScalingGroupNodeProperties()
|
|
198
|
+
sub_resource_relationship: AutoScalingGroupToAWSAccount = AutoScalingGroupToAWSAccount()
|
|
199
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
200
|
+
[
|
|
201
|
+
AutoScalingGroupToLaunchTemplate(),
|
|
202
|
+
AutoScalingGroupToLaunchConfiguration(),
|
|
203
|
+
],
|
|
204
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
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 LaunchConfigurationNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef('LaunchConfigurationARN')
|
|
16
|
+
arn: PropertyRef = PropertyRef('LaunchConfigurationARN')
|
|
17
|
+
created_time = PropertyRef('CreatedTime')
|
|
18
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
19
|
+
image_id: PropertyRef = PropertyRef('ImageId')
|
|
20
|
+
key_name: PropertyRef = PropertyRef('KeyName')
|
|
21
|
+
name: PropertyRef = PropertyRef('LaunchConfigurationName')
|
|
22
|
+
security_groups: PropertyRef = PropertyRef('SecurityGroups')
|
|
23
|
+
instance_type: PropertyRef = PropertyRef('InstanceType')
|
|
24
|
+
kernel_id: PropertyRef = PropertyRef('KernelId')
|
|
25
|
+
ramdisk_id: PropertyRef = PropertyRef('RamdiskId')
|
|
26
|
+
instance_monitoring_enabled: PropertyRef = PropertyRef('InstanceMonitoringEnabled')
|
|
27
|
+
spot_price: PropertyRef = PropertyRef('SpotPrice')
|
|
28
|
+
iam_instance_profile: PropertyRef = PropertyRef('IamInstanceProfile')
|
|
29
|
+
ebs_optimized: PropertyRef = PropertyRef('EbsOptimized')
|
|
30
|
+
associate_public_ip_address: PropertyRef = PropertyRef('AssociatePublicIpAddress')
|
|
31
|
+
placement_tenancy: PropertyRef = PropertyRef('PlacementTenancy')
|
|
32
|
+
region: PropertyRef = PropertyRef('Region', set_in_kwargs=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True)
|
|
36
|
+
class LaunchConfigurationToAwsAccountRelProperties(CartographyRelProperties):
|
|
37
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(frozen=True)
|
|
41
|
+
class LaunchConfigurationToAwsAccount(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: LaunchConfigurationToAwsAccountRelProperties = LaunchConfigurationToAwsAccountRelProperties()
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@dataclass(frozen=True)
|
|
52
|
+
class LaunchConfigurationSchema(CartographyNodeSchema):
|
|
53
|
+
label: str = 'LaunchConfiguration'
|
|
54
|
+
properties: LaunchConfigurationNodeProperties = LaunchConfigurationNodeProperties()
|
|
55
|
+
sub_resource_relationship: LaunchConfigurationToAwsAccount = LaunchConfigurationToAwsAccount()
|
|
@@ -21,6 +21,7 @@ class EC2NetworkAclRuleNodeProperties(CartographyNodeProperties):
|
|
|
21
21
|
fromport: PropertyRef = PropertyRef('FromPort')
|
|
22
22
|
toport: PropertyRef = PropertyRef('ToPort')
|
|
23
23
|
cidrblock: PropertyRef = PropertyRef('CidrBlock')
|
|
24
|
+
ipv6cidrblock: PropertyRef = PropertyRef('Ipv6CidrBlock')
|
|
24
25
|
egress: PropertyRef = PropertyRef('Egress')
|
|
25
26
|
rulenumber: PropertyRef = PropertyRef('RuleNumber')
|
|
26
27
|
ruleaction: PropertyRef = PropertyRef('RuleAction')
|
|
@@ -80,6 +80,33 @@ class GitHubTeamWriteRepoRel(CartographyRelSchema):
|
|
|
80
80
|
properties: GitHubTeamToRepoRelProperties = GitHubTeamToRepoRelProperties()
|
|
81
81
|
|
|
82
82
|
|
|
83
|
+
@dataclass(frozen=True)
|
|
84
|
+
class GitHubTeamToUserRelProperties(CartographyRelProperties):
|
|
85
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@dataclass(frozen=True)
|
|
89
|
+
class GitHubTeamMaintainerUserRel(CartographyRelSchema):
|
|
90
|
+
target_node_label: str = 'GitHubUser'
|
|
91
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
92
|
+
{'id': PropertyRef('MAINTAINER')},
|
|
93
|
+
)
|
|
94
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
95
|
+
rel_label: str = "MAINTAINER"
|
|
96
|
+
properties: GitHubTeamToUserRelProperties = GitHubTeamToUserRelProperties()
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@dataclass(frozen=True)
|
|
100
|
+
class GitHubTeamMemberUserRel(CartographyRelSchema):
|
|
101
|
+
target_node_label: str = 'GitHubUser'
|
|
102
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
103
|
+
{'id': PropertyRef('MEMBER')},
|
|
104
|
+
)
|
|
105
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
106
|
+
rel_label: str = "MEMBER"
|
|
107
|
+
properties: GitHubTeamToUserRelProperties = GitHubTeamToUserRelProperties()
|
|
108
|
+
|
|
109
|
+
|
|
83
110
|
@dataclass(frozen=True)
|
|
84
111
|
class GitHubTeamToOrganizationRelProperties(CartographyRelProperties):
|
|
85
112
|
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
@@ -107,6 +134,8 @@ class GitHubTeamSchema(CartographyNodeSchema):
|
|
|
107
134
|
GitHubTeamReadRepoRel(),
|
|
108
135
|
GitHubTeamTriageRepoRel(),
|
|
109
136
|
GitHubTeamWriteRepoRel(),
|
|
137
|
+
GitHubTeamMaintainerUserRel(),
|
|
138
|
+
GitHubTeamMemberUserRel(),
|
|
110
139
|
],
|
|
111
140
|
)
|
|
112
141
|
sub_resource_relationship: GitHubTeamToOrganizationRel = GitHubTeamToOrganizationRel()
|
cartography/util.py
CHANGED
|
@@ -15,6 +15,7 @@ from typing import Iterable
|
|
|
15
15
|
from typing import List
|
|
16
16
|
from typing import Optional
|
|
17
17
|
from typing import Set
|
|
18
|
+
from typing import Type
|
|
18
19
|
from typing import TypeVar
|
|
19
20
|
from typing import Union
|
|
20
21
|
|
|
@@ -288,6 +289,27 @@ def aws_handle_regions(func: AWSGetFunc) -> AWSGetFunc:
|
|
|
288
289
|
return cast(AWSGetFunc, inner_function)
|
|
289
290
|
|
|
290
291
|
|
|
292
|
+
def retries_with_backoff(
|
|
293
|
+
func: Callable,
|
|
294
|
+
exception_type: Type[Exception],
|
|
295
|
+
max_tries: int,
|
|
296
|
+
on_backoff: Callable,
|
|
297
|
+
) -> Callable:
|
|
298
|
+
"""
|
|
299
|
+
Adds retry with backoff to the given function. (Could expand the possible input parameters as needed.)
|
|
300
|
+
"""
|
|
301
|
+
@wraps(func)
|
|
302
|
+
@backoff.on_exception(
|
|
303
|
+
backoff.expo,
|
|
304
|
+
exception_type,
|
|
305
|
+
max_tries=max_tries,
|
|
306
|
+
on_backoff=on_backoff,
|
|
307
|
+
)
|
|
308
|
+
def inner_function(*args, **kwargs): # type: ignore
|
|
309
|
+
return func(*args, **kwargs)
|
|
310
|
+
return cast(Callable, inner_function)
|
|
311
|
+
|
|
312
|
+
|
|
291
313
|
def dict_value_to_str(obj: Dict, key: str) -> Optional[str]:
|
|
292
314
|
"""
|
|
293
315
|
Convert the value referenced by the key in the dict to a string, if it exists, and return it. If it doesn't exist,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cartography
|
|
3
|
-
Version: 0.96.
|
|
3
|
+
Version: 0.96.1
|
|
4
4
|
Summary: Explore assets and their relationships across your technical infrastructure.
|
|
5
5
|
Home-page: https://www.github.com/cartography-cncf/cartography
|
|
6
6
|
Maintainer: Cartography Contributors
|
|
@@ -5,7 +5,7 @@ cartography/config.py,sha256=ZcadsKmooAkti9Kv0eDl8Ec1PcZDu3lWobtNaCnwY3k,11872
|
|
|
5
5
|
cartography/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
cartography/stats.py,sha256=dbybb9V2FuvSuHjjNwz6Vjwnd1hap2C7h960rLoKcl8,4406
|
|
7
7
|
cartography/sync.py,sha256=ziD63T_774gXSuD5zdz6fLGvv1Kt2ntQySSVbmcCZb8,9708
|
|
8
|
-
cartography/util.py,sha256=
|
|
8
|
+
cartography/util.py,sha256=T51p1WrA9sdyDnHM3H9RN25OR2xClXww33SBUkM_HgA,15080
|
|
9
9
|
cartography/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
cartography/client/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
cartography/client/aws/iam.py,sha256=dYsGikc36DEsSeR2XVOVFFUDwuU9yWj_EVkpgVYCFgM,1293
|
|
@@ -103,7 +103,7 @@ cartography/data/jobs/cleanup/gcp_dns_cleanup.json,sha256=NGs5UYFmm65Rq8gyqbzIe8
|
|
|
103
103
|
cartography/data/jobs/cleanup/gcp_gke_cluster_cleanup.json,sha256=3bMEJ44AEvjkj_1ibclk6Ys5r1LniUWefpZ_U5hTwHI,671
|
|
104
104
|
cartography/data/jobs/cleanup/gcp_storage_bucket_cleanup.json,sha256=sGygB_meoCpGdGgEZtIlC4L-19meAXdfP99gkNJHD7o,1288
|
|
105
105
|
cartography/data/jobs/cleanup/github_org_and_users_cleanup.json,sha256=vjaOlWdnjaCHmvmaWadOzHXqFnjpR1wW8cykb_M54fM,1010
|
|
106
|
-
cartography/data/jobs/cleanup/github_repos_cleanup.json,sha256=
|
|
106
|
+
cartography/data/jobs/cleanup/github_repos_cleanup.json,sha256=Ko6zya72yLjLt_m-wogAUmuzzL2-IJiO457clEHFxPk,3676
|
|
107
107
|
cartography/data/jobs/cleanup/gsuite_ingest_groups_cleanup.json,sha256=ddXAUi6aVi2htf5R1bNn6YrC3SjshjLBgWtlzBgZ9Do,961
|
|
108
108
|
cartography/data/jobs/cleanup/gsuite_ingest_users_cleanup.json,sha256=0qMLbVSTyq5F9vt4-TvVa3YAAvZCpPtzF9EwblaTxWg,353
|
|
109
109
|
cartography/data/jobs/cleanup/jamf_import_computers_cleanup.json,sha256=sEF6VSkOcFO210y3VHFO45PDYi5ZePS6xRm3GL9lW7A,248
|
|
@@ -152,7 +152,7 @@ cartography/intel/aws/eks.py,sha256=OerAX7qT2uGPbqliPvuy8JZUIgle_KMlnkkHxk8O5fk,
|
|
|
152
152
|
cartography/intel/aws/elasticache.py,sha256=fCI47aDFmIDyE26GiReKYb6XIZUwrzcvsXBQ4ruFhuI,4427
|
|
153
153
|
cartography/intel/aws/elasticsearch.py,sha256=ZL7MkXF_bXRSoXuDSI1dwGckRLG2zDB8LuAD07vSLnE,8374
|
|
154
154
|
cartography/intel/aws/emr.py,sha256=xhWBVZngxJRFjMEDxwq3G6SgytRGLq0v2a_CeDvByR0,3372
|
|
155
|
-
cartography/intel/aws/iam.py,sha256=
|
|
155
|
+
cartography/intel/aws/iam.py,sha256=zRlF9cKcYm44iL63G6bd-_flNOFHVrjsEfW0jZHpUNg,32387
|
|
156
156
|
cartography/intel/aws/identitycenter.py,sha256=zIWe_JpXPC-kkWu26aFjYtGsClNG_GaQ3bdCeiRkApc,9475
|
|
157
157
|
cartography/intel/aws/inspector.py,sha256=S22ZgRKEnmnBTJ-u0rodqRPB7_LkSIek47NeBxN4XJw,9336
|
|
158
158
|
cartography/intel/aws/kms.py,sha256=bZUzMxAH_DsAcGTJBs08gg2tLKYu-QWjvMvV9C-6v50,11731
|
|
@@ -170,21 +170,21 @@ cartography/intel/aws/securityhub.py,sha256=8FF7vW0ykdqn07xGExtsOLxYTyCTTbDiRuA1
|
|
|
170
170
|
cartography/intel/aws/sqs.py,sha256=cosScBKxAm_6GsM9zzg4U12KvAjXUzxpJ1zGv0lsVZI,6199
|
|
171
171
|
cartography/intel/aws/ssm.py,sha256=IDOYa8v2FgziU8nBOZ7wyDG4o_nFYshbB-si9Ut_9Zc,5562
|
|
172
172
|
cartography/intel/aws/ec2/__init__.py,sha256=IDK2Yap7mllK_ab6yVMLXatJ94znIkn-szv5RJP5fbo,346
|
|
173
|
-
cartography/intel/aws/ec2/auto_scaling_groups.py,sha256=
|
|
173
|
+
cartography/intel/aws/ec2/auto_scaling_groups.py,sha256=ylfks8_oC0-fVMnToFbmRcbKdEN0H17LlN1-ZqW6ULc,8148
|
|
174
174
|
cartography/intel/aws/ec2/elastic_ip_addresses.py,sha256=0k4NwS73VyWbEj5jXvSkaq2RNvmAlBlrN-UKa_Bj0uk,3957
|
|
175
175
|
cartography/intel/aws/ec2/images.py,sha256=heElwHJGqVD3iUJjxwA_Sdc3CmE4HPs00CTMHuQ1wkc,3782
|
|
176
|
-
cartography/intel/aws/ec2/instances.py,sha256=
|
|
176
|
+
cartography/intel/aws/ec2/instances.py,sha256=IJS9TJhk0aqFaRbmUOCE_sHVhZJLg8fPTF8zEnTlyvk,12372
|
|
177
177
|
cartography/intel/aws/ec2/internet_gateways.py,sha256=dI-4-85_3DGGZZBcY_DN6XqESx9P26S6jKok314lcnQ,2883
|
|
178
178
|
cartography/intel/aws/ec2/key_pairs.py,sha256=SvRgd56vE4eouvTSNoFK8PP8HYoECO91goxc36oq_FY,2508
|
|
179
179
|
cartography/intel/aws/ec2/launch_templates.py,sha256=aeqaL8On38ET8nM8bISsIXLy6PkZoV-tqSWG38YXgkI,6010
|
|
180
180
|
cartography/intel/aws/ec2/load_balancer_v2s.py,sha256=95FfQQn740gexINIHDJizOM4OKzRtQT_y2XQMipQ5Dg,8661
|
|
181
181
|
cartography/intel/aws/ec2/load_balancers.py,sha256=1GwErzGqi3BKCARqfGJcD_r_D84rFKVy5kNMas9jAok,6756
|
|
182
|
-
cartography/intel/aws/ec2/network_acls.py,sha256=
|
|
182
|
+
cartography/intel/aws/ec2/network_acls.py,sha256=_UiOx79OxcqH0ecRjcVMglAzz5XJ4aVYLlv6dl_ism4,6809
|
|
183
183
|
cartography/intel/aws/ec2/network_interfaces.py,sha256=CzF8PooCYUQ2pk8DR8JDAhkWRUQSBj_27OsIfkL_-Cs,9199
|
|
184
184
|
cartography/intel/aws/ec2/reserved_instances.py,sha256=jv8-VLI5KL8jN1QRI20yim8lzZ7I7wR8a5EF8DckahA,3122
|
|
185
185
|
cartography/intel/aws/ec2/security_groups.py,sha256=vxLeaCpCowkbl-YpON1UdbjtPolMfj_reOEuKujN80Y,6060
|
|
186
186
|
cartography/intel/aws/ec2/snapshots.py,sha256=R3U6ZwE4bQPy5yikLCRcUHyXN1dD7TzS-3jULQO-F0g,5432
|
|
187
|
-
cartography/intel/aws/ec2/subnets.py,sha256=
|
|
187
|
+
cartography/intel/aws/ec2/subnets.py,sha256=42KODMXswv4OCVnkWDHZbZDLUnc_ZAD-1TDMk88rWdo,3892
|
|
188
188
|
cartography/intel/aws/ec2/tgw.py,sha256=lTFPlRNoDHNklR38alSywXlSiiTyg86vJNth7Pc4pZQ,9114
|
|
189
189
|
cartography/intel/aws/ec2/util.py,sha256=Pv-x1QEAAmyxcpEl6y8M24ija3ERjXFE36fswuKXHDs,226
|
|
190
190
|
cartography/intel/aws/ec2/volumes.py,sha256=4jmeuf-l_Wje4VaKq2mcF_cd02rBZdnDoMPvKb4Lh8w,3507
|
|
@@ -209,7 +209,7 @@ cartography/intel/crowdstrike/endpoints.py,sha256=tdqokMDW3p4fK3dHKKb2T1DTogvOJB
|
|
|
209
209
|
cartography/intel/crowdstrike/spotlight.py,sha256=yNhj44-RYF6ubck-hHMKhKiNU0fCfhQf4Oagopc31EM,4754
|
|
210
210
|
cartography/intel/crowdstrike/util.py,sha256=gfJ6Ptr6YdbBS9Qj9a_-Jc-IJroADDRcXqjh5TW0qXE,277
|
|
211
211
|
cartography/intel/cve/__init__.py,sha256=3PLAhQ36g-aq40IHvba789WANsA-TY9B-Oe9mpQweQ8,2516
|
|
212
|
-
cartography/intel/cve/feed.py,sha256=
|
|
212
|
+
cartography/intel/cve/feed.py,sha256=bKzetBVGYz8e2GKupUh2BilBCZuIwSfZdN23ArxYLZU,10147
|
|
213
213
|
cartography/intel/digitalocean/__init__.py,sha256=SMYB7LGIQOj_EgGSGVjWZk7SJNbP43hQuOfgOu6xYm4,1526
|
|
214
214
|
cartography/intel/digitalocean/compute.py,sha256=9XctwMjq9h5dExFgExvawoqyiEwSoocNgaMm3Fgl5GM,4911
|
|
215
215
|
cartography/intel/digitalocean/management.py,sha256=YWRnBLLL_bAP1vefIAQgm_-QzefGH0sZKmyU_EokHfA,3764
|
|
@@ -229,8 +229,8 @@ cartography/intel/gcp/dns.py,sha256=y2pvbmV04cnrMyuu_nbW3oc7uwHX6yEzn1n7veCsjmk,
|
|
|
229
229
|
cartography/intel/gcp/gke.py,sha256=qaTwsVaxkwNhW5_Mw4bedOk7fgJK8y0LwwcYlUABXDg,7966
|
|
230
230
|
cartography/intel/gcp/storage.py,sha256=oO_ayEhkXlj2Gn7T5MU41ZXiqwRwe6Ud4wzqyRTsyf4,9075
|
|
231
231
|
cartography/intel/github/__init__.py,sha256=y876JJGTDJZEOFCDiNCJfcLNxN24pVj4s2N0YmuuoaE,1914
|
|
232
|
-
cartography/intel/github/repos.py,sha256=
|
|
233
|
-
cartography/intel/github/teams.py,sha256=
|
|
232
|
+
cartography/intel/github/repos.py,sha256=FaNJK3Hs2MywuQaEyx_TTjHTtSXxfqs0jiV79aU_p7g,28959
|
|
233
|
+
cartography/intel/github/teams.py,sha256=uQTiOfUBCk4qk0uw7jEPevAq-b2fvynRJ3t-62RZW2c,10659
|
|
234
234
|
cartography/intel/github/users.py,sha256=zkMLVNfEMZIYYtPfqTsMXs2BNFzK8SfFRO7qnnlHy_s,8399
|
|
235
235
|
cartography/intel/github/util.py,sha256=K6hbxypy4luKhIE1Uh5VWZc9OyjMK2OuO00vBAQfloA,8049
|
|
236
236
|
cartography/intel/gsuite/__init__.py,sha256=AGIUskGlLCVGHbnQicNpNWi9AvmV7_7hUKTt-hsB2J8,4306
|
|
@@ -285,13 +285,15 @@ cartography/models/aws/dynamodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
285
285
|
cartography/models/aws/dynamodb/gsi.py,sha256=KYsHJpSgrTQndZGIdKAi5MjgvUne2iNvqTr29BDzI14,3021
|
|
286
286
|
cartography/models/aws/dynamodb/tables.py,sha256=iNTnI0FLdqHs0-EYGqWLGHWEy4mkSEDny2l5f7HBXN0,2198
|
|
287
287
|
cartography/models/aws/ec2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
288
|
+
cartography/models/aws/ec2/auto_scaling_groups.py,sha256=ImIu-i5iU_CJQ25oa2MDnOhOjL4jcpBagPiB95JUvSE,8660
|
|
288
289
|
cartography/models/aws/ec2/images.py,sha256=uGhXS7Xb6sKUdwwkS0O0dWP4sIREjusUaV_unODv9gE,3012
|
|
289
290
|
cartography/models/aws/ec2/instances.py,sha256=cNMHngdGNRhxoyID6AmG2F7CQGC1fYani8DV8lSKvsI,3902
|
|
290
291
|
cartography/models/aws/ec2/keypairs.py,sha256=scKC3SdExHAWkPNmb6tT9LK-9q4sweqS2ejFzMec10M,2630
|
|
292
|
+
cartography/models/aws/ec2/launch_configurations.py,sha256=zdfWJEx93HXDXd_IzSEkhvcztkJI7_v_TCE_d8ZNAyI,2764
|
|
291
293
|
cartography/models/aws/ec2/launch_template_versions.py,sha256=RitfnAuAj0XpFsCXkRbtUhHMAi8Vsvmtury231eKvGU,3897
|
|
292
294
|
cartography/models/aws/ec2/launch_templates.py,sha256=GqiwFuMp72LNSt2eQlp2WfdU_vHsom-xKV5AaUewSHQ,2157
|
|
293
295
|
cartography/models/aws/ec2/loadbalancerv2.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
294
|
-
cartography/models/aws/ec2/network_acl_rules.py,sha256=
|
|
296
|
+
cartography/models/aws/ec2/network_acl_rules.py,sha256=4Rq2J-Dce8J6y9J6YIalmYtuQRWLp652LXO1Xg6XGPE,3951
|
|
295
297
|
cartography/models/aws/ec2/network_acls.py,sha256=pJKsXdMLB8L79lmTYpLJfFJ6p7PWpf3rBN6eW6y-5hY,3419
|
|
296
298
|
cartography/models/aws/ec2/networkinterface_instance.py,sha256=t3oqcQ4GjYf7dwqPUGCiXd70ie4ibYLilOXiE5_Ad8g,4707
|
|
297
299
|
cartography/models/aws/ec2/networkinterfaces.py,sha256=z1-Dl6I79-TCxXKG8QBpSKga93lPCPaLR1XqKJZK3ME,4127
|
|
@@ -334,7 +336,7 @@ cartography/models/duo/user.py,sha256=ih3DH_QveAve4cX9dmIwC5gVN6_RNnuLK3bfJ5I9u6
|
|
|
334
336
|
cartography/models/duo/web_authn_credential.py,sha256=OcZnfG5zCMlphxSltRcAXQ12hHYJjxrBt6A9L28g7Vk,2920
|
|
335
337
|
cartography/models/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
336
338
|
cartography/models/github/orgs.py,sha256=f5kJ-51MDGW5k4sWMeTfyBDxcHdhFJZGkRUvGcjllBU,1097
|
|
337
|
-
cartography/models/github/teams.py,sha256=
|
|
339
|
+
cartography/models/github/teams.py,sha256=mykeo89acrzyrPzVVC0fzO1piTuysR2CB48LwwrQc0g,5435
|
|
338
340
|
cartography/models/github/users.py,sha256=XliVsBKWF7wW7Dwjwdoz9E2gk1cASyfQgAddKYr23VY,5739
|
|
339
341
|
cartography/models/kandji/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
340
342
|
cartography/models/kandji/device.py,sha256=C3zPhLi1oPNysbSUr4H2u8b-Xy14sb3FE7YcjCwlntw,2214
|
|
@@ -351,9 +353,9 @@ cartography/models/snipeit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
351
353
|
cartography/models/snipeit/asset.py,sha256=FyRAaeXuZjMy0eUQcSDFcgEAF5lbLMlvqp1Tv9d3Lv4,3238
|
|
352
354
|
cartography/models/snipeit/tenant.py,sha256=p4rFnpNNuF1W5ilGBbexDaETWTwavfb38RcQGoImkQI,679
|
|
353
355
|
cartography/models/snipeit/user.py,sha256=MsB4MiCVNTH6JpESime7cOkB89autZOXQpL6Z0l7L6o,2113
|
|
354
|
-
cartography-0.96.
|
|
355
|
-
cartography-0.96.
|
|
356
|
-
cartography-0.96.
|
|
357
|
-
cartography-0.96.
|
|
358
|
-
cartography-0.96.
|
|
359
|
-
cartography-0.96.
|
|
356
|
+
cartography-0.96.1.dist-info/LICENSE,sha256=kvLEBRYaQ1RvUni6y7Ti9uHeooqnjPoo6n_-0JO1ETc,11351
|
|
357
|
+
cartography-0.96.1.dist-info/METADATA,sha256=6IcNRa-SP4o3DT8IBROqO5fdVzRMOlub-1VKVaEeWR0,1938
|
|
358
|
+
cartography-0.96.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
359
|
+
cartography-0.96.1.dist-info/entry_points.txt,sha256=GVIAWD0o0_K077qMA_k1oZU4v-M0a8GLKGJR8tZ-qH8,112
|
|
360
|
+
cartography-0.96.1.dist-info/top_level.txt,sha256=BHqsNJQiI6Q72DeypC1IINQJE59SLhU4nllbQjgJi9g,12
|
|
361
|
+
cartography-0.96.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|