cartography 0.98.0rc2__py3-none-any.whl → 0.98.0rc3__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.

@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '0.98.0rc3'
16
+ __version_tuple__ = version_tuple = (0, 98, 0)
cartography/util.py CHANGED
@@ -1,9 +1,10 @@
1
1
  import asyncio
2
2
  import logging
3
3
  import re
4
- import sys
5
4
  from functools import partial
6
5
  from functools import wraps
6
+ from importlib.resources import open_binary
7
+ from importlib.resources import read_text
7
8
  from string import Template
8
9
  from typing import Any
9
10
  from typing import Awaitable
@@ -30,11 +31,6 @@ from cartography.stats import get_stats_client
30
31
  from cartography.stats import ScopedStatsClient
31
32
 
32
33
 
33
- if sys.version_info >= (3, 7):
34
- from importlib.resources import open_binary, read_text
35
- else:
36
- from importlib_resources import open_binary, read_text
37
-
38
34
  logger = logging.getLogger(__name__)
39
35
 
40
36
 
@@ -0,0 +1,187 @@
1
+ Metadata-Version: 2.1
2
+ Name: cartography
3
+ Version: 0.98.0rc3
4
+ Summary: Explore assets and their relationships across your technical infrastructure.
5
+ Maintainer: Cartography Contributors
6
+ License: apache2
7
+ Project-URL: Homepage, https://cartography-cncf.github.io/cartography
8
+ Project-URL: Documentation, https://cartography-cncf.github.io/cartography
9
+ Project-URL: Repository, https://github.com/cartography-cncf/cartography
10
+ Project-URL: Issues, https://github.com/cartography-cncf/cartography/issues
11
+ Project-URL: Changelog, https://github.com/cartography-cncf/cartography/releases
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Natural Language :: English
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Topic :: Security
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: backoff>=2.1.2
26
+ Requires-Dist: boto3>=1.15.1
27
+ Requires-Dist: botocore>=1.18.1
28
+ Requires-Dist: dnspython>=1.15.0
29
+ Requires-Dist: neo4j<5.0.0,>=4.4.4
30
+ Requires-Dist: policyuniverse>=1.1.0.0
31
+ Requires-Dist: google-api-python-client>=1.7.8
32
+ Requires-Dist: oauth2client>=4.1.3
33
+ Requires-Dist: marshmallow>=3.0.0rc7
34
+ Requires-Dist: oci>=2.71.0
35
+ Requires-Dist: okta<1.0.0
36
+ Requires-Dist: pyyaml>=5.3.1
37
+ Requires-Dist: requests>=2.22.0
38
+ Requires-Dist: statsd
39
+ Requires-Dist: packaging
40
+ Requires-Dist: python-digitalocean>=1.16.0
41
+ Requires-Dist: adal>=1.2.4
42
+ Requires-Dist: azure-cli-core>=2.26.0
43
+ Requires-Dist: azure-mgmt-compute>=5.0.0
44
+ Requires-Dist: azure-mgmt-resource>=10.2.0
45
+ Requires-Dist: azure-mgmt-cosmosdb>=6.0.0
46
+ Requires-Dist: msrestazure>=0.6.4
47
+ Requires-Dist: azure-mgmt-storage>=16.0.0
48
+ Requires-Dist: azure-mgmt-sql<=1.0.0
49
+ Requires-Dist: azure-identity>=1.5.0
50
+ Requires-Dist: kubernetes>=22.6.0
51
+ Requires-Dist: pdpyras>=4.3.0
52
+ Requires-Dist: crowdstrike-falconpy>=0.5.1
53
+ Requires-Dist: python-dateutil
54
+ Requires-Dist: xmltodict
55
+ Requires-Dist: duo-client
56
+ Provides-Extra: dev
57
+ Requires-Dist: backoff>=2.1.2; extra == "dev"
58
+ Requires-Dist: moto; extra == "dev"
59
+ Requires-Dist: pre-commit; extra == "dev"
60
+ Requires-Dist: pytest>=6.2.4; extra == "dev"
61
+ Requires-Dist: pytest-mock; extra == "dev"
62
+ Requires-Dist: pytest-cov==2.10.0; extra == "dev"
63
+ Requires-Dist: pytest-rerunfailures; extra == "dev"
64
+ Requires-Dist: types-PyYAML; extra == "dev"
65
+ Requires-Dist: types-requests<2.31.0.7; extra == "dev"
66
+
67
+ ![Cartography](docs/root/images/logo-horizontal.png)
68
+
69
+ Cartography is a Python tool that consolidates infrastructure assets and the relationships between them in an intuitive graph view powered by a [Neo4j](https://www.neo4j.com) database.
70
+
71
+ ![Visualization of RDS nodes and AWS nodes](docs/root/images/accountsandrds.png)
72
+
73
+ ## Why Cartography?
74
+ Cartography aims to enable a broad set of exploration and automation scenarios. It is particularly good at exposing otherwise hidden dependency relationships between your service's assets so that you may validate assumptions about security risks.
75
+
76
+ Service owners can generate asset reports, Red Teamers can discover attack paths, and Blue Teamers can identify areas for security improvement. All can benefit from using the graph for manual exploration through a web frontend interface, or in an automated fashion by calling the APIs.
77
+
78
+ Cartography is not the only [security](https://github.com/dowjones/hammer) [graph](https://github.com/BloodHoundAD/BloodHound) [tool](https://github.com/Netflix/security_monkey) [out](https://github.com/vysecurity/ANGRYPUPPY) [there](https://github.com/duo-labs/cloudmapper), but it differentiates itself by being fully-featured yet generic and [extensible](https://cartography-cncf.github.io/cartography/dev/writing-analysis-jobs.html) enough to help make anyone better understand their risk exposure, regardless of what platforms they use. Rather than being focused on one core scenario or attack vector like the other linked tools, Cartography focuses on flexibility and exploration.
79
+
80
+ You can learn more about the story behind Cartography in our [presentation at BSidesSF 2019](https://www.youtube.com/watch?v=ZukUmZSKSek).
81
+
82
+
83
+ ## Supported platforms
84
+
85
+ - [Amazon Web Services](https://cartography-cncf.github.io/cartography/modules/aws/index.html) - API Gateway, Config, EC2, ECS, ECR, Elasticsearch, Elastic Kubernetes Service (EKS), DynamoDB, IAM, Inspector, KMS, Lambda, RDS, Redshift, Route53, S3, Secrets Manager, Security Hub, SQS, SSM, STS, Tags
86
+ - [Google Cloud Platform](https://cartography-cncf.github.io/cartography/modules/gcp/index.html) - Cloud Resource Manager, Compute, DNS, Storage, Google Kubernetes Engine
87
+ - [Google GSuite](https://cartography-cncf.github.io/cartography/modules/gsuite/index.html) - users, groups
88
+ - [Oracle Cloud Infrastructure](docs/setup/config/oci.md) - IAM
89
+ - [Okta](https://cartography-cncf.github.io/cartography/modules/okta/index.html) - users, groups, organizations, roles, applications, factors, trusted origins, reply URIs
90
+ - [GitHub](https://cartography-cncf.github.io/cartography/modules/github/index.html) - repos, branches, users, teams
91
+ - [DigitalOcean](https://cartography-cncf.github.io/cartography/modules/digitalocean/index.html)
92
+ - [Microsoft Azure](https://cartography-cncf.github.io/cartography/modules/azure/index.html) - CosmosDB, SQL, Storage, Virtual Machine
93
+ - [Kubernetes](https://cartography-cncf.github.io/cartography/modules/kubernetes/index.html) - Cluster, Namespace, Service, Pod, Container
94
+ - [PagerDuty](https://cartography-cncf.github.io/cartography/modules/pagerduty/index.html) - Users, teams, services, schedules, escalation policies, integrations, vendors
95
+ - [Crowdstrike Falcon](https://cartography-cncf.github.io/cartography/modules/crowdstrike/index.html) - Hosts, Spotlight vulnerabilities, CVEs
96
+ - [NIST CVE](https://cartography-cncf.github.io/cartography/modules/cve/index.html) - Common Vulnerabilities and Exposures (CVE) data from NIST database
97
+ - [Lastpass](https://cartography-cncf.github.io/cartography/modules/lastpass/index.html) - users
98
+ - [BigFix](https://cartography-cncf.github.io/cartography/modules/bigfix/index.html) - Computers
99
+ - [Duo](https://cartography-cncf.github.io/cartography/modules/duo/index.html) - Users, Groups, Endpoints
100
+ - [Kandji](https://cartography-cncf.github.io/cartography/modules/kandji/index.html) - Devices
101
+ - [SnipeIT](https://cartography-cncf.github.io/cartography/modules/snipeit/index.html) - Users, Assets
102
+
103
+
104
+ ## Philosophy
105
+ Here are some points that can help you decide if adopting Cartography is a good fit for your problem.
106
+
107
+ ### What Cartography is
108
+ - A simple Python script that pulls data from multiple providers and writes it to a Neo4j graph database in batches.
109
+ - A powerful analysis tool that captures the current snapshot of the environment, building a uniquely useful inventory where you can ask complex questions such as:
110
+ - Which identities have access to which datastores?
111
+ - What are the cross-tenant permission relationships in the environment?
112
+ - What are the network paths in and out of the environment?
113
+ - What are the backup policies for my datastores?
114
+ - Battle-tested in production by [many companies](#who-uses-cartography).
115
+ - Straightforward to extend with your own custom plugins.
116
+ - Provides a useful data-plane that you can build automation and CSPM (Cloud Security Posture Management) applications on top of.
117
+
118
+ ### What Cartography is not
119
+ - A near-real time capability.
120
+ - Cartography is not designed for very fast updates. Cartography writes to the database in a batches (not streamed).
121
+ - Cartography is also limited by how most upstream sources only provide APIs to retrieve assets in a batched manner.
122
+ - By itself, Cartography does not capture data changes over time.
123
+ - Although we do include a [drift detection](https://cartography-cncf.github.io/cartography/usage/drift-detect.html) feature.
124
+ - It's also possible to implement other processes in your Cartography installation to make this happen.
125
+
126
+
127
+ ## Install and configure
128
+
129
+ ### Trying out Cartography on a test machine
130
+ Start [here](https://cartography-cncf.github.io/cartography/install.html) to set up a test graph and get data into it.
131
+
132
+ ### Setting up Cartography in production
133
+ When you are ready to try it in production, read [here](https://cartography-cncf.github.io/cartography/ops.html) for recommendations on getting cartography spun up in your environment.
134
+
135
+ ## Usage
136
+
137
+ ### Querying the database directly
138
+
139
+ ![poweruser.png](docs/root/images/poweruser.png)
140
+
141
+ Now that data is in the graph, you can quickly start with our [querying tutorial](https://cartography-cncf.github.io/cartography/usage/tutorial.html). Our [data schema](https://cartography-cncf.github.io/cartography/usage/schema.html) is a helpful reference when you get stuck.
142
+
143
+ ### Building applications around Cartography
144
+ Directly querying Neo4j is already very useful as a sort of "swiss army knife" for security data problems, but you can also build applications and data pipelines around Cartography. View this doc on [applications](https://cartography-cncf.github.io/cartography/usage/applications.html).
145
+
146
+
147
+ ## Community
148
+
149
+ - Hang out with us on Slack: Join the CNCF Slack workspace [here](https://communityinviter.com/apps/cloud-native/cncf), and then join the `#cartography` channel.
150
+ - Talk to us and see what we're working on at our [monthly community meeting](https://calendar.google.com/calendar/embed?src=lyft.com_p10o6ceuiieq9sqcn1ef61v1io%40group.calendar.google.com&ctz=America%2FLos_Angeles).
151
+ - Meeting minutes are [here](https://docs.google.com/document/d/1VyRKmB0dpX185I15BmNJZpfAJ_Ooobwz0U1WIhjDxvw).
152
+ - Recorded videos are posted [here](https://www.youtube.com/playlist?list=PLMga2YJvAGzidUWJB_fnG7EHI4wsDDsE1).
153
+
154
+ ## License
155
+
156
+ This project is licensed under the [Apache 2.0 License](LICENSE).
157
+
158
+ ## Contributing
159
+ Thank you for considering contributing to Cartography!
160
+
161
+ ### Code of conduct
162
+ All contributors and participants of this project must follow the [CNCF code of conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
163
+
164
+ ### Bug reports and feature requests and discussions
165
+ Submit a GitHub issue to report a bug or request a new feature. If we decide that the issue needs more discussion - usually because the scope is too large or we need to make careful decision - we will convert the issue to a [GitHub Discussion](https://github.com/lyft/cartography/discussions).
166
+
167
+ ### Developing Cartography
168
+
169
+ Get started with our [developer documentation](https://cartography-cncf.github.io/cartography/dev/developer-guide.html). Please feel free to submit your own PRs to update documentation if you've found a better way to explain something.
170
+
171
+ ## Who uses Cartography?
172
+
173
+ 1. [Lyft](https://www.lyft.com)
174
+ 1. [Thought Machine](https://thoughtmachine.net/)
175
+ 1. [MessageBird](https://messagebird.com)
176
+ 1. [Cloudanix](https://www.cloudanix.com/)
177
+ 1. [Corelight](https://www.corelight.com/)
178
+ 1. {Your company here} :-)
179
+
180
+ If your organization uses Cartography, please file a PR and update this list. Say hi on Slack too!
181
+
182
+ ---
183
+
184
+ Cartography is a [Cloud Native Computing Foundation](https://www.cncf.io/) sandbox project.<br>
185
+ <div style="background-color: white; display: inline-block; padding: 10px;">
186
+ <img src="docs/root/images/cncf-color.png" alt="CNCF Logo" width="200">
187
+ </div>
@@ -1,11 +1,12 @@
1
1
  cartography/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  cartography/__main__.py,sha256=JftXT_nUPkqcEh8uxCCT4n-OyHYqbldEgrDS-4ygy0U,101
3
+ cartography/_version.py,sha256=S3NFuE-lXnEY5jp6jj2rWIR_80fYZi_neDtpyro9xU0,416
3
4
  cartography/cli.py,sha256=LPjeOkx-cKhRkuhqMicB-0X3SHOjLXxEeGqsp2FtpC0,33285
4
5
  cartography/config.py,sha256=ZcadsKmooAkti9Kv0eDl8Ec1PcZDu3lWobtNaCnwY3k,11872
5
6
  cartography/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
7
  cartography/stats.py,sha256=dbybb9V2FuvSuHjjNwz6Vjwnd1hap2C7h960rLoKcl8,4406
7
8
  cartography/sync.py,sha256=ziD63T_774gXSuD5zdz6fLGvv1Kt2ntQySSVbmcCZb8,9708
8
- cartography/util.py,sha256=T51p1WrA9sdyDnHM3H9RN25OR2xClXww33SBUkM_HgA,15080
9
+ cartography/util.py,sha256=VZgiHcAprn3nGzItee4_TggfsGWxWPTkLN-2MIhYUqM,14999
9
10
  cartography/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
11
  cartography/client/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
12
  cartography/client/aws/iam.py,sha256=dYsGikc36DEsSeR2XVOVFFUDwuU9yWj_EVkpgVYCFgM,1293
@@ -353,9 +354,9 @@ cartography/models/snipeit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
353
354
  cartography/models/snipeit/asset.py,sha256=FyRAaeXuZjMy0eUQcSDFcgEAF5lbLMlvqp1Tv9d3Lv4,3238
354
355
  cartography/models/snipeit/tenant.py,sha256=p4rFnpNNuF1W5ilGBbexDaETWTwavfb38RcQGoImkQI,679
355
356
  cartography/models/snipeit/user.py,sha256=MsB4MiCVNTH6JpESime7cOkB89autZOXQpL6Z0l7L6o,2113
356
- cartography-0.98.0rc2.dist-info/LICENSE,sha256=kvLEBRYaQ1RvUni6y7Ti9uHeooqnjPoo6n_-0JO1ETc,11351
357
- cartography-0.98.0rc2.dist-info/METADATA,sha256=STbfL3Vu6zNS6s568w-u7Jq2-xCJAHhMhP7pfAHIPAU,1941
358
- cartography-0.98.0rc2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
359
- cartography-0.98.0rc2.dist-info/entry_points.txt,sha256=GVIAWD0o0_K077qMA_k1oZU4v-M0a8GLKGJR8tZ-qH8,112
360
- cartography-0.98.0rc2.dist-info/top_level.txt,sha256=BHqsNJQiI6Q72DeypC1IINQJE59SLhU4nllbQjgJi9g,12
361
- cartography-0.98.0rc2.dist-info/RECORD,,
357
+ cartography-0.98.0rc3.dist-info/LICENSE,sha256=kvLEBRYaQ1RvUni6y7Ti9uHeooqnjPoo6n_-0JO1ETc,11351
358
+ cartography-0.98.0rc3.dist-info/METADATA,sha256=NIyigTeWT6-lGT8j30ZoCOjvHAgCO2RJLFIn91vLx5M,11473
359
+ cartography-0.98.0rc3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
360
+ cartography-0.98.0rc3.dist-info/entry_points.txt,sha256=GVIAWD0o0_K077qMA_k1oZU4v-M0a8GLKGJR8tZ-qH8,112
361
+ cartography-0.98.0rc3.dist-info/top_level.txt,sha256=BHqsNJQiI6Q72DeypC1IINQJE59SLhU4nllbQjgJi9g,12
362
+ cartography-0.98.0rc3.dist-info/RECORD,,
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: cartography
3
- Version: 0.98.0rc2
4
- Summary: Explore assets and their relationships across your technical infrastructure.
5
- Home-page: https://www.github.com/cartography-cncf/cartography
6
- Maintainer: Cartography Contributors
7
- License: apache2
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Natural Language :: English
12
- Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Topic :: Security
16
- Classifier: Topic :: Software Development :: Libraries
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: backoff>=2.1.2
21
- Requires-Dist: boto3>=1.15.1
22
- Requires-Dist: botocore>=1.18.1
23
- Requires-Dist: dnspython>=1.15.0
24
- Requires-Dist: neo4j<5.0.0,>=4.4.4
25
- Requires-Dist: policyuniverse>=1.1.0.0
26
- Requires-Dist: google-api-python-client>=1.7.8
27
- Requires-Dist: oauth2client>=4.1.3
28
- Requires-Dist: marshmallow>=3.0.0rc7
29
- Requires-Dist: oci>=2.71.0
30
- Requires-Dist: okta<1.0.0
31
- Requires-Dist: pyyaml>=5.3.1
32
- Requires-Dist: requests>=2.22.0
33
- Requires-Dist: statsd
34
- Requires-Dist: packaging
35
- Requires-Dist: python-digitalocean>=1.16.0
36
- Requires-Dist: adal>=1.2.4
37
- Requires-Dist: azure-cli-core>=2.26.0
38
- Requires-Dist: azure-mgmt-compute>=5.0.0
39
- Requires-Dist: azure-mgmt-resource>=10.2.0
40
- Requires-Dist: azure-mgmt-cosmosdb>=6.0.0
41
- Requires-Dist: msrestazure>=0.6.4
42
- Requires-Dist: azure-mgmt-storage>=16.0.0
43
- Requires-Dist: azure-mgmt-sql<=1.0.0
44
- Requires-Dist: azure-identity>=1.5.0
45
- Requires-Dist: kubernetes>=22.6.0
46
- Requires-Dist: pdpyras>=4.3.0
47
- Requires-Dist: crowdstrike-falconpy>=0.5.1
48
- Requires-Dist: python-dateutil
49
- Requires-Dist: xmltodict
50
- Requires-Dist: duo-client
51
- Requires-Dist: importlib-resources; python_version < "3.7"
52
-
53
- file: README.md