cartography 0.94.0rc3__py3-none-any.whl → 0.95.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cartography might be problematic. Click here for more details.
- cartography/cli.py +42 -24
- cartography/config.py +12 -8
- cartography/data/indexes.cypher +0 -2
- cartography/driftdetect/cli.py +1 -1
- cartography/graph/job.py +8 -1
- cartography/intel/aws/permission_relationships.py +6 -2
- cartography/intel/gcp/__init__.py +110 -23
- cartography/intel/kandji/__init__.py +1 -1
- cartography/intel/snipeit/__init__.py +30 -0
- cartography/intel/snipeit/asset.py +74 -0
- cartography/intel/snipeit/user.py +75 -0
- cartography/intel/snipeit/util.py +35 -0
- cartography/models/snipeit/__init__.py +0 -0
- cartography/models/snipeit/asset.py +81 -0
- cartography/models/snipeit/tenant.py +17 -0
- cartography/models/snipeit/user.py +49 -0
- cartography/sync.py +2 -2
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/LICENSE +1 -1
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/METADATA +3 -5
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/RECORD +23 -19
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/WHEEL +1 -1
- cartography/data/jobs/cleanup/crxcavator_import_cleanup.json +0 -18
- cartography/intel/crxcavator/__init__.py +0 -44
- cartography/intel/crxcavator/crxcavator.py +0 -329
- cartography-0.94.0rc3.dist-info/NOTICE +0 -4
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/entry_points.txt +0 -0
- {cartography-0.94.0rc3.dist-info → cartography-0.95.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
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 SnipeitAssetNodeProperties(CartographyNodeProperties):
|
|
16
|
+
"""
|
|
17
|
+
https://snipe-it.readme.io/reference/hardware-list
|
|
18
|
+
"""
|
|
19
|
+
# Common properties
|
|
20
|
+
id: PropertyRef = PropertyRef('id')
|
|
21
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
22
|
+
|
|
23
|
+
# SnipeIT specific properties
|
|
24
|
+
asset_tag: PropertyRef = PropertyRef('asset_tag')
|
|
25
|
+
assigned_to: PropertyRef = PropertyRef('assigned_to.email')
|
|
26
|
+
category: PropertyRef = PropertyRef('category.name')
|
|
27
|
+
company: PropertyRef = PropertyRef('company.name')
|
|
28
|
+
manufacturer: PropertyRef = PropertyRef('manufacturer.name')
|
|
29
|
+
model: PropertyRef = PropertyRef('model.name')
|
|
30
|
+
serial: PropertyRef = PropertyRef('serial', extra_index=True)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
###
|
|
34
|
+
# (:SnipeitAsset)<-[:ASSET]-(:SnipeitTenant)
|
|
35
|
+
###
|
|
36
|
+
@dataclass(frozen=True)
|
|
37
|
+
class SnipeitTenantToSnipeitAssetRelProperties(CartographyRelProperties):
|
|
38
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@dataclass(frozen=True)
|
|
42
|
+
class SnipeitTenantToSnipeitAssetRel(CartographyRelSchema):
|
|
43
|
+
target_node_label: str = 'SnipeitTenant'
|
|
44
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
45
|
+
{'id': PropertyRef('TENANT_ID', set_in_kwargs=True)},
|
|
46
|
+
)
|
|
47
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
48
|
+
rel_label: str = "HAS_ASSET"
|
|
49
|
+
properties: SnipeitTenantToSnipeitAssetRelProperties = SnipeitTenantToSnipeitAssetRelProperties()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
###
|
|
53
|
+
# (:SnipeitUser)-[:HAS_CHECKED_OUT]->(:SnipeitAsset)
|
|
54
|
+
###
|
|
55
|
+
@dataclass(frozen=True)
|
|
56
|
+
class SnipeitUserToSnipeitAssetProperties(CartographyRelProperties):
|
|
57
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@dataclass(frozen=True)
|
|
61
|
+
class SnipeitUserToSnipeitAssetRel(CartographyRelSchema):
|
|
62
|
+
target_node_label: str = 'SnipeitUser'
|
|
63
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
64
|
+
{'email': PropertyRef('assigned_to.email')},
|
|
65
|
+
)
|
|
66
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
67
|
+
rel_label: str = "HAS_CHECKED_OUT"
|
|
68
|
+
properties: SnipeitUserToSnipeitAssetProperties = SnipeitUserToSnipeitAssetProperties()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
###
|
|
72
|
+
@dataclass(frozen=True)
|
|
73
|
+
class SnipeitAssetSchema(CartographyNodeSchema):
|
|
74
|
+
label: str = 'SnipeitAsset' # The label of the node
|
|
75
|
+
properties: SnipeitAssetNodeProperties = SnipeitAssetNodeProperties() # An object representing all properties
|
|
76
|
+
sub_resource_relationship: SnipeitTenantToSnipeitAssetRel = SnipeitTenantToSnipeitAssetRel()
|
|
77
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
78
|
+
[
|
|
79
|
+
SnipeitUserToSnipeitAssetRel(),
|
|
80
|
+
],
|
|
81
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True)
|
|
9
|
+
class SnipeitTenantNodeProperties(CartographyNodeProperties):
|
|
10
|
+
id: PropertyRef = PropertyRef('id')
|
|
11
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class SnipeitTenantSchema(CartographyNodeSchema):
|
|
16
|
+
label: str = 'SnipeitTenant' # The label of the node
|
|
17
|
+
properties: SnipeitTenantNodeProperties = SnipeitTenantNodeProperties() # An object representing all properties
|
|
@@ -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 SnipeitUserNodeProperties(CartographyNodeProperties):
|
|
15
|
+
"""
|
|
16
|
+
Ref: https://snipe-it.readme.io/reference/users
|
|
17
|
+
"""
|
|
18
|
+
# Common properties
|
|
19
|
+
id: PropertyRef = PropertyRef('id')
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
21
|
+
|
|
22
|
+
# SnipeIT specific properties
|
|
23
|
+
company: PropertyRef = PropertyRef('company_id.name', extra_index=True)
|
|
24
|
+
email: PropertyRef = PropertyRef('email', extra_index=True)
|
|
25
|
+
username: PropertyRef = PropertyRef('username')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True)
|
|
29
|
+
class SnipeitTenantToSnipeitUserRelProperties(CartographyRelProperties):
|
|
30
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
# (:SnipeitTenant)-[:HAS_USER]->(:SnipeitUser)
|
|
35
|
+
class SnipeitTenantToSnipeitUserRel(CartographyRelSchema):
|
|
36
|
+
target_node_label: str = 'SnipeitTenant'
|
|
37
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
38
|
+
{'id': PropertyRef('TENANT_ID', set_in_kwargs=True)},
|
|
39
|
+
)
|
|
40
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
41
|
+
rel_label: str = "HAS_USER"
|
|
42
|
+
properties: SnipeitTenantToSnipeitUserRelProperties = SnipeitTenantToSnipeitUserRelProperties()
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class SnipeitUserSchema(CartographyNodeSchema):
|
|
47
|
+
label: str = 'SnipeitUser' # The label of the node
|
|
48
|
+
properties: SnipeitUserNodeProperties = SnipeitUserNodeProperties() # An object representing all properties
|
|
49
|
+
sub_resource_relationship: SnipeitTenantToSnipeitUserRel = SnipeitTenantToSnipeitUserRel()
|
cartography/sync.py
CHANGED
|
@@ -17,7 +17,6 @@ import cartography.intel.azure
|
|
|
17
17
|
import cartography.intel.bigfix
|
|
18
18
|
import cartography.intel.create_indexes
|
|
19
19
|
import cartography.intel.crowdstrike
|
|
20
|
-
import cartography.intel.crxcavator.crxcavator
|
|
21
20
|
import cartography.intel.cve
|
|
22
21
|
import cartography.intel.digitalocean
|
|
23
22
|
import cartography.intel.duo
|
|
@@ -30,6 +29,7 @@ import cartography.intel.lastpass
|
|
|
30
29
|
import cartography.intel.oci
|
|
31
30
|
import cartography.intel.okta
|
|
32
31
|
import cartography.intel.semgrep
|
|
32
|
+
import cartography.intel.snipeit
|
|
33
33
|
from cartography.config import Config
|
|
34
34
|
from cartography.stats import set_stats_client
|
|
35
35
|
from cartography.util import STATUS_FAILURE
|
|
@@ -45,7 +45,6 @@ TOP_LEVEL_MODULES = OrderedDict({ # preserve order so that the default sync alw
|
|
|
45
45
|
'crowdstrike': cartography.intel.crowdstrike.start_crowdstrike_ingestion,
|
|
46
46
|
'gcp': cartography.intel.gcp.start_gcp_ingestion,
|
|
47
47
|
'gsuite': cartography.intel.gsuite.start_gsuite_ingestion,
|
|
48
|
-
'crxcavator': cartography.intel.crxcavator.start_extension_ingestion,
|
|
49
48
|
'cve': cartography.intel.cve.start_cve_ingestion,
|
|
50
49
|
'oci': cartography.intel.oci.start_oci_ingestion,
|
|
51
50
|
'okta': cartography.intel.okta.start_okta_ingestion,
|
|
@@ -57,6 +56,7 @@ TOP_LEVEL_MODULES = OrderedDict({ # preserve order so that the default sync alw
|
|
|
57
56
|
'bigfix': cartography.intel.bigfix.start_bigfix_ingestion,
|
|
58
57
|
'duo': cartography.intel.duo.start_duo_ingestion,
|
|
59
58
|
'semgrep': cartography.intel.semgrep.start_semgrep_ingestion,
|
|
59
|
+
'snipeit': cartography.intel.snipeit.start_snipeit_ingestion,
|
|
60
60
|
'analysis': cartography.intel.analysis.run,
|
|
61
61
|
})
|
|
62
62
|
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
190
|
+
Copyright 2024 The Linux Foundation
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
193
|
you may not use this file except in compliance with the License.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cartography
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.95.0rc1
|
|
4
4
|
Summary: Explore assets and their relationships across your technical infrastructure.
|
|
5
|
-
Home-page: https://www.github.com/
|
|
6
|
-
Maintainer:
|
|
7
|
-
Maintainer-email: security@lyft.com
|
|
5
|
+
Home-page: https://www.github.com/cartography-cncf/cartography
|
|
6
|
+
Maintainer: Cartography Contributors
|
|
8
7
|
License: apache2
|
|
9
8
|
Classifier: Development Status :: 4 - Beta
|
|
10
9
|
Classifier: Intended Audience :: Developers
|
|
@@ -18,7 +17,6 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
18
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
18
|
Description-Content-Type: text/markdown
|
|
20
19
|
License-File: LICENSE
|
|
21
|
-
License-File: NOTICE
|
|
22
20
|
Requires-Dist: backoff >=2.1.2
|
|
23
21
|
Requires-Dist: boto3 >=1.15.1
|
|
24
22
|
Requires-Dist: botocore >=1.18.1
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
cartography/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
cartography/__main__.py,sha256=JftXT_nUPkqcEh8uxCCT4n-OyHYqbldEgrDS-4ygy0U,101
|
|
3
|
-
cartography/cli.py,sha256=
|
|
4
|
-
cartography/config.py,sha256=
|
|
3
|
+
cartography/cli.py,sha256=tfIPOMh3DtQG7Dgmg9rNNqoTcxgocBu45k88CAM09Nk,32368
|
|
4
|
+
cartography/config.py,sha256=QbFqwUb6P8-wdkf4ljE5HJhduXl_3Gt2xzBQRayq0sg,11566
|
|
5
5
|
cartography/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
cartography/stats.py,sha256=dbybb9V2FuvSuHjjNwz6Vjwnd1hap2C7h960rLoKcl8,4406
|
|
7
|
-
cartography/sync.py,sha256=
|
|
7
|
+
cartography/sync.py,sha256=ziD63T_774gXSuD5zdz6fLGvv1Kt2ntQySSVbmcCZb8,9708
|
|
8
8
|
cartography/util.py,sha256=umfnjX8jVLu0rpYA75X-WvRpYzHQxns9qZiPwfyAlwQ,14478
|
|
9
9
|
cartography/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
cartography/client/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -12,7 +12,7 @@ cartography/client/aws/iam.py,sha256=dYsGikc36DEsSeR2XVOVFFUDwuU9yWj_EVkpgVYCFgM
|
|
|
12
12
|
cartography/client/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
cartography/client/core/tx.py,sha256=4_kTBxrtlwsOM-e8Xtjf7wmmzwZ-DGRJL0rPFp0Xj0Q,10805
|
|
14
14
|
cartography/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
cartography/data/indexes.cypher,sha256=
|
|
15
|
+
cartography/data/indexes.cypher,sha256=Ha8VemktSz8ikIS4On-8FTiv2-WwRx5j3l02gQnSWXk,27262
|
|
16
16
|
cartography/data/permission_relationships.yaml,sha256=RuKGGc_3ZUQ7ag0MssB8k_zaonCkVM5E8I_svBWTmGc,969
|
|
17
17
|
cartography/data/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
cartography/data/jobs/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -88,7 +88,6 @@ cartography/data/jobs/cleanup/azure_storage_account_cleanup.json,sha256=XZdjKDOj
|
|
|
88
88
|
cartography/data/jobs/cleanup/azure_subscriptions_cleanup.json,sha256=bowUBCjHYlC4Xd60lv33sxRi-bv1wiT5gAOStaHMX4k,430
|
|
89
89
|
cartography/data/jobs/cleanup/azure_tenant_cleanup.json,sha256=jcjmZH6kfVGZ9q68rfvnroF0kNNHZ2uTZQ17Rmd4FH0,220
|
|
90
90
|
cartography/data/jobs/cleanup/crowdstrike_import_cleanup.json,sha256=bBPwftvz1iMUKrqKFCFZEH3LgVRzg-t5fRUh6Chx-vo,1426
|
|
91
|
-
cartography/data/jobs/cleanup/crxcavator_import_cleanup.json,sha256=IvGVD_lRR-0nEPorq3vhVKmO2R1bKBpivujJIxVo3hE,607
|
|
92
91
|
cartography/data/jobs/cleanup/digitalocean_droplet_cleanup.json,sha256=f26TdPUPYnIp45ipPys5M6VVfConUZySIbkgSr3iQno,703
|
|
93
92
|
cartography/data/jobs/cleanup/digitalocean_project_cleanup.json,sha256=5mo9vPshCdUZfgTWd_22_TLSyfe6hd41u7z-B8H1qgY,702
|
|
94
93
|
cartography/data/jobs/cleanup/gcp_compute_firewall_cleanup.json,sha256=FVNJ8EPaPhmQ_sh4vyTdMyEgs6Y-DIoFTdWJaELgz44,1904
|
|
@@ -122,7 +121,7 @@ cartography/data/jobs/scoped_analysis/semgrep_sca_risk_analysis.json,sha256=eIYx
|
|
|
122
121
|
cartography/driftdetect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
122
|
cartography/driftdetect/__main__.py,sha256=Sz24Kxy5x6RC3GQEkuUDXzjOV3SvlHVkZdvPl1GLl5E,125
|
|
124
123
|
cartography/driftdetect/add_shortcut.py,sha256=COtcCW9T0ss-bP1B2y9gEk3kN6HA01kkurSiDBNLzco,2377
|
|
125
|
-
cartography/driftdetect/cli.py,sha256=
|
|
124
|
+
cartography/driftdetect/cli.py,sha256=SiNTsVtxCyMUoTzjCMkSUQ-TYPceGoZ67hp8eejp71k,9172
|
|
126
125
|
cartography/driftdetect/config.py,sha256=wHx1RmKRU3fJ9xD8Nf62uIFGOoaohgyqrFIAy-Fc_xM,2974
|
|
127
126
|
cartography/driftdetect/detect_deviations.py,sha256=pfNce5VWfs_oNNI2-PFgOAOzZ8YPprrE7LxdBo27kqU,4349
|
|
128
127
|
cartography/driftdetect/get_states.py,sha256=iAAoIqItZx-dHV9OmWIhHy0YjhHA1AH8DGtUwp6YO1c,5965
|
|
@@ -135,7 +134,7 @@ cartography/driftdetect/util.py,sha256=Lqxv8QoFn3_3Fz18qCOjkjJ6yBwgrHjrxXmArBAEd
|
|
|
135
134
|
cartography/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
135
|
cartography/graph/cleanupbuilder.py,sha256=87vFrOJo66hOrrqeNwXp18WrNQEheHTlZko9KUkXWhY,8021
|
|
137
136
|
cartography/graph/context.py,sha256=RGxGb8EnxowcqjR0nFF86baNhgRHeUF9wjIoFUoG8LU,1230
|
|
138
|
-
cartography/graph/job.py,sha256=
|
|
137
|
+
cartography/graph/job.py,sha256=RZWsbNhHuJlcSpw4C73ZuovRTp7kGrcm3X9yUH8vT1Q,7488
|
|
139
138
|
cartography/graph/querybuilder.py,sha256=MMXzUEg4td-YmHMNM97KAqDZ6-1wNClO2jmJoG47BTY,20108
|
|
140
139
|
cartography/graph/statement.py,sha256=VsqG46ty_Mm87fr8YdIwfr6a82OUXU7yZe6S-Py9hZg,5345
|
|
141
140
|
cartography/intel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -157,7 +156,7 @@ cartography/intel/aws/inspector.py,sha256=S22ZgRKEnmnBTJ-u0rodqRPB7_LkSIek47NeBx
|
|
|
157
156
|
cartography/intel/aws/kms.py,sha256=bZUzMxAH_DsAcGTJBs08gg2tLKYu-QWjvMvV9C-6v50,11731
|
|
158
157
|
cartography/intel/aws/lambda_function.py,sha256=KKTyn53xpaMI9WvIqxmsOASFwflHt-2_5ow-zUFc2wg,9890
|
|
159
158
|
cartography/intel/aws/organizations.py,sha256=HaQZ3J5XF15BuykuDypqFORDYpnoHuRRr4DuceewH4s,4485
|
|
160
|
-
cartography/intel/aws/permission_relationships.py,sha256=
|
|
159
|
+
cartography/intel/aws/permission_relationships.py,sha256=IarV9gt5BaplZ5TPo_mfypt9bTKfT9qDtqC3Ob89qGI,14904
|
|
161
160
|
cartography/intel/aws/rds.py,sha256=vnlNYmrO2Cc0PNn31CeG2QwYhwjVosbQFE9Ol1vQyLE,25252
|
|
162
161
|
cartography/intel/aws/redshift.py,sha256=KOqiXIllHmtPTeaNGl-cX4srY5pFE6o12j8MQ5-zWpc,6694
|
|
163
162
|
cartography/intel/aws/resourcegroupstaggingapi.py,sha256=aq4kPF6t8QZZoTxdkQVLXH65Di41CDJVM9llJNe6iaY,10278
|
|
@@ -206,8 +205,6 @@ cartography/intel/crowdstrike/__init__.py,sha256=dAtgI-0vZAQZ3cTFQhMEzzt7aqiNSNu
|
|
|
206
205
|
cartography/intel/crowdstrike/endpoints.py,sha256=tdqokMDW3p4fK3dHKKb2T1DTogvOJBCpwyrxdQlbUhw,3815
|
|
207
206
|
cartography/intel/crowdstrike/spotlight.py,sha256=yNhj44-RYF6ubck-hHMKhKiNU0fCfhQf4Oagopc31EM,4754
|
|
208
207
|
cartography/intel/crowdstrike/util.py,sha256=gfJ6Ptr6YdbBS9Qj9a_-Jc-IJroADDRcXqjh5TW0qXE,277
|
|
209
|
-
cartography/intel/crxcavator/__init__.py,sha256=VM6N_7dMagzuQQjUeFgqrt2_d2Is9ugDMTrgKke2c0g,1606
|
|
210
|
-
cartography/intel/crxcavator/crxcavator.py,sha256=tnx6bq8Oz020mhMDmx8gKZ_ro_0UvUGeWrshmFr7bBw,13797
|
|
211
208
|
cartography/intel/cve/__init__.py,sha256=A7XjKQSanmwMSIXSum1qJSegtYcQCuz_713RU-bFQz8,2504
|
|
212
209
|
cartography/intel/cve/feed.py,sha256=JkfRV18JoydOuncKR1y3s8esuN2Xk4gIB6viKNXU_X0,10020
|
|
213
210
|
cartography/intel/digitalocean/__init__.py,sha256=SMYB7LGIQOj_EgGSGVjWZk7SJNbP43hQuOfgOu6xYm4,1526
|
|
@@ -222,7 +219,7 @@ cartography/intel/duo/phones.py,sha256=ueJheqSLD2xYcMus5eOiixPYS3_xVjgQzeomjV2a6
|
|
|
222
219
|
cartography/intel/duo/tokens.py,sha256=bEEnjfc4waQnkRHVSnZLAeGE8wHOOZL7FA9m80GGQdQ,2396
|
|
223
220
|
cartography/intel/duo/users.py,sha256=lc7ly_XKeUjJ50szw31WT_GiCrZfGKJv1zVUpmTchh4,4097
|
|
224
221
|
cartography/intel/duo/web_authn_credentials.py,sha256=IbDf3CWqfEyI7f9zJugUvoDd6vZOECfb_7ANZaRYzuk,2636
|
|
225
|
-
cartography/intel/gcp/__init__.py,sha256=
|
|
222
|
+
cartography/intel/gcp/__init__.py,sha256=jJOT6Ys97qm1W0jGXFwtSOOSGPa7q-Xxr1YIR8fKejo,15849
|
|
226
223
|
cartography/intel/gcp/compute.py,sha256=CH2cBdOwbLZCAbkfRJkkI-sFybXVKRWEUGDJANQmvyA,48333
|
|
227
224
|
cartography/intel/gcp/crm.py,sha256=Uw5PILhVFhpM8gq7uu2v7F_YikDW3gsTZ3d7-e8Z1_k,12324
|
|
228
225
|
cartography/intel/gcp/dns.py,sha256=y2pvbmV04cnrMyuu_nbW3oc7uwHX6yEzn1n7veCsjmk,7748
|
|
@@ -238,7 +235,7 @@ cartography/intel/gsuite/api.py,sha256=J0dkNdfBVMrEv8vvStQu7YKVxXSyV45WueFhUS4aO
|
|
|
238
235
|
cartography/intel/jamf/__init__.py,sha256=Nof-LrUeevoieo6oP2GyfTwx8k5TUIgreW6hSj53YjQ,419
|
|
239
236
|
cartography/intel/jamf/computers.py,sha256=EfjlupQ-9HYTjOrmuwrGuJDy9ApAnJvk8WrYcp6_Jkk,1673
|
|
240
237
|
cartography/intel/jamf/util.py,sha256=EAyP8VpOY2uAvW3HtX6r7qORNjGa1Tr3fuqezuLQ0j4,1017
|
|
241
|
-
cartography/intel/kandji/__init__.py,sha256=
|
|
238
|
+
cartography/intel/kandji/__init__.py,sha256=Y38bVRmrGVJRy0mSof8xU-cuEyJ7N_oI7KekYjYyuiQ,1076
|
|
242
239
|
cartography/intel/kandji/devices.py,sha256=j_rP6rQ5VPT_XEcGXx7Yt6eCOm1Oe3I2qWIxXODXEcA,2224
|
|
243
240
|
cartography/intel/kubernetes/__init__.py,sha256=jaOTEanWnTrYvcBN1XUC5oqBhz1AJbFmzoT9uu_VBSg,1481
|
|
244
241
|
cartography/intel/kubernetes/namespaces.py,sha256=6o-FgAX_Ai5NCj2xOWM-RNWEvn0gZjVQnZSGCJlcIhw,2710
|
|
@@ -272,6 +269,10 @@ cartography/intel/pagerduty/users.py,sha256=oltGssxrnzYsV6QTGP1SsPoA1rCUDStj6vGl
|
|
|
272
269
|
cartography/intel/pagerduty/vendors.py,sha256=WlDHExrWRBegDQKtxBV5nJiYgwoTLxNee4HrQDJ-Pdg,1559
|
|
273
270
|
cartography/intel/semgrep/__init__.py,sha256=94vjdszGEosvXiKtYWKD34BRKwRbJxlBO1PZcKdxnFA,619
|
|
274
271
|
cartography/intel/semgrep/findings.py,sha256=9MSbDFrRUqb5nkEWN0R9Fx57RJMt27-9obpIHXNd45Y,10836
|
|
272
|
+
cartography/intel/snipeit/__init__.py,sha256=0uIh8NbuI7IbfgaOrPHg4Nfm1yO6mTRC_qaFiIjR2FA,992
|
|
273
|
+
cartography/intel/snipeit/asset.py,sha256=KkGRUgIydvf_6SHtgpVLT-TjtEGz029SrOaoh0qDW6E,1997
|
|
274
|
+
cartography/intel/snipeit/user.py,sha256=hm9v_p29bphHtGe9LKVo1FD_rQcbCigrCRf8YsmteXA,1971
|
|
275
|
+
cartography/intel/snipeit/util.py,sha256=fXlzdFQXm01Oaa2REYNN7x3y3k2l3zCVhf_BxcRUELY,1040
|
|
275
276
|
cartography/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
276
277
|
cartography/models/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
277
278
|
cartography/models/aws/emr.py,sha256=TkuwoZnw_VHbJ5bwkac7-ZfwSLe_TeK3gxkuwGQOUk4,3037
|
|
@@ -332,10 +333,13 @@ cartography/models/semgrep/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
332
333
|
cartography/models/semgrep/deployment.py,sha256=or5qZDuR51MXzINpH15jZrqmSUvXQevCNYWJ7D6v-JI,745
|
|
333
334
|
cartography/models/semgrep/findings.py,sha256=RPd-QzvP38fbTIqFARx6XpcZSsd5JM3KIg-ZlJA7NlE,5490
|
|
334
335
|
cartography/models/semgrep/locations.py,sha256=kSk7Nn5Mn4Ob84MVZOo2GR0YFi-9Okq9pgA3FfC6_bk,3061
|
|
335
|
-
cartography
|
|
336
|
-
cartography
|
|
337
|
-
cartography
|
|
338
|
-
cartography
|
|
339
|
-
cartography-0.
|
|
340
|
-
cartography-0.
|
|
341
|
-
cartography-0.
|
|
336
|
+
cartography/models/snipeit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
337
|
+
cartography/models/snipeit/asset.py,sha256=FyRAaeXuZjMy0eUQcSDFcgEAF5lbLMlvqp1Tv9d3Lv4,3238
|
|
338
|
+
cartography/models/snipeit/tenant.py,sha256=p4rFnpNNuF1W5ilGBbexDaETWTwavfb38RcQGoImkQI,679
|
|
339
|
+
cartography/models/snipeit/user.py,sha256=MsB4MiCVNTH6JpESime7cOkB89autZOXQpL6Z0l7L6o,2113
|
|
340
|
+
cartography-0.95.0rc1.dist-info/LICENSE,sha256=kvLEBRYaQ1RvUni6y7Ti9uHeooqnjPoo6n_-0JO1ETc,11351
|
|
341
|
+
cartography-0.95.0rc1.dist-info/METADATA,sha256=t7FVdB2ipkDkwlWl-x_N60Oaa_1VBd30eU0virQyKOE,1966
|
|
342
|
+
cartography-0.95.0rc1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
343
|
+
cartography-0.95.0rc1.dist-info/entry_points.txt,sha256=GVIAWD0o0_K077qMA_k1oZU4v-M0a8GLKGJR8tZ-qH8,112
|
|
344
|
+
cartography-0.95.0rc1.dist-info/top_level.txt,sha256=BHqsNJQiI6Q72DeypC1IINQJE59SLhU4nllbQjgJi9g,12
|
|
345
|
+
cartography-0.95.0rc1.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"statements": [{
|
|
3
|
-
"query": "MATCH (n:ChromeExtension) WHERE n.lastupdated <> $UPDATE_TAG WITH n LIMIT $LIMIT_SIZE DETACH DELETE (n)",
|
|
4
|
-
"iterative": true,
|
|
5
|
-
"iterationsize": 100
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"query": "MATCH (n:GSuiteUser) WHERE n.lastupdated <> $UPDATE_TAG WITH n LIMIT $LIMIT_SIZE DETACH DELETE (n)",
|
|
9
|
-
"iterative": true,
|
|
10
|
-
"iterationsize": 100
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"query": "MATCH (GSuiteUser)-[r:INSTALLS]->(:ChromeExtension) WHERE r.lastupdated <> $UPDATE_TAG WITH r LIMIT $LIMIT_SIZE DELETE (r)",
|
|
14
|
-
"iterative": true,
|
|
15
|
-
"iterationsize": 100
|
|
16
|
-
}],
|
|
17
|
-
"name": "cleanup CRXcavator extensions"
|
|
18
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
import neo4j
|
|
4
|
-
from requests import exceptions
|
|
5
|
-
|
|
6
|
-
from cartography.config import Config
|
|
7
|
-
from cartography.intel.crxcavator.crxcavator import sync_extensions
|
|
8
|
-
from cartography.util import run_cleanup_job
|
|
9
|
-
from cartography.util import timeit
|
|
10
|
-
|
|
11
|
-
logger = logging.getLogger(__name__)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@timeit
|
|
15
|
-
def start_extension_ingestion(neo4j_session: neo4j.Session, config: Config) -> None:
|
|
16
|
-
"""
|
|
17
|
-
If this module is configured, perform ingestion of CRXcavator data. Otherwise warn and exit
|
|
18
|
-
:param neo4j_session: Neo4J session for database interface
|
|
19
|
-
:param config: A cartography.config object
|
|
20
|
-
:return: None
|
|
21
|
-
"""
|
|
22
|
-
if not config.crxcavator_api_base_uri or not config.crxcavator_api_key:
|
|
23
|
-
logger.warning('CRXcavator import is not configured - skipping this module. See docs to configure.')
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
common_job_parameters = {
|
|
27
|
-
"UPDATE_TAG": config.update_tag,
|
|
28
|
-
}
|
|
29
|
-
# while we typically want to crash sync on failure of module,
|
|
30
|
-
# the crxcavator API is still in beta and is not always available.
|
|
31
|
-
# if we receive a requests exception from raise_for_status
|
|
32
|
-
# we'll handle and continue with other modules, otherwise crash sync
|
|
33
|
-
try:
|
|
34
|
-
sync_extensions(
|
|
35
|
-
neo4j_session, common_job_parameters, config.crxcavator_api_key,
|
|
36
|
-
config.crxcavator_api_base_uri,
|
|
37
|
-
)
|
|
38
|
-
run_cleanup_job(
|
|
39
|
-
'crxcavator_import_cleanup.json',
|
|
40
|
-
neo4j_session,
|
|
41
|
-
common_job_parameters,
|
|
42
|
-
)
|
|
43
|
-
except exceptions.RequestException as e:
|
|
44
|
-
logger.error("Could not complete request to the CRXcavator API: {}", e)
|