cartography 0.102.0rc1__py3-none-any.whl → 0.103.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/__main__.py +1 -2
- cartography/_version.py +2 -2
- cartography/cli.py +376 -249
- cartography/client/core/tx.py +39 -18
- cartography/config.py +28 -0
- cartography/driftdetect/__main__.py +1 -2
- cartography/driftdetect/add_shortcut.py +10 -2
- cartography/driftdetect/cli.py +71 -75
- cartography/driftdetect/detect_deviations.py +7 -3
- cartography/driftdetect/get_states.py +20 -8
- cartography/driftdetect/model.py +5 -5
- cartography/driftdetect/serializers.py +8 -6
- cartography/driftdetect/storage.py +2 -2
- cartography/graph/cleanupbuilder.py +35 -15
- cartography/graph/job.py +46 -17
- cartography/graph/querybuilder.py +165 -80
- cartography/graph/statement.py +35 -26
- cartography/intel/analysis.py +4 -1
- cartography/intel/aws/__init__.py +114 -55
- cartography/intel/aws/apigateway.py +134 -63
- cartography/intel/aws/cloudtrail.py +127 -0
- cartography/intel/aws/cloudwatch.py +93 -0
- cartography/intel/aws/config.py +56 -20
- cartography/intel/aws/dynamodb.py +108 -40
- cartography/intel/aws/ec2/__init__.py +2 -2
- cartography/intel/aws/ec2/auto_scaling_groups.py +181 -78
- cartography/intel/aws/ec2/elastic_ip_addresses.py +41 -13
- cartography/intel/aws/ec2/images.py +49 -20
- cartography/intel/aws/ec2/instances.py +234 -136
- cartography/intel/aws/ec2/internet_gateways.py +40 -11
- cartography/intel/aws/ec2/key_pairs.py +44 -20
- cartography/intel/aws/ec2/launch_templates.py +101 -59
- cartography/intel/aws/ec2/load_balancer_v2s.py +104 -39
- cartography/intel/aws/ec2/load_balancers.py +82 -42
- cartography/intel/aws/ec2/network_acls.py +89 -65
- cartography/intel/aws/ec2/network_interfaces.py +146 -87
- cartography/intel/aws/ec2/reserved_instances.py +45 -16
- cartography/intel/aws/ec2/route_tables.py +327 -0
- cartography/intel/aws/ec2/security_groups.py +71 -21
- cartography/intel/aws/ec2/snapshots.py +61 -22
- cartography/intel/aws/ec2/subnets.py +54 -18
- cartography/intel/aws/ec2/tgw.py +100 -34
- cartography/intel/aws/ec2/util.py +1 -1
- cartography/intel/aws/ec2/volumes.py +69 -41
- cartography/intel/aws/ec2/vpc.py +37 -12
- cartography/intel/aws/ec2/vpc_peerings.py +83 -24
- cartography/intel/aws/ecr.py +88 -32
- cartography/intel/aws/ecs.py +83 -47
- cartography/intel/aws/efs.py +93 -0
- cartography/intel/aws/eks.py +55 -29
- cartography/intel/aws/elasticache.py +42 -18
- cartography/intel/aws/elasticsearch.py +57 -20
- cartography/intel/aws/emr.py +61 -23
- cartography/intel/aws/iam.py +401 -145
- cartography/intel/aws/iam_instance_profiles.py +22 -22
- cartography/intel/aws/identitycenter.py +71 -37
- cartography/intel/aws/inspector.py +159 -89
- cartography/intel/aws/kms.py +92 -38
- cartography/intel/aws/lambda_function.py +103 -34
- cartography/intel/aws/organizations.py +30 -10
- cartography/intel/aws/permission_relationships.py +133 -51
- cartography/intel/aws/rds.py +249 -85
- cartography/intel/aws/redshift.py +107 -46
- cartography/intel/aws/resourcegroupstaggingapi.py +120 -66
- cartography/intel/aws/resources.py +57 -44
- cartography/intel/aws/route53.py +108 -61
- cartography/intel/aws/s3.py +168 -83
- cartography/intel/aws/s3accountpublicaccessblock.py +157 -0
- cartography/intel/aws/secretsmanager.py +24 -12
- cartography/intel/aws/securityhub.py +20 -9
- cartography/intel/aws/sns.py +166 -0
- cartography/intel/aws/sqs.py +60 -28
- cartography/intel/aws/ssm.py +70 -30
- cartography/intel/aws/util/arns.py +7 -7
- cartography/intel/aws/util/common.py +31 -4
- cartography/intel/azure/__init__.py +78 -19
- cartography/intel/azure/compute.py +101 -27
- cartography/intel/azure/cosmosdb.py +496 -170
- cartography/intel/azure/sql.py +296 -105
- cartography/intel/azure/storage.py +322 -113
- cartography/intel/azure/subscription.py +39 -23
- cartography/intel/azure/tenant.py +13 -4
- cartography/intel/azure/util/credentials.py +95 -55
- cartography/intel/bigfix/__init__.py +2 -2
- cartography/intel/bigfix/computers.py +93 -65
- cartography/intel/cloudflare/__init__.py +74 -0
- cartography/intel/cloudflare/accounts.py +57 -0
- cartography/intel/cloudflare/dnsrecords.py +64 -0
- cartography/intel/cloudflare/members.py +75 -0
- cartography/intel/cloudflare/roles.py +65 -0
- cartography/intel/cloudflare/zones.py +64 -0
- cartography/intel/create_indexes.py +3 -2
- cartography/intel/crowdstrike/__init__.py +11 -9
- cartography/intel/crowdstrike/endpoints.py +5 -1
- cartography/intel/crowdstrike/spotlight.py +8 -3
- cartography/intel/cve/__init__.py +46 -13
- cartography/intel/cve/feed.py +48 -12
- cartography/intel/digitalocean/__init__.py +22 -13
- cartography/intel/digitalocean/compute.py +75 -108
- cartography/intel/digitalocean/management.py +44 -80
- cartography/intel/digitalocean/platform.py +48 -43
- cartography/intel/dns.py +36 -10
- cartography/intel/duo/__init__.py +21 -16
- cartography/intel/duo/api_host.py +14 -9
- cartography/intel/duo/endpoints.py +50 -45
- cartography/intel/duo/groups.py +18 -14
- cartography/intel/duo/phones.py +37 -34
- cartography/intel/duo/tokens.py +26 -23
- cartography/intel/duo/users.py +54 -50
- cartography/intel/duo/web_authn_credentials.py +30 -25
- cartography/intel/entra/__init__.py +25 -7
- cartography/intel/entra/ou.py +112 -0
- cartography/intel/entra/users.py +69 -63
- cartography/intel/gcp/__init__.py +185 -49
- cartography/intel/gcp/compute.py +418 -231
- cartography/intel/gcp/crm.py +96 -43
- cartography/intel/gcp/dns.py +60 -19
- cartography/intel/gcp/gke.py +72 -38
- cartography/intel/gcp/iam.py +61 -41
- cartography/intel/gcp/storage.py +84 -55
- cartography/intel/github/__init__.py +13 -11
- cartography/intel/github/repos.py +270 -137
- cartography/intel/github/teams.py +170 -88
- cartography/intel/github/users.py +70 -39
- cartography/intel/github/util.py +36 -34
- cartography/intel/gsuite/__init__.py +47 -26
- cartography/intel/gsuite/api.py +73 -30
- cartography/intel/jamf/__init__.py +19 -1
- cartography/intel/jamf/computers.py +30 -7
- cartography/intel/jamf/util.py +7 -2
- cartography/intel/kandji/__init__.py +6 -3
- cartography/intel/kandji/devices.py +14 -8
- cartography/intel/kubernetes/namespaces.py +7 -4
- cartography/intel/kubernetes/pods.py +7 -4
- cartography/intel/kubernetes/services.py +8 -4
- cartography/intel/lastpass/__init__.py +2 -2
- cartography/intel/lastpass/users.py +23 -12
- cartography/intel/oci/__init__.py +44 -11
- cartography/intel/oci/iam.py +134 -38
- cartography/intel/oci/organizations.py +13 -6
- cartography/intel/oci/utils.py +43 -20
- cartography/intel/okta/__init__.py +66 -15
- cartography/intel/okta/applications.py +42 -20
- cartography/intel/okta/awssaml.py +93 -33
- cartography/intel/okta/factors.py +16 -4
- cartography/intel/okta/groups.py +56 -29
- cartography/intel/okta/organization.py +5 -1
- cartography/intel/okta/origins.py +6 -2
- cartography/intel/okta/roles.py +15 -5
- cartography/intel/okta/users.py +20 -8
- cartography/intel/okta/utils.py +6 -4
- cartography/intel/openai/__init__.py +86 -0
- cartography/intel/openai/adminapikeys.py +90 -0
- cartography/intel/openai/apikeys.py +96 -0
- cartography/intel/openai/projects.py +94 -0
- cartography/intel/openai/serviceaccounts.py +82 -0
- cartography/intel/openai/users.py +78 -0
- cartography/intel/openai/util.py +29 -0
- cartography/intel/pagerduty/__init__.py +8 -7
- cartography/intel/pagerduty/escalation_policies.py +18 -6
- cartography/intel/pagerduty/schedules.py +12 -4
- cartography/intel/pagerduty/services.py +11 -4
- cartography/intel/pagerduty/teams.py +8 -3
- cartography/intel/pagerduty/users.py +3 -1
- cartography/intel/pagerduty/vendors.py +3 -1
- cartography/intel/semgrep/__init__.py +24 -6
- cartography/intel/semgrep/dependencies.py +50 -28
- cartography/intel/semgrep/deployment.py +3 -1
- cartography/intel/semgrep/findings.py +42 -18
- cartography/intel/snipeit/__init__.py +17 -3
- cartography/intel/snipeit/asset.py +12 -6
- cartography/intel/snipeit/user.py +8 -5
- cartography/intel/snipeit/util.py +9 -4
- cartography/intel/tailscale/__init__.py +77 -0
- cartography/intel/tailscale/acls.py +146 -0
- cartography/intel/tailscale/devices.py +127 -0
- cartography/intel/tailscale/postureintegrations.py +81 -0
- cartography/intel/tailscale/tailnets.py +76 -0
- cartography/intel/tailscale/users.py +80 -0
- cartography/intel/tailscale/utils.py +132 -0
- cartography/models/aws/apigateway.py +21 -17
- cartography/models/aws/apigatewaycertificate.py +28 -22
- cartography/models/aws/apigatewayresource.py +28 -20
- cartography/models/aws/apigatewaystage.py +33 -25
- cartography/models/aws/cloudtrail/__init__.py +0 -0
- cartography/models/aws/cloudtrail/trail.py +61 -0
- cartography/models/aws/cloudwatch/__init__.py +0 -0
- cartography/models/aws/cloudwatch/loggroup.py +52 -0
- cartography/models/aws/dynamodb/gsi.py +30 -22
- cartography/models/aws/dynamodb/tables.py +25 -17
- cartography/models/aws/ec2/auto_scaling_groups.py +102 -82
- cartography/models/aws/ec2/images.py +36 -34
- cartography/models/aws/ec2/instances.py +51 -45
- cartography/models/aws/ec2/keypair.py +21 -16
- cartography/models/aws/ec2/keypair_instance.py +28 -21
- cartography/models/aws/ec2/launch_configurations.py +30 -26
- cartography/models/aws/ec2/launch_template_versions.py +48 -38
- cartography/models/aws/ec2/launch_templates.py +21 -17
- cartography/models/aws/ec2/load_balancer_listeners.py +27 -23
- cartography/models/aws/ec2/load_balancers.py +47 -37
- cartography/models/aws/ec2/network_acl_rules.py +38 -30
- cartography/models/aws/ec2/network_acls.py +38 -29
- cartography/models/aws/ec2/networkinterface_instance.py +52 -39
- cartography/models/aws/ec2/networkinterfaces.py +53 -37
- cartography/models/aws/ec2/privateip_networkinterface.py +32 -22
- cartography/models/aws/ec2/reservations.py +18 -14
- cartography/models/aws/ec2/route_table_associations.py +97 -0
- cartography/models/aws/ec2/route_tables.py +128 -0
- cartography/models/aws/ec2/routes.py +85 -0
- cartography/models/aws/ec2/securitygroup_instance.py +29 -20
- cartography/models/aws/ec2/securitygroup_networkinterface.py +24 -15
- cartography/models/aws/ec2/subnet_instance.py +24 -19
- cartography/models/aws/ec2/subnet_networkinterface.py +40 -31
- cartography/models/aws/ec2/volumes.py +47 -40
- cartography/models/aws/efs/__init__.py +0 -0
- cartography/models/aws/efs/mount_target.py +52 -0
- cartography/models/aws/eks/clusters.py +23 -21
- cartography/models/aws/emr.py +32 -30
- cartography/models/aws/iam/instanceprofile.py +33 -24
- cartography/models/aws/identitycenter/awsidentitycenter.py +18 -14
- cartography/models/aws/identitycenter/awspermissionset.py +37 -29
- cartography/models/aws/identitycenter/awsssouser.py +23 -21
- cartography/models/aws/inspector/findings.py +77 -65
- cartography/models/aws/inspector/packages.py +35 -29
- cartography/models/aws/s3/__init__.py +0 -0
- cartography/models/aws/s3/account_public_access_block.py +51 -0
- cartography/models/aws/sns/__init__.py +0 -0
- cartography/models/aws/sns/topic.py +50 -0
- cartography/models/aws/ssm/instance_information.py +51 -39
- cartography/models/aws/ssm/instance_patch.py +32 -26
- cartography/models/bigfix/bigfix_computer.py +42 -38
- cartography/models/bigfix/bigfix_root.py +3 -3
- cartography/models/cloudflare/__init__.py +0 -0
- cartography/models/cloudflare/account.py +25 -0
- cartography/models/cloudflare/dnsrecord.py +55 -0
- cartography/models/cloudflare/member.py +82 -0
- cartography/models/cloudflare/role.py +44 -0
- cartography/models/cloudflare/zone.py +59 -0
- cartography/models/core/common.py +12 -10
- cartography/models/core/nodes.py +5 -2
- cartography/models/core/relationships.py +14 -6
- cartography/models/crowdstrike/hosts.py +37 -35
- cartography/models/cve/cve.py +34 -32
- cartography/models/cve/cve_feed.py +6 -6
- cartography/models/digitalocean/__init__.py +0 -0
- cartography/models/digitalocean/account.py +21 -0
- cartography/models/digitalocean/droplet.py +56 -0
- cartography/models/digitalocean/project.py +48 -0
- cartography/models/duo/api_host.py +3 -3
- cartography/models/duo/endpoint.py +43 -41
- cartography/models/duo/group.py +14 -14
- cartography/models/duo/phone.py +27 -27
- cartography/models/duo/token.py +16 -16
- cartography/models/duo/user.py +46 -44
- cartography/models/duo/web_authn_credential.py +27 -19
- cartography/models/entra/ou.py +48 -0
- cartography/models/entra/tenant.py +24 -18
- cartography/models/entra/user.py +64 -48
- cartography/models/gcp/iam.py +23 -23
- cartography/models/github/orgs.py +5 -4
- cartography/models/github/teams.py +37 -31
- cartography/models/github/users.py +34 -23
- cartography/models/kandji/device.py +22 -16
- cartography/models/kandji/tenant.py +6 -4
- cartography/models/lastpass/tenant.py +3 -3
- cartography/models/lastpass/user.py +32 -28
- cartography/models/openai/__init__.py +0 -0
- cartography/models/openai/adminapikey.py +90 -0
- cartography/models/openai/apikey.py +84 -0
- cartography/models/openai/organization.py +17 -0
- cartography/models/openai/project.py +70 -0
- cartography/models/openai/serviceaccount.py +50 -0
- cartography/models/openai/user.py +49 -0
- cartography/models/semgrep/dependencies.py +36 -24
- cartography/models/semgrep/deployment.py +5 -5
- cartography/models/semgrep/findings.py +58 -42
- cartography/models/semgrep/locations.py +27 -21
- cartography/models/snipeit/asset.py +30 -21
- cartography/models/snipeit/tenant.py +6 -4
- cartography/models/snipeit/user.py +19 -12
- cartography/models/tailscale/__init__.py +0 -0
- cartography/models/tailscale/device.py +95 -0
- cartography/models/tailscale/group.py +86 -0
- cartography/models/tailscale/postureintegration.py +58 -0
- cartography/models/tailscale/tag.py +102 -0
- cartography/models/tailscale/tailnet.py +29 -0
- cartography/models/tailscale/user.py +52 -0
- cartography/stats.py +3 -3
- cartography/sync.py +113 -31
- cartography/util.py +84 -62
- {cartography-0.102.0rc1.dist-info → cartography-0.103.0.dist-info}/METADATA +8 -15
- cartography-0.103.0.dist-info/RECORD +442 -0
- {cartography-0.102.0rc1.dist-info → cartography-0.103.0.dist-info}/WHEEL +1 -1
- cartography-0.102.0rc1.dist-info/RECORD +0 -377
- {cartography-0.102.0rc1.dist-info → cartography-0.103.0.dist-info}/entry_points.txt +0 -0
- {cartography-0.102.0rc1.dist-info → cartography-0.103.0.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.102.0rc1.dist-info → cartography-0.103.0.dist-info}/top_level.txt +0 -0
|
@@ -13,61 +13,67 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class AWSInspectorPackageNodeProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
region: PropertyRef = PropertyRef(
|
|
18
|
-
awsaccount: PropertyRef = PropertyRef(
|
|
19
|
-
findingarn: PropertyRef = PropertyRef(
|
|
20
|
-
name: PropertyRef = PropertyRef(
|
|
21
|
-
arch: PropertyRef = PropertyRef(
|
|
22
|
-
version: PropertyRef = PropertyRef(
|
|
23
|
-
release: PropertyRef = PropertyRef(
|
|
24
|
-
epoch: PropertyRef = PropertyRef(
|
|
25
|
-
manager: PropertyRef = PropertyRef(
|
|
26
|
-
filepath: PropertyRef = PropertyRef(
|
|
27
|
-
fixedinversion: PropertyRef = PropertyRef(
|
|
28
|
-
sourcelayerhash: PropertyRef = PropertyRef(
|
|
29
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
18
|
+
awsaccount: PropertyRef = PropertyRef("AWS_ID", set_in_kwargs=True)
|
|
19
|
+
findingarn: PropertyRef = PropertyRef("findingarn", extra_index=True)
|
|
20
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
21
|
+
arch: PropertyRef = PropertyRef("arch")
|
|
22
|
+
version: PropertyRef = PropertyRef("version", extra_index=True)
|
|
23
|
+
release: PropertyRef = PropertyRef("release", extra_index=True)
|
|
24
|
+
epoch: PropertyRef = PropertyRef("epoch")
|
|
25
|
+
manager: PropertyRef = PropertyRef("packageManager")
|
|
26
|
+
filepath: PropertyRef = PropertyRef("filePath")
|
|
27
|
+
fixedinversion: PropertyRef = PropertyRef("fixedInVersion")
|
|
28
|
+
sourcelayerhash: PropertyRef = PropertyRef("sourceLayerHash")
|
|
29
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@dataclass(frozen=True)
|
|
33
|
-
class
|
|
34
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
33
|
+
class InspectorPackageToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
34
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@dataclass(frozen=True)
|
|
38
|
-
class
|
|
39
|
-
target_node_label: str =
|
|
38
|
+
class InspectorPackageToAWSAccountRel(CartographyRelSchema):
|
|
39
|
+
target_node_label: str = "AWSAccount"
|
|
40
40
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
41
|
-
{
|
|
41
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
42
42
|
)
|
|
43
43
|
direction: LinkDirection = LinkDirection.INWARD
|
|
44
44
|
rel_label: str = "RESOURCE"
|
|
45
|
-
properties:
|
|
45
|
+
properties: InspectorPackageToAWSAccountRelRelProperties = (
|
|
46
|
+
InspectorPackageToAWSAccountRelRelProperties()
|
|
47
|
+
)
|
|
46
48
|
|
|
47
49
|
|
|
48
50
|
@dataclass(frozen=True)
|
|
49
|
-
class
|
|
50
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
51
|
+
class InspectorPackageToFindingRelRelProperties(CartographyRelProperties):
|
|
52
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
@dataclass(frozen=True)
|
|
54
|
-
class
|
|
55
|
-
target_node_label: str =
|
|
56
|
+
class InspectorPackageToFindingRel(CartographyRelSchema):
|
|
57
|
+
target_node_label: str = "AWSInspectorFinding"
|
|
56
58
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
57
|
-
{
|
|
59
|
+
{"id": PropertyRef("findingarn")},
|
|
58
60
|
)
|
|
59
61
|
direction: LinkDirection = LinkDirection.INWARD
|
|
60
62
|
rel_label: str = "HAS"
|
|
61
|
-
properties:
|
|
63
|
+
properties: InspectorPackageToFindingRelRelProperties = (
|
|
64
|
+
InspectorPackageToFindingRelRelProperties()
|
|
65
|
+
)
|
|
62
66
|
|
|
63
67
|
|
|
64
68
|
@dataclass(frozen=True)
|
|
65
69
|
class AWSInspectorPackageSchema(CartographyNodeSchema):
|
|
66
|
-
label: str =
|
|
70
|
+
label: str = "AWSInspectorPackage"
|
|
67
71
|
properties: AWSInspectorPackageNodeProperties = AWSInspectorPackageNodeProperties()
|
|
68
|
-
sub_resource_relationship:
|
|
72
|
+
sub_resource_relationship: InspectorPackageToAWSAccountRel = (
|
|
73
|
+
InspectorPackageToAWSAccountRel()
|
|
74
|
+
)
|
|
69
75
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
70
76
|
[
|
|
71
|
-
|
|
77
|
+
InspectorPackageToFindingRel(),
|
|
72
78
|
],
|
|
73
79
|
)
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
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 S3AccountPublicAccessBlockNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
account_id: PropertyRef = PropertyRef("account_id")
|
|
17
|
+
region: PropertyRef = PropertyRef("region", set_in_kwargs=True)
|
|
18
|
+
block_public_acls: PropertyRef = PropertyRef("block_public_acls")
|
|
19
|
+
ignore_public_acls: PropertyRef = PropertyRef("ignore_public_acls")
|
|
20
|
+
block_public_policy: PropertyRef = PropertyRef("block_public_policy")
|
|
21
|
+
restrict_public_buckets: PropertyRef = PropertyRef("restrict_public_buckets")
|
|
22
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True)
|
|
26
|
+
class S3AccountPublicAccessBlockRelProperties(CartographyRelProperties):
|
|
27
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(frozen=True)
|
|
31
|
+
class S3AccountPublicAccessBlockToAWSAccountRel(CartographyRelSchema):
|
|
32
|
+
target_node_label: str = "AWSAccount"
|
|
33
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
34
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
35
|
+
)
|
|
36
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
37
|
+
rel_label: str = "RESOURCE"
|
|
38
|
+
properties: S3AccountPublicAccessBlockRelProperties = (
|
|
39
|
+
S3AccountPublicAccessBlockRelProperties()
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass(frozen=True)
|
|
44
|
+
class S3AccountPublicAccessBlockSchema(CartographyNodeSchema):
|
|
45
|
+
label: str = "S3AccountPublicAccessBlock"
|
|
46
|
+
properties: S3AccountPublicAccessBlockNodeProperties = (
|
|
47
|
+
S3AccountPublicAccessBlockNodeProperties()
|
|
48
|
+
)
|
|
49
|
+
sub_resource_relationship: S3AccountPublicAccessBlockToAWSAccountRel = (
|
|
50
|
+
S3AccountPublicAccessBlockToAWSAccountRel()
|
|
51
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
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 SNSTopicNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("TopicArn")
|
|
16
|
+
arn: PropertyRef = PropertyRef("TopicArn", extra_index=True)
|
|
17
|
+
name: PropertyRef = PropertyRef("TopicName")
|
|
18
|
+
displayname: PropertyRef = PropertyRef("DisplayName")
|
|
19
|
+
owner: PropertyRef = PropertyRef("Owner")
|
|
20
|
+
subscriptionspending: PropertyRef = PropertyRef("SubscriptionsPending")
|
|
21
|
+
subscriptionsconfirmed: PropertyRef = PropertyRef("SubscriptionsConfirmed")
|
|
22
|
+
subscriptionsdeleted: PropertyRef = PropertyRef("SubscriptionsDeleted")
|
|
23
|
+
deliverypolicy: PropertyRef = PropertyRef("DeliveryPolicy")
|
|
24
|
+
effectivedeliverypolicy: PropertyRef = PropertyRef("EffectiveDeliveryPolicy")
|
|
25
|
+
kmsmasterkeyid: PropertyRef = PropertyRef("KmsMasterKeyId")
|
|
26
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
27
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(frozen=True)
|
|
31
|
+
class SNSTopicToAwsAccountRelProperties(CartographyRelProperties):
|
|
32
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True)
|
|
36
|
+
class SNSTopicToAWSAccount(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "AWSAccount"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: SNSTopicToAwsAccountRelProperties = SNSTopicToAwsAccountRelProperties()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass(frozen=True)
|
|
47
|
+
class SNSTopicSchema(CartographyNodeSchema):
|
|
48
|
+
label: str = "SNSTopic"
|
|
49
|
+
properties: SNSTopicNodeProperties = SNSTopicNodeProperties()
|
|
50
|
+
sub_resource_relationship: SNSTopicToAWSAccount = SNSTopicToAWSAccount()
|
|
@@ -13,70 +13,82 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class SSMInstanceInformationNodeProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
instance_id: PropertyRef = PropertyRef(
|
|
18
|
-
region: PropertyRef = PropertyRef(
|
|
19
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
20
|
-
ping_status: PropertyRef = PropertyRef(
|
|
21
|
-
last_ping_date_time: PropertyRef = PropertyRef(
|
|
22
|
-
agent_version: PropertyRef = PropertyRef(
|
|
23
|
-
is_latest_version: PropertyRef = PropertyRef(
|
|
24
|
-
platform_type: PropertyRef = PropertyRef(
|
|
25
|
-
platform_name: PropertyRef = PropertyRef(
|
|
26
|
-
platform_version: PropertyRef = PropertyRef(
|
|
27
|
-
activation_id: PropertyRef = PropertyRef(
|
|
28
|
-
iam_role: PropertyRef = PropertyRef(
|
|
29
|
-
registration_date: PropertyRef = PropertyRef(
|
|
30
|
-
resource_type: PropertyRef = PropertyRef(
|
|
31
|
-
name: PropertyRef = PropertyRef(
|
|
32
|
-
ip_address: PropertyRef = PropertyRef(
|
|
33
|
-
computer_name: PropertyRef = PropertyRef(
|
|
34
|
-
association_status: PropertyRef = PropertyRef(
|
|
35
|
-
last_association_execution_date: PropertyRef = PropertyRef(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
id: PropertyRef = PropertyRef("InstanceId")
|
|
17
|
+
instance_id: PropertyRef = PropertyRef("InstanceId", extra_index=True)
|
|
18
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
19
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
20
|
+
ping_status: PropertyRef = PropertyRef("PingStatus")
|
|
21
|
+
last_ping_date_time: PropertyRef = PropertyRef("LastPingDateTime")
|
|
22
|
+
agent_version: PropertyRef = PropertyRef("AgentVersion")
|
|
23
|
+
is_latest_version: PropertyRef = PropertyRef("IsLatestVersion")
|
|
24
|
+
platform_type: PropertyRef = PropertyRef("PlatformType")
|
|
25
|
+
platform_name: PropertyRef = PropertyRef("PlatformName")
|
|
26
|
+
platform_version: PropertyRef = PropertyRef("PlatformVersion")
|
|
27
|
+
activation_id: PropertyRef = PropertyRef("ActivationId")
|
|
28
|
+
iam_role: PropertyRef = PropertyRef("IamRole")
|
|
29
|
+
registration_date: PropertyRef = PropertyRef("RegistrationDate")
|
|
30
|
+
resource_type: PropertyRef = PropertyRef("ResourceType")
|
|
31
|
+
name: PropertyRef = PropertyRef("Name")
|
|
32
|
+
ip_address: PropertyRef = PropertyRef("IPAddress")
|
|
33
|
+
computer_name: PropertyRef = PropertyRef("ComputerName")
|
|
34
|
+
association_status: PropertyRef = PropertyRef("AssociationStatus")
|
|
35
|
+
last_association_execution_date: PropertyRef = PropertyRef(
|
|
36
|
+
"LastAssociationExecutionDate",
|
|
37
|
+
)
|
|
38
|
+
last_successful_association_execution_date: PropertyRef = PropertyRef(
|
|
39
|
+
"LastSuccessfulAssociationExecutionDate",
|
|
40
|
+
)
|
|
41
|
+
source_id: PropertyRef = PropertyRef("SourceId")
|
|
42
|
+
source_type: PropertyRef = PropertyRef("SourceType")
|
|
39
43
|
|
|
40
44
|
|
|
41
45
|
@dataclass(frozen=True)
|
|
42
|
-
class
|
|
43
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
46
|
+
class SSMInstanceInformationToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
47
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
44
48
|
|
|
45
49
|
|
|
46
50
|
@dataclass(frozen=True)
|
|
47
|
-
class
|
|
48
|
-
target_node_label: str =
|
|
51
|
+
class SSMInstanceInformationToAWSAccountRel(CartographyRelSchema):
|
|
52
|
+
target_node_label: str = "AWSAccount"
|
|
49
53
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
50
|
-
{
|
|
54
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
51
55
|
)
|
|
52
56
|
direction: LinkDirection = LinkDirection.INWARD
|
|
53
57
|
rel_label: str = "RESOURCE"
|
|
54
|
-
properties:
|
|
58
|
+
properties: SSMInstanceInformationToAWSAccountRelRelProperties = (
|
|
59
|
+
SSMInstanceInformationToAWSAccountRelRelProperties()
|
|
60
|
+
)
|
|
55
61
|
|
|
56
62
|
|
|
57
63
|
@dataclass(frozen=True)
|
|
58
|
-
class
|
|
59
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
64
|
+
class SSMInstanceInformationToEC2InstanceRelRelProperties(CartographyRelProperties):
|
|
65
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
60
66
|
|
|
61
67
|
|
|
62
68
|
@dataclass(frozen=True)
|
|
63
|
-
class
|
|
64
|
-
target_node_label: str =
|
|
69
|
+
class SSMInstanceInformationToEC2InstanceRel(CartographyRelSchema):
|
|
70
|
+
target_node_label: str = "EC2Instance"
|
|
65
71
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
66
|
-
{
|
|
72
|
+
{"id": PropertyRef("InstanceId")},
|
|
67
73
|
)
|
|
68
74
|
direction: LinkDirection = LinkDirection.INWARD
|
|
69
75
|
rel_label: str = "HAS_INFORMATION"
|
|
70
|
-
properties:
|
|
76
|
+
properties: SSMInstanceInformationToEC2InstanceRelRelProperties = (
|
|
77
|
+
SSMInstanceInformationToEC2InstanceRelRelProperties()
|
|
78
|
+
)
|
|
71
79
|
|
|
72
80
|
|
|
73
81
|
@dataclass(frozen=True)
|
|
74
82
|
class SSMInstanceInformationSchema(CartographyNodeSchema):
|
|
75
|
-
label: str =
|
|
76
|
-
properties: SSMInstanceInformationNodeProperties =
|
|
77
|
-
|
|
83
|
+
label: str = "SSMInstanceInformation"
|
|
84
|
+
properties: SSMInstanceInformationNodeProperties = (
|
|
85
|
+
SSMInstanceInformationNodeProperties()
|
|
86
|
+
)
|
|
87
|
+
sub_resource_relationship: SSMInstanceInformationToAWSAccountRel = (
|
|
88
|
+
SSMInstanceInformationToAWSAccountRel()
|
|
89
|
+
)
|
|
78
90
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
79
91
|
[
|
|
80
|
-
|
|
92
|
+
SSMInstanceInformationToEC2InstanceRel(),
|
|
81
93
|
],
|
|
82
94
|
)
|
|
@@ -13,58 +13,64 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class SSMInstancePatchNodeProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
instance_id: PropertyRef = PropertyRef(
|
|
18
|
-
region: PropertyRef = PropertyRef(
|
|
19
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
20
|
-
title: PropertyRef = PropertyRef(
|
|
21
|
-
kb_id: PropertyRef = PropertyRef(
|
|
22
|
-
classification: PropertyRef = PropertyRef(
|
|
23
|
-
severity: PropertyRef = PropertyRef(
|
|
24
|
-
state: PropertyRef = PropertyRef(
|
|
25
|
-
installed_time: PropertyRef = PropertyRef(
|
|
26
|
-
cve_ids: PropertyRef = PropertyRef(
|
|
16
|
+
id: PropertyRef = PropertyRef("Id")
|
|
17
|
+
instance_id: PropertyRef = PropertyRef("_instance_id", extra_index=True)
|
|
18
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
19
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
20
|
+
title: PropertyRef = PropertyRef("Title", extra_index=True)
|
|
21
|
+
kb_id: PropertyRef = PropertyRef("KBId", extra_index=True)
|
|
22
|
+
classification: PropertyRef = PropertyRef("Classification")
|
|
23
|
+
severity: PropertyRef = PropertyRef("Severity")
|
|
24
|
+
state: PropertyRef = PropertyRef("State")
|
|
25
|
+
installed_time: PropertyRef = PropertyRef("InstalledTime")
|
|
26
|
+
cve_ids: PropertyRef = PropertyRef("CVEIds")
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
@dataclass(frozen=True)
|
|
30
|
-
class
|
|
31
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
30
|
+
class SSMInstancePatchToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
@dataclass(frozen=True)
|
|
35
|
-
class
|
|
36
|
-
target_node_label: str =
|
|
35
|
+
class SSMInstancePatchToAWSAccountRel(CartographyRelSchema):
|
|
36
|
+
target_node_label: str = "AWSAccount"
|
|
37
37
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
38
|
-
{
|
|
38
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
39
39
|
)
|
|
40
40
|
direction: LinkDirection = LinkDirection.INWARD
|
|
41
41
|
rel_label: str = "RESOURCE"
|
|
42
|
-
properties:
|
|
42
|
+
properties: SSMInstancePatchToAWSAccountRelRelProperties = (
|
|
43
|
+
SSMInstancePatchToAWSAccountRelRelProperties()
|
|
44
|
+
)
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
@dataclass(frozen=True)
|
|
46
|
-
class
|
|
47
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
48
|
+
class SSMInstancePatchToEC2InstanceRelRelProperties(CartographyRelProperties):
|
|
49
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
@dataclass(frozen=True)
|
|
51
|
-
class
|
|
52
|
-
target_node_label: str =
|
|
53
|
+
class SSMInstancePatchToEC2InstanceRel(CartographyRelSchema):
|
|
54
|
+
target_node_label: str = "EC2Instance"
|
|
53
55
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
54
|
-
{
|
|
56
|
+
{"id": PropertyRef("_instance_id")},
|
|
55
57
|
)
|
|
56
58
|
direction: LinkDirection = LinkDirection.INWARD
|
|
57
59
|
rel_label: str = "HAS_PATCH"
|
|
58
|
-
properties:
|
|
60
|
+
properties: SSMInstancePatchToEC2InstanceRelRelProperties = (
|
|
61
|
+
SSMInstancePatchToEC2InstanceRelRelProperties()
|
|
62
|
+
)
|
|
59
63
|
|
|
60
64
|
|
|
61
65
|
@dataclass(frozen=True)
|
|
62
66
|
class SSMInstancePatchSchema(CartographyNodeSchema):
|
|
63
|
-
label: str =
|
|
67
|
+
label: str = "SSMInstancePatch"
|
|
64
68
|
properties: SSMInstancePatchNodeProperties = SSMInstancePatchNodeProperties()
|
|
65
|
-
sub_resource_relationship:
|
|
69
|
+
sub_resource_relationship: SSMInstancePatchToAWSAccountRel = (
|
|
70
|
+
SSMInstancePatchToAWSAccountRel()
|
|
71
|
+
)
|
|
66
72
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
67
73
|
[
|
|
68
|
-
|
|
74
|
+
SSMInstancePatchToEC2InstanceRel(),
|
|
69
75
|
],
|
|
70
76
|
)
|
|
@@ -12,58 +12,62 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class BigfixComputerNodeProperties(CartographyNodeProperties):
|
|
15
|
-
id: PropertyRef = PropertyRef(
|
|
16
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
17
|
-
activedirectorypath: PropertyRef = PropertyRef(
|
|
18
|
-
agenttype: PropertyRef = PropertyRef(
|
|
19
|
-
agentversion: PropertyRef = PropertyRef(
|
|
20
|
-
averageevaluationcycle: PropertyRef = PropertyRef(
|
|
21
|
-
besrelayselectionmethod: PropertyRef = PropertyRef(
|
|
22
|
-
besrootserver: PropertyRef = PropertyRef(
|
|
23
|
-
bios: PropertyRef = PropertyRef(
|
|
24
|
-
computertype: PropertyRef = PropertyRef(
|
|
25
|
-
computername: PropertyRef = PropertyRef(
|
|
26
|
-
cpu: PropertyRef = PropertyRef(
|
|
27
|
-
devicetype: PropertyRef = PropertyRef(
|
|
28
|
-
distancetobesrelay: PropertyRef = PropertyRef(
|
|
29
|
-
dnsname: PropertyRef = PropertyRef(
|
|
30
|
-
enrollmentdatetime: PropertyRef = PropertyRef(
|
|
31
|
-
freespaceonsystemdrive: PropertyRef = PropertyRef(
|
|
32
|
-
ipaddress: PropertyRef = PropertyRef(
|
|
33
|
-
ipv6address: PropertyRef = PropertyRef(
|
|
34
|
-
islocked: PropertyRef = PropertyRef(
|
|
35
|
-
lastreporttime: PropertyRef = PropertyRef(
|
|
36
|
-
locationbyiprange: PropertyRef = PropertyRef(
|
|
37
|
-
loggedonuser: PropertyRef = PropertyRef(
|
|
38
|
-
macaddress: PropertyRef = PropertyRef(
|
|
39
|
-
os: PropertyRef = PropertyRef(
|
|
40
|
-
providername: PropertyRef = PropertyRef(
|
|
41
|
-
ram: PropertyRef = PropertyRef(
|
|
42
|
-
relay: PropertyRef = PropertyRef(
|
|
43
|
-
remotedesktopisenabled: PropertyRef = PropertyRef(
|
|
44
|
-
subnetaddress: PropertyRef = PropertyRef(
|
|
45
|
-
totalsizeofsystemdrive: PropertyRef = PropertyRef(
|
|
46
|
-
username: PropertyRef = PropertyRef(
|
|
15
|
+
id: PropertyRef = PropertyRef("ID")
|
|
16
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
17
|
+
activedirectorypath: PropertyRef = PropertyRef("ActiveDirectoryPath")
|
|
18
|
+
agenttype: PropertyRef = PropertyRef("AgentType")
|
|
19
|
+
agentversion: PropertyRef = PropertyRef("AgentVersion")
|
|
20
|
+
averageevaluationcycle: PropertyRef = PropertyRef("AverageEvaluationCycle")
|
|
21
|
+
besrelayselectionmethod: PropertyRef = PropertyRef("BESRelaySelectionMethod")
|
|
22
|
+
besrootserver: PropertyRef = PropertyRef("BESRootServer")
|
|
23
|
+
bios: PropertyRef = PropertyRef("BIOS")
|
|
24
|
+
computertype: PropertyRef = PropertyRef("ComputerType")
|
|
25
|
+
computername: PropertyRef = PropertyRef("ComputerName")
|
|
26
|
+
cpu: PropertyRef = PropertyRef("CPU")
|
|
27
|
+
devicetype: PropertyRef = PropertyRef("DeviceType")
|
|
28
|
+
distancetobesrelay: PropertyRef = PropertyRef("DistanceToBESRelay")
|
|
29
|
+
dnsname: PropertyRef = PropertyRef("DNSName")
|
|
30
|
+
enrollmentdatetime: PropertyRef = PropertyRef("EnrollmentDateTime")
|
|
31
|
+
freespaceonsystemdrive: PropertyRef = PropertyRef("FreeSpaceOnSystemDrive")
|
|
32
|
+
ipaddress: PropertyRef = PropertyRef("IPAddress")
|
|
33
|
+
ipv6address: PropertyRef = PropertyRef("IPv6Address")
|
|
34
|
+
islocked: PropertyRef = PropertyRef("IsLocked")
|
|
35
|
+
lastreporttime: PropertyRef = PropertyRef("LastReportDateTime")
|
|
36
|
+
locationbyiprange: PropertyRef = PropertyRef("LocationByIPRange")
|
|
37
|
+
loggedonuser: PropertyRef = PropertyRef("LoggedonUser")
|
|
38
|
+
macaddress: PropertyRef = PropertyRef("MACAddress")
|
|
39
|
+
os: PropertyRef = PropertyRef("OS")
|
|
40
|
+
providername: PropertyRef = PropertyRef("ProviderName")
|
|
41
|
+
ram: PropertyRef = PropertyRef("RAM")
|
|
42
|
+
relay: PropertyRef = PropertyRef("Relay")
|
|
43
|
+
remotedesktopisenabled: PropertyRef = PropertyRef("RemoteDesktopIsEnabled")
|
|
44
|
+
subnetaddress: PropertyRef = PropertyRef("SubnetAddress")
|
|
45
|
+
totalsizeofsystemdrive: PropertyRef = PropertyRef("TotalSizeOfSystemDrive")
|
|
46
|
+
username: PropertyRef = PropertyRef("UserName")
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
@dataclass(frozen=True)
|
|
50
50
|
class BigfixComputerToBigfixRootRelProperties(CartographyRelProperties):
|
|
51
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
51
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
@dataclass(frozen=True)
|
|
55
55
|
class BigfixComputerToBigfixRootRel(CartographyRelSchema):
|
|
56
|
-
target_node_label: str =
|
|
56
|
+
target_node_label: str = "BigfixRoot"
|
|
57
57
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
58
|
-
{
|
|
58
|
+
{"id": PropertyRef("ROOT_URL", set_in_kwargs=True)},
|
|
59
59
|
)
|
|
60
60
|
direction: LinkDirection = LinkDirection.INWARD
|
|
61
61
|
rel_label: str = "RESOURCE"
|
|
62
|
-
properties: BigfixComputerToBigfixRootRelProperties =
|
|
62
|
+
properties: BigfixComputerToBigfixRootRelProperties = (
|
|
63
|
+
BigfixComputerToBigfixRootRelProperties()
|
|
64
|
+
)
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
@dataclass(frozen=True)
|
|
66
68
|
class BigfixComputerSchema(CartographyNodeSchema):
|
|
67
|
-
label: str =
|
|
69
|
+
label: str = "BigfixComputer"
|
|
68
70
|
properties: BigfixComputerNodeProperties = BigfixComputerNodeProperties()
|
|
69
|
-
sub_resource_relationship: BigfixComputerToBigfixRootRel =
|
|
71
|
+
sub_resource_relationship: BigfixComputerToBigfixRootRel = (
|
|
72
|
+
BigfixComputerToBigfixRootRel()
|
|
73
|
+
)
|
|
@@ -7,11 +7,11 @@ from cartography.models.core.nodes import CartographyNodeSchema
|
|
|
7
7
|
|
|
8
8
|
@dataclass(frozen=True)
|
|
9
9
|
class BigfixRootNodeProperties(CartographyNodeProperties):
|
|
10
|
-
id: PropertyRef = PropertyRef(
|
|
11
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
10
|
+
id: PropertyRef = PropertyRef("id")
|
|
11
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class BigfixRootSchema(CartographyNodeSchema):
|
|
16
|
-
label: str =
|
|
16
|
+
label: str = "BigfixRoot"
|
|
17
17
|
properties: BigfixRootNodeProperties = BigfixRootNodeProperties()
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
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 CloudflareAccountNodeProperties(CartographyNodeProperties):
|
|
10
|
+
created_on: PropertyRef = PropertyRef("created_on")
|
|
11
|
+
name: PropertyRef = PropertyRef("name")
|
|
12
|
+
abuse_contact_email: PropertyRef = PropertyRef("settings.abuse_contact_email")
|
|
13
|
+
default_nameservers: PropertyRef = PropertyRef("settings.default_nameservers")
|
|
14
|
+
enforce_twofactor: PropertyRef = PropertyRef("settings.enforce_twofactor")
|
|
15
|
+
use_account_custom_ns_by_default: PropertyRef = PropertyRef(
|
|
16
|
+
"settings.use_account_custom_ns_by_default"
|
|
17
|
+
)
|
|
18
|
+
id: PropertyRef = PropertyRef("id")
|
|
19
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass(frozen=True)
|
|
23
|
+
class CloudflareAccountSchema(CartographyNodeSchema):
|
|
24
|
+
label: str = "CloudflareAccount"
|
|
25
|
+
properties: CloudflareAccountNodeProperties = CloudflareAccountNodeProperties()
|
|
@@ -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.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 TargetNodeMatcher
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class CloudflareDNSRecordNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
18
|
+
value: PropertyRef = PropertyRef("content")
|
|
19
|
+
type: PropertyRef = PropertyRef("type")
|
|
20
|
+
comment: PropertyRef = PropertyRef("comment")
|
|
21
|
+
proxied: PropertyRef = PropertyRef("proxied")
|
|
22
|
+
ttl: PropertyRef = PropertyRef("ttl")
|
|
23
|
+
created_on: PropertyRef = PropertyRef("created_on")
|
|
24
|
+
modified_on: PropertyRef = PropertyRef("modified_on")
|
|
25
|
+
proxiable: PropertyRef = PropertyRef("proxiable")
|
|
26
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class CloudflareDNSRecordToZoneRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
# (:CloudflareDNSRecord)<-[:RESOURCE]-(:CloudflareZone)
|
|
36
|
+
class CloudflareDNSRecordToZoneRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "CloudflareZone"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"id": PropertyRef("zone_id", set_in_kwargs=True)},
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: CloudflareDNSRecordToZoneRelProperties = (
|
|
44
|
+
CloudflareDNSRecordToZoneRelProperties()
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class CloudflareDNSRecordSchema(CartographyNodeSchema):
|
|
50
|
+
label: str = "CloudflareDNSRecord"
|
|
51
|
+
properties: CloudflareDNSRecordNodeProperties = CloudflareDNSRecordNodeProperties()
|
|
52
|
+
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["DNSRecord"])
|
|
53
|
+
sub_resource_relationship: CloudflareDNSRecordToZoneRel = (
|
|
54
|
+
CloudflareDNSRecordToZoneRel()
|
|
55
|
+
)
|