cartography 0.104.0rc3__py3-none-any.whl → 0.106.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.
- cartography/_version.py +2 -2
- cartography/cli.py +104 -3
- cartography/client/aws/__init__.py +19 -0
- cartography/client/aws/ecr.py +51 -0
- cartography/client/core/tx.py +62 -0
- cartography/config.py +32 -0
- cartography/data/indexes.cypher +0 -37
- cartography/data/jobs/cleanup/aws_import_lambda_cleanup.json +1 -1
- cartography/driftdetect/cli.py +3 -2
- cartography/graph/cleanupbuilder.py +198 -41
- cartography/graph/job.py +42 -0
- cartography/graph/querybuilder.py +136 -2
- cartography/graph/statement.py +1 -1
- cartography/intel/airbyte/__init__.py +105 -0
- cartography/intel/airbyte/connections.py +120 -0
- cartography/intel/airbyte/destinations.py +81 -0
- cartography/intel/airbyte/organizations.py +59 -0
- cartography/intel/airbyte/sources.py +78 -0
- cartography/intel/airbyte/tags.py +64 -0
- cartography/intel/airbyte/users.py +106 -0
- cartography/intel/airbyte/util.py +122 -0
- cartography/intel/airbyte/workspaces.py +63 -0
- cartography/intel/aws/acm.py +124 -0
- cartography/intel/aws/cloudtrail.py +3 -38
- cartography/intel/aws/codebuild.py +132 -0
- cartography/intel/aws/ecr.py +8 -2
- cartography/intel/aws/ecs.py +228 -380
- cartography/intel/aws/efs.py +179 -11
- cartography/intel/aws/iam.py +1 -1
- cartography/intel/aws/identitycenter.py +14 -3
- cartography/intel/aws/inspector.py +96 -53
- cartography/intel/aws/lambda_function.py +1 -1
- cartography/intel/aws/rds.py +2 -1
- cartography/intel/aws/resources.py +4 -0
- cartography/intel/aws/s3.py +195 -4
- cartography/intel/aws/sqs.py +36 -90
- cartography/intel/entra/__init__.py +22 -0
- cartography/intel/entra/applications.py +366 -0
- cartography/intel/entra/groups.py +151 -0
- cartography/intel/entra/ou.py +21 -5
- cartography/intel/entra/users.py +84 -42
- cartography/intel/kubernetes/__init__.py +30 -14
- cartography/intel/kubernetes/clusters.py +86 -0
- cartography/intel/kubernetes/namespaces.py +59 -57
- cartography/intel/kubernetes/pods.py +140 -77
- cartography/intel/kubernetes/secrets.py +95 -45
- cartography/intel/kubernetes/services.py +131 -67
- cartography/intel/kubernetes/util.py +125 -14
- cartography/intel/scaleway/__init__.py +127 -0
- cartography/intel/scaleway/iam/__init__.py +0 -0
- cartography/intel/scaleway/iam/apikeys.py +71 -0
- cartography/intel/scaleway/iam/applications.py +71 -0
- cartography/intel/scaleway/iam/groups.py +71 -0
- cartography/intel/scaleway/iam/users.py +71 -0
- cartography/intel/scaleway/instances/__init__.py +0 -0
- cartography/intel/scaleway/instances/flexibleips.py +86 -0
- cartography/intel/scaleway/instances/instances.py +92 -0
- cartography/intel/scaleway/projects.py +79 -0
- cartography/intel/scaleway/storage/__init__.py +0 -0
- cartography/intel/scaleway/storage/snapshots.py +86 -0
- cartography/intel/scaleway/storage/volumes.py +84 -0
- cartography/intel/scaleway/utils.py +37 -0
- cartography/intel/trivy/__init__.py +161 -0
- cartography/intel/trivy/scanner.py +363 -0
- cartography/models/airbyte/__init__.py +0 -0
- cartography/models/airbyte/connection.py +138 -0
- cartography/models/airbyte/destination.py +75 -0
- cartography/models/airbyte/organization.py +19 -0
- cartography/models/airbyte/source.py +75 -0
- cartography/models/airbyte/stream.py +74 -0
- cartography/models/airbyte/tag.py +69 -0
- cartography/models/airbyte/user.py +111 -0
- cartography/models/airbyte/workspace.py +46 -0
- cartography/models/aws/acm/__init__.py +0 -0
- cartography/models/aws/acm/certificate.py +75 -0
- cartography/models/aws/cloudtrail/trail.py +24 -0
- cartography/models/aws/codebuild/__init__.py +0 -0
- cartography/models/aws/codebuild/project.py +49 -0
- cartography/models/aws/ecs/__init__.py +0 -0
- cartography/models/aws/ecs/clusters.py +64 -0
- cartography/models/aws/ecs/container_definitions.py +93 -0
- cartography/models/aws/ecs/container_instances.py +84 -0
- cartography/models/aws/ecs/containers.py +99 -0
- cartography/models/aws/ecs/services.py +117 -0
- cartography/models/aws/ecs/task_definitions.py +135 -0
- cartography/models/aws/ecs/tasks.py +110 -0
- cartography/models/aws/efs/access_point.py +77 -0
- cartography/models/aws/efs/file_system.py +60 -0
- cartography/models/aws/efs/mount_target.py +29 -2
- cartography/models/aws/s3/notification.py +24 -0
- cartography/models/aws/secretsmanager/secret_version.py +0 -2
- cartography/models/aws/sqs/__init__.py +0 -0
- cartography/models/aws/sqs/queue.py +89 -0
- cartography/models/core/common.py +1 -0
- cartography/models/core/nodes.py +15 -2
- cartography/models/core/relationships.py +44 -0
- cartography/models/entra/app_role_assignment.py +115 -0
- cartography/models/entra/application.py +47 -0
- cartography/models/entra/group.py +91 -0
- cartography/models/entra/user.py +17 -51
- cartography/models/kubernetes/__init__.py +0 -0
- cartography/models/kubernetes/clusters.py +26 -0
- cartography/models/kubernetes/containers.py +108 -0
- cartography/models/kubernetes/namespaces.py +51 -0
- cartography/models/kubernetes/pods.py +80 -0
- cartography/models/kubernetes/secrets.py +79 -0
- cartography/models/kubernetes/services.py +108 -0
- cartography/models/scaleway/__init__.py +0 -0
- cartography/models/scaleway/iam/__init__.py +0 -0
- cartography/models/scaleway/iam/apikey.py +96 -0
- cartography/models/scaleway/iam/application.py +52 -0
- cartography/models/scaleway/iam/group.py +95 -0
- cartography/models/scaleway/iam/user.py +60 -0
- cartography/models/scaleway/instance/__init__.py +0 -0
- cartography/models/scaleway/instance/flexibleip.py +52 -0
- cartography/models/scaleway/instance/instance.py +118 -0
- cartography/models/scaleway/organization.py +19 -0
- cartography/models/scaleway/project.py +48 -0
- cartography/models/scaleway/storage/__init__.py +0 -0
- cartography/models/scaleway/storage/snapshot.py +78 -0
- cartography/models/scaleway/storage/volume.py +51 -0
- cartography/models/trivy/__init__.py +0 -0
- cartography/models/trivy/findings.py +66 -0
- cartography/models/trivy/fix.py +66 -0
- cartography/models/trivy/package.py +71 -0
- cartography/sync.py +10 -4
- cartography/util.py +15 -10
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/METADATA +6 -2
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/RECORD +133 -49
- cartography/data/jobs/cleanup/kubernetes_import_cleanup.json +0 -70
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/WHEEL +0 -0
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/entry_points.txt +0 -0
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.104.0rc3.dist-info → cartography-0.106.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
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 TrivyFixNodeProperties(CartographyNodeProperties):
|
|
17
|
+
id: PropertyRef = PropertyRef("id")
|
|
18
|
+
version: PropertyRef = PropertyRef("FixedVersion")
|
|
19
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass(frozen=True)
|
|
23
|
+
class TrivyFixToPackageRelProperties(CartographyRelProperties):
|
|
24
|
+
version: PropertyRef = PropertyRef("FixedVersion")
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
class TrivyFixToPackage(CartographyRelSchema):
|
|
30
|
+
target_node_label: str = "Package"
|
|
31
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
32
|
+
{"id": PropertyRef("PackageId")},
|
|
33
|
+
)
|
|
34
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
35
|
+
rel_label: str = "SHOULD_UPDATE_TO"
|
|
36
|
+
properties: TrivyFixToPackageRelProperties = TrivyFixToPackageRelProperties()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass(frozen=True)
|
|
40
|
+
class TrivyFixToFindingRelProperties(CartographyRelProperties):
|
|
41
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class TrivyFixToFinding(CartographyRelSchema):
|
|
46
|
+
target_node_label: str = "TrivyImageFinding"
|
|
47
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
48
|
+
{"id": PropertyRef("FindingId")},
|
|
49
|
+
)
|
|
50
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
51
|
+
rel_label: str = "APPLIES_TO"
|
|
52
|
+
properties: TrivyFixToFindingRelProperties = TrivyFixToFindingRelProperties()
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@dataclass(frozen=True)
|
|
56
|
+
class TrivyFixSchema(CartographyNodeSchema):
|
|
57
|
+
label: str = "TrivyFix"
|
|
58
|
+
scoped_cleanup: bool = False
|
|
59
|
+
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["Fix"])
|
|
60
|
+
properties: TrivyFixNodeProperties = TrivyFixNodeProperties()
|
|
61
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
62
|
+
[
|
|
63
|
+
TrivyFixToPackage(),
|
|
64
|
+
TrivyFixToFinding(),
|
|
65
|
+
],
|
|
66
|
+
)
|
|
@@ -0,0 +1,71 @@
|
|
|
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 TrivyPackageNodeProperties(CartographyNodeProperties):
|
|
17
|
+
id: PropertyRef = PropertyRef("id")
|
|
18
|
+
installed_version: PropertyRef = PropertyRef("InstalledVersion")
|
|
19
|
+
name: PropertyRef = PropertyRef("PkgName")
|
|
20
|
+
version: PropertyRef = PropertyRef("InstalledVersion")
|
|
21
|
+
class_name: PropertyRef = PropertyRef("Class")
|
|
22
|
+
type: PropertyRef = PropertyRef("Type")
|
|
23
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
class TrivyPackageToImageRelProperties(CartographyRelProperties):
|
|
28
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@dataclass(frozen=True)
|
|
32
|
+
class TrivyPackageToImage(CartographyRelSchema):
|
|
33
|
+
target_node_label: str = "ECRImage"
|
|
34
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
35
|
+
{"id": PropertyRef("ImageDigest")},
|
|
36
|
+
)
|
|
37
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
38
|
+
rel_label: str = "DEPLOYED"
|
|
39
|
+
properties: TrivyPackageToImageRelProperties = TrivyPackageToImageRelProperties()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclass(frozen=True)
|
|
43
|
+
class TrivyPackageToFindingRelProperties(CartographyRelProperties):
|
|
44
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass(frozen=True)
|
|
48
|
+
class TrivyPackageToFinding(CartographyRelSchema):
|
|
49
|
+
target_node_label: str = "TrivyImageFinding"
|
|
50
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
51
|
+
{"id": PropertyRef("FindingId")},
|
|
52
|
+
)
|
|
53
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
54
|
+
rel_label: str = "AFFECTS"
|
|
55
|
+
properties: TrivyPackageToFindingRelProperties = (
|
|
56
|
+
TrivyPackageToFindingRelProperties()
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@dataclass(frozen=True)
|
|
61
|
+
class TrivyPackageSchema(CartographyNodeSchema):
|
|
62
|
+
label: str = "Package"
|
|
63
|
+
scoped_cleanup: bool = False
|
|
64
|
+
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["TrivyPackage"])
|
|
65
|
+
properties: TrivyPackageNodeProperties = TrivyPackageNodeProperties()
|
|
66
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
67
|
+
[
|
|
68
|
+
TrivyPackageToImage(),
|
|
69
|
+
TrivyPackageToFinding(),
|
|
70
|
+
],
|
|
71
|
+
)
|
cartography/sync.py
CHANGED
|
@@ -13,6 +13,7 @@ import neo4j.exceptions
|
|
|
13
13
|
from neo4j import GraphDatabase
|
|
14
14
|
from statsd import StatsClient
|
|
15
15
|
|
|
16
|
+
import cartography.intel.airbyte
|
|
16
17
|
import cartography.intel.analysis
|
|
17
18
|
import cartography.intel.anthropic
|
|
18
19
|
import cartography.intel.aws
|
|
@@ -28,15 +29,19 @@ import cartography.intel.entra
|
|
|
28
29
|
import cartography.intel.gcp
|
|
29
30
|
import cartography.intel.github
|
|
30
31
|
import cartography.intel.gsuite
|
|
32
|
+
import cartography.intel.jamf
|
|
31
33
|
import cartography.intel.kandji
|
|
32
34
|
import cartography.intel.kubernetes
|
|
33
35
|
import cartography.intel.lastpass
|
|
34
36
|
import cartography.intel.oci
|
|
35
37
|
import cartography.intel.okta
|
|
36
38
|
import cartography.intel.openai
|
|
39
|
+
import cartography.intel.pagerduty
|
|
40
|
+
import cartography.intel.scaleway
|
|
37
41
|
import cartography.intel.semgrep
|
|
38
42
|
import cartography.intel.snipeit
|
|
39
43
|
import cartography.intel.tailscale
|
|
44
|
+
import cartography.intel.trivy
|
|
40
45
|
from cartography.config import Config
|
|
41
46
|
from cartography.stats import set_stats_client
|
|
42
47
|
from cartography.util import STATUS_FAILURE
|
|
@@ -48,6 +53,7 @@ logger = logging.getLogger(__name__)
|
|
|
48
53
|
TOP_LEVEL_MODULES = OrderedDict(
|
|
49
54
|
{ # preserve order so that the default sync always runs `analysis` at the very end
|
|
50
55
|
"create-indexes": cartography.intel.create_indexes.run,
|
|
56
|
+
"airbyte": cartography.intel.airbyte.start_airbyte_ingestion,
|
|
51
57
|
"anthropic": cartography.intel.anthropic.start_anthropic_ingestion,
|
|
52
58
|
"aws": cartography.intel.aws.start_aws_ingestion,
|
|
53
59
|
"azure": cartography.intel.azure.start_azure_ingestion,
|
|
@@ -67,9 +73,13 @@ TOP_LEVEL_MODULES = OrderedDict(
|
|
|
67
73
|
"lastpass": cartography.intel.lastpass.start_lastpass_ingestion,
|
|
68
74
|
"bigfix": cartography.intel.bigfix.start_bigfix_ingestion,
|
|
69
75
|
"duo": cartography.intel.duo.start_duo_ingestion,
|
|
76
|
+
"scaleway": cartography.intel.scaleway.start_scaleway_ingestion,
|
|
70
77
|
"semgrep": cartography.intel.semgrep.start_semgrep_ingestion,
|
|
71
78
|
"snipeit": cartography.intel.snipeit.start_snipeit_ingestion,
|
|
72
79
|
"tailscale": cartography.intel.tailscale.start_tailscale_ingestion,
|
|
80
|
+
"jamf": cartography.intel.jamf.start_jamf_ingestion,
|
|
81
|
+
"pagerduty": cartography.intel.pagerduty.start_pagerduty_ingestion,
|
|
82
|
+
"trivy": cartography.intel.trivy.start_trivy_ingestion,
|
|
73
83
|
"analysis": cartography.intel.analysis.run,
|
|
74
84
|
}
|
|
75
85
|
)
|
|
@@ -201,10 +211,6 @@ class Sync:
|
|
|
201
211
|
return available_modules
|
|
202
212
|
|
|
203
213
|
|
|
204
|
-
# Used to avoid repeatedly calling Sync.list_intel_modules()
|
|
205
|
-
TOP_LEVEL_MODULES = Sync.list_intel_modules()
|
|
206
|
-
|
|
207
|
-
|
|
208
214
|
def run_with_config(sync: Sync, config: Union[Config, argparse.Namespace]) -> int:
|
|
209
215
|
"""
|
|
210
216
|
Execute the cartography.sync.Sync.run method with parameters built from the given configuration object.
|
cartography/util.py
CHANGED
|
@@ -5,6 +5,7 @@ from functools import partial
|
|
|
5
5
|
from functools import wraps
|
|
6
6
|
from importlib.resources import open_binary
|
|
7
7
|
from importlib.resources import read_text
|
|
8
|
+
from itertools import islice
|
|
8
9
|
from string import Template
|
|
9
10
|
from typing import Any
|
|
10
11
|
from typing import Awaitable
|
|
@@ -37,6 +38,7 @@ STATUS_SUCCESS = 0
|
|
|
37
38
|
STATUS_FAILURE = 1
|
|
38
39
|
STATUS_KEYBOARD_INTERRUPT = 130
|
|
39
40
|
DEFAULT_BATCH_SIZE = 1000
|
|
41
|
+
DEFAULT_MAX_PAGES = 10000
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
def run_analysis_job(
|
|
@@ -208,26 +210,28 @@ def aws_paginate(
|
|
|
208
210
|
client: boto3.client,
|
|
209
211
|
method_name: str,
|
|
210
212
|
object_name: str,
|
|
213
|
+
max_pages: int | None = DEFAULT_MAX_PAGES,
|
|
211
214
|
**kwargs: Any,
|
|
212
|
-
) ->
|
|
215
|
+
) -> Iterable[Dict]:
|
|
213
216
|
"""
|
|
214
217
|
Helper method for boilerplate boto3 pagination
|
|
215
218
|
The **kwargs will be forwarded to the paginator
|
|
216
219
|
"""
|
|
217
220
|
paginator = client.get_paginator(method_name)
|
|
218
|
-
items = []
|
|
219
|
-
i = 0
|
|
220
221
|
for i, page in enumerate(paginator.paginate(**kwargs), start=1):
|
|
221
222
|
if i % 100 == 0:
|
|
222
223
|
logger.info(f"fetching page number {i}")
|
|
223
224
|
if object_name in page:
|
|
224
|
-
items
|
|
225
|
+
items = page[object_name]
|
|
226
|
+
yield from items
|
|
225
227
|
else:
|
|
226
228
|
logger.warning(
|
|
227
229
|
f"""aws_paginate: Key "{object_name}" is not present, check if this is a typo.
|
|
228
230
|
If not, then the AWS datatype somehow does not have this key.""",
|
|
229
231
|
)
|
|
230
|
-
|
|
232
|
+
if max_pages is not None and i >= max_pages:
|
|
233
|
+
logger.warning(f"Reached max batch size of {max_pages} pages")
|
|
234
|
+
break
|
|
231
235
|
|
|
232
236
|
|
|
233
237
|
AWSGetFunc = TypeVar("AWSGetFunc", bound=Callable[..., Iterable])
|
|
@@ -353,17 +357,18 @@ def camel_to_snake(name: str) -> str:
|
|
|
353
357
|
return re.sub(r"(?<!^)(?=[A-Z])", "_", name).lower()
|
|
354
358
|
|
|
355
359
|
|
|
356
|
-
def batch(items: Iterable, size: int = DEFAULT_BATCH_SIZE) -> List[
|
|
360
|
+
def batch(items: Iterable, size: int = DEFAULT_BATCH_SIZE) -> Iterable[List[Any]]:
|
|
357
361
|
"""
|
|
358
|
-
Takes an Iterable of items and returns a
|
|
362
|
+
Takes an Iterable of items and returns a Generator of lists of the same items,
|
|
359
363
|
batched into chunks of the provided `size`.
|
|
360
364
|
|
|
361
365
|
Use:
|
|
362
366
|
x = [1,2,3,4,5,6,7,8]
|
|
363
|
-
batch(x, size=3) -> [
|
|
367
|
+
batch(x, size=3) -> Iterator yielding [1, 2, 3], [4, 5, 6], [7, 8]
|
|
364
368
|
"""
|
|
365
|
-
|
|
366
|
-
|
|
369
|
+
it = iter(items)
|
|
370
|
+
while chunk := list(islice(it, size)):
|
|
371
|
+
yield chunk
|
|
367
372
|
|
|
368
373
|
|
|
369
374
|
def is_throttling_exception(exc: Exception) -> bool:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cartography
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.106.0
|
|
4
4
|
Summary: Explore assets and their relationships across your technical infrastructure.
|
|
5
5
|
Maintainer: Cartography Contributors
|
|
6
6
|
License: apache2
|
|
@@ -55,6 +55,7 @@ Requires-Dist: python-dateutil
|
|
|
55
55
|
Requires-Dist: xmltodict
|
|
56
56
|
Requires-Dist: duo-client
|
|
57
57
|
Requires-Dist: cloudflare<5.0.0,>=4.1.0
|
|
58
|
+
Requires-Dist: scaleway>=2.9.0
|
|
58
59
|
Dynamic: license-file
|
|
59
60
|
|
|
60
61
|

|
|
@@ -80,7 +81,7 @@ You can learn more about the story behind Cartography in our [presentation at BS
|
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
## Supported platforms
|
|
83
|
-
- [Amazon Web Services](https://cartography-cncf.github.io/cartography/modules/aws/index.html) - API Gateway, CloudWatch, 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
|
|
84
|
+
- [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
|
|
84
85
|
- [Google Cloud Platform](https://cartography-cncf.github.io/cartography/modules/gcp/index.html) - Cloud Resource Manager, Compute, DNS, Storage, Google Kubernetes Engine
|
|
85
86
|
- [Google GSuite](https://cartography-cncf.github.io/cartography/modules/gsuite/index.html) - users, groups
|
|
86
87
|
- [Oracle Cloud Infrastructure](https://cartography-cncf.github.io/cartography/modules/oci/index.html) - IAM
|
|
@@ -102,6 +103,9 @@ You can learn more about the story behind Cartography in our [presentation at BS
|
|
|
102
103
|
- [Cloudflare](https://cartography-cncf.github.io/cartography/modules/cloudflare/index.html) - Account, Role, Member, Zone, DNSRecord
|
|
103
104
|
- [OpenAI](https://cartography-cncf.github.io/cartography/modules/openai/index.html) - Organization, AdminApiKey, User, Project, ServiceAccount, ApiKey
|
|
104
105
|
- [Anthropic](https://cartography-cncf.github.io/cartography/modules/anthropic/index.html) - Organization, ApiKey, User, Workspace
|
|
106
|
+
- [Airbyte](https://cartography-cncf.github.io/cartography/modules/airbyte/index.html) - Organization, Workspace, User, Source, Destination, Connection, Tag, Stream
|
|
107
|
+
- [Trivy Scanner](https://cartography-cncf.github.io/cartography/modules/trivy/index.html) - AWS ECR Images
|
|
108
|
+
- [Scaleway](https://cartography-cncf.github.io/cartography/modules/scaleway/index.html) - Projects, IAM, Local Storage, Instances
|
|
105
109
|
|
|
106
110
|
|
|
107
111
|
## Philosophy
|