From 0b4cd8f4927a3d8f3d47c0912088dd31d93d20d3 Mon Sep 17 00:00:00 2001 From: Jehison Prada Date: Thu, 2 May 2024 20:08:24 -0500 Subject: [PATCH] Autogenerated resolved schemas and registered schemas --- external/resolvedSchemas.json | 474 ++++++++++++++++++++++++++++++++++ src/registerSchemas.ts | 4 + 2 files changed, 478 insertions(+) diff --git a/external/resolvedSchemas.json b/external/resolvedSchemas.json index 39d4209..74d78e2 100644 --- a/external/resolvedSchemas.json +++ b/external/resolvedSchemas.json @@ -10825,6 +10825,239 @@ }, "required": ["_key", "_class", "_type", "name", "displayName", "ipAddress"] }, + "#IpRange": { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "#IpRange", + "description": "consecutive set of IP addresses used for network addressing and management.", + "type": "object", + "properties": { + "_class": { + "description": "One or more classes conforming to a standard, abstract security data model. For example, an EC2 instance will have '_class':'Host'.", + "oneOf": [ + { "type": "string", "minLength": 2 }, + { + "type": "array", + "minItems": 1, + "items": { "type": "string", "minLength": 2 } + } + ], + "inherited": true + }, + "_key": { + "description": "An identifier unique within the scope containing the object. For example, for a Bitbucket repo, this will be the GUID of the repo as assigned by Bitbucket. For an IAM Role, this will be the ARN of the role.", + "type": "string", + "minLength": 10, + "inherited": true + }, + "_type": { + "description": "The type of object, typically reflecting the vendor and resource type. For example, 'aws_iam_user'. In some cases, a system knows about a type of entity that other systems know about, such as 'user_endpoint' or 'cve'.", + "type": "string", + "minLength": 3, + "inherited": true + }, + "active": { + "description": "Indicates if the IP Range is currently active", + "type": "boolean" + }, + "asn": { + "description": "Indicates IP version 4 or 6", + "type": "string", + "format": "asn" + }, + "cidr": { + "description": "The cidr that determines the IP Range", + "type": "string", + "format": "ipCidr" + }, + "classification": { + "description": "The sensitivity of the data; should match company data classification scheme", + "type": ["string", "null"], + "examples": ["critical", "confidential", "internal", "public"], + "inherited": true + }, + "complianceStatus": { + "description": "The compliance status of the entity, as a percentage of compliancy.", + "type": "number", + "minimum": 0, + "maximum": 1, + "inherited": true + }, + "country": { + "description": "Country where the IP range is registered or assigned", + "type": "string" + }, + "createdBy": { + "description": "The source/principal/user that created the entity", + "type": "string", + "inherited": true + }, + "createdOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was created at the source. This is different than `_createdOn` which is the timestamp the entity was first ingested into JupiterOne.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "criticality": { + "description": "A number that represents the value or criticality of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "deletedBy": { + "description": "The source/principal/user that deleted the entity", + "type": "string", + "inherited": true + }, + "deletedOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was deleted at the source.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "description": { + "description": "An extended description of this entity.", + "type": "string", + "inherited": true + }, + "discoveredBy": { + "description": "The source/principal/user that discovered the entity", + "type": "string", + "inherited": true + }, + "discoveredOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was discovered.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "displayName": { + "description": "Display name, e.g. a person's preferred name or an AWS account alias", + "type": "string", + "inherited": true + }, + "expiresOn": { + "description": "If the entity is a temporary resource, optionally set the expiration date. For example, the expiration date of an SSL cert.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "id": { + "description": "Identifiers of this entity assigned by the providers. Values are expected to be unique within the provider scope.", + "anyOf": [ + { "type": "string" }, + { "type": "array", "items": { "type": "string" } } + ], + "inherited": true + }, + "name": { + "description": "Name of this entity", + "type": "string", + "inherited": true + }, + "notes": { + "description": "User provided notes about this entity", + "type": "array", + "items": { "type": "string" }, + "inherited": true + }, + "owner": { + "description": "The owner of this entity. This could reference the name of the owner, or as reference ID/key to another entity in the graph as the owner.", + "type": "string", + "inherited": true + }, + "public": { + "description": "Indicates if the IP Range is public", + "type": "boolean" + }, + "risk": { + "description": "The risk level of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "source": { "description": "The IP Range source", "type": "string" }, + "status": { + "description": "Status of this entity set by the external source system or by a user, e.g. Active, Inactive, Decommissioned", + "type": "string", + "examples": [ + "active", + "inactive", + "suspended", + "terminated", + "open", + "closed", + "pending", + "unknown", + "other" + ], + "inherited": true + }, + "summary": { + "description": "A summary / short description of this entity.", + "type": "string", + "inherited": true + }, + "tags": { + "description": "An array of unnamed tags", + "type": "array", + "items": { "type": "string" }, + "inherited": true + }, + "temporary": { + "description": "Indicates if this node is a temporary resource, such as a lambda instance or an EC2 instance started by ECS.", + "type": "boolean", + "inherited": true + }, + "trust": { + "description": "The trust level of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "trusted": { + "description": "Indicates if this is a trusted resource. For example, a trusted Network, Host, Device, Application, Person, User, or Vendor.", + "type": "boolean", + "inherited": true + }, + "updatedBy": { + "description": "The source/principal/user that updated the entity", + "type": "string", + "inherited": true + }, + "updatedOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was last updated at the source.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "validated": { + "description": "Indicates if this node has been validated as a known/valid Entity.", + "type": "boolean", + "inherited": true + }, + "webLink": { + "description": "Web link to the source. For example: https://console.aws.amazon.com/iam/home#/roles/Administrator. This property is used by the UI to add a hyperlink to the entity.", + "type": "string", + "format": "uri", + "inherited": true + } + }, + "required": [ + "_key", + "_class", + "_type", + "name", + "displayName", + "source", + "active", + "cidr", + "public", + "asn" + ] + }, "#Issue": { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "#Issue", @@ -13755,6 +13988,247 @@ "content" ] }, + "#Port": { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "#Port", + "description": "Network communication endpoint", + "type": "object", + "properties": { + "_class": { + "description": "One or more classes conforming to a standard, abstract security data model. For example, an EC2 instance will have '_class':'Host'.", + "oneOf": [ + { "type": "string", "minLength": 2 }, + { + "type": "array", + "minItems": 1, + "items": { "type": "string", "minLength": 2 } + } + ], + "inherited": true + }, + "_key": { + "description": "An identifier unique within the scope containing the object. For example, for a Bitbucket repo, this will be the GUID of the repo as assigned by Bitbucket. For an IAM Role, this will be the ARN of the role.", + "type": "string", + "minLength": 10, + "inherited": true + }, + "_type": { + "description": "The type of object, typically reflecting the vendor and resource type. For example, 'aws_iam_user'. In some cases, a system knows about a type of entity that other systems know about, such as 'user_endpoint' or 'cve'.", + "type": "string", + "minLength": 3, + "inherited": true + }, + "active": { + "description": "Indicates if this entity is currently active.", + "type": "boolean", + "inherited": true + }, + "banner": { + "description": "Provides information about the service running on the port.", + "type": "string" + }, + "classification": { + "description": "The sensitivity of the data; should match company data classification scheme", + "type": ["string", "null"], + "examples": ["critical", "confidential", "internal", "public"], + "inherited": true + }, + "complianceStatus": { + "description": "The compliance status of the entity, as a percentage of compliancy.", + "type": "number", + "minimum": 0, + "maximum": 1, + "inherited": true + }, + "createdBy": { + "description": "The source/principal/user that created the entity", + "type": "string", + "inherited": true + }, + "createdOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was created at the source. This is different than `_createdOn` which is the timestamp the entity was first ingested into JupiterOne.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "criticality": { + "description": "A number that represents the value or criticality of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "deletedBy": { + "description": "The source/principal/user that deleted the entity", + "type": "string", + "inherited": true + }, + "deletedOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was deleted at the source.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "description": { + "description": "An extended description of this entity.", + "type": "string", + "inherited": true + }, + "discoveredBy": { + "description": "The source/principal/user that discovered the entity", + "type": "string", + "inherited": true + }, + "discoveredOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was discovered.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "displayName": { + "description": "Display name, e.g. a person's preferred name or an AWS account alias", + "type": "string", + "inherited": true + }, + "expiresOn": { + "description": "If the entity is a temporary resource, optionally set the expiration date. For example, the expiration date of an SSL cert.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "id": { + "description": "Identifiers of this entity assigned by the providers. Values are expected to be unique within the provider scope.", + "anyOf": [ + { "type": "string" }, + { "type": "array", "items": { "type": "string" } } + ], + "inherited": true + }, + "name": { + "description": "Name of this entity", + "type": "string", + "inherited": true + }, + "notes": { + "description": "User provided notes about this entity", + "type": "array", + "items": { "type": "string" }, + "inherited": true + }, + "open": { + "description": "Indicates if the Port is accessible and available for communication.", + "type": "boolean" + }, + "owner": { + "description": "The owner of this entity. This could reference the name of the owner, or as reference ID/key to another entity in the graph as the owner.", + "type": "string", + "inherited": true + }, + "port": { + "description": "Port number", + "type": "integer", + "minimum": 1, + "maximum": 65536 + }, + "protocol": { + "description": "Communication protocol used last time in the Port.", + "type": "string", + "enum": ["TCP", "UDP", "TCP/UDP", "UDP/TCP"] + }, + "public": { + "description": "Indicates if this is a public-facing resource (e.g. a public IP or public DNS record) or if the entity is publicly accessible. Default is false.", + "type": "boolean", + "inherited": true + }, + "risk": { + "description": "The risk level of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "service": { + "description": " Indicates the type or protocol of the service running on the port.", + "type": "string" + }, + "status": { + "description": "Status of this entity set by the external source system or by a user, e.g. Active, Inactive, Decommissioned", + "type": "string", + "examples": [ + "active", + "inactive", + "suspended", + "terminated", + "open", + "closed", + "pending", + "unknown", + "other" + ], + "inherited": true + }, + "summary": { + "description": "A summary / short description of this entity.", + "type": "string", + "inherited": true + }, + "tags": { + "description": "An array of unnamed tags", + "type": "array", + "items": { "type": "string" }, + "inherited": true + }, + "temporary": { + "description": "Indicates if this node is a temporary resource, such as a lambda instance or an EC2 instance started by ECS.", + "type": "boolean", + "inherited": true + }, + "trust": { + "description": "The trust level of this entity, on a scale between 1-10.", + "type": "integer", + "minimum": 1, + "maximum": 10, + "inherited": true + }, + "trusted": { + "description": "Indicates if this is a trusted resource. For example, a trusted Network, Host, Device, Application, Person, User, or Vendor.", + "type": "boolean", + "inherited": true + }, + "updatedBy": { + "description": "The source/principal/user that updated the entity", + "type": "string", + "inherited": true + }, + "updatedOn": { + "description": "The timestamp (in milliseconds since epoch) when the entity was last updated at the source.", + "type": "number", + "format": "date-time", + "inherited": true + }, + "validated": { + "description": "Indicates if this node has been validated as a known/valid Entity.", + "type": "boolean", + "inherited": true + }, + "webLink": { + "description": "Web link to the source. For example: https://console.aws.amazon.com/iam/home#/roles/Administrator. This property is used by the UI to add a hyperlink to the entity.", + "type": "string", + "format": "uri", + "inherited": true + } + }, + "required": [ + "_key", + "_class", + "_type", + "name", + "displayName", + "protocol", + "open", + "port" + ] + }, "#Problem": { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "#Problem", diff --git a/src/registerSchemas.ts b/src/registerSchemas.ts index 2a45b86..e545e83 100644 --- a/src/registerSchemas.ts +++ b/src/registerSchemas.ts @@ -53,6 +53,7 @@ import ImageJson from './schemas/Image.json'; import IncidentJson from './schemas/Incident.json'; import InternetJson from './schemas/Internet.json'; import IpAddressJson from './schemas/IpAddress.json'; +import IpRangeJson from './schemas/IpRange.json'; import IssueJson from './schemas/Issue.json'; import KeyJson from './schemas/Key.json'; import LogsJson from './schemas/Logs.json'; @@ -66,6 +67,7 @@ import PRJson from './schemas/PR.json'; import PasswordPolicyJson from './schemas/PasswordPolicy.json'; import PersonJson from './schemas/Person.json'; import PolicyJson from './schemas/Policy.json'; +import PortJson from './schemas/Port.json'; import ProblemJson from './schemas/Problem.json'; import ProcedureJson from './schemas/Procedure.json'; import ProcessJson from './schemas/Process.json'; @@ -154,6 +156,7 @@ export function registerSchemas(ajvInstance: Ajv): void { ajvInstance.addSchema(IncidentJson); ajvInstance.addSchema(InternetJson); ajvInstance.addSchema(IpAddressJson); + ajvInstance.addSchema(IpRangeJson); ajvInstance.addSchema(IssueJson); ajvInstance.addSchema(KeyJson); ajvInstance.addSchema(LogsJson); @@ -167,6 +170,7 @@ export function registerSchemas(ajvInstance: Ajv): void { ajvInstance.addSchema(PasswordPolicyJson); ajvInstance.addSchema(PersonJson); ajvInstance.addSchema(PolicyJson); + ajvInstance.addSchema(PortJson); ajvInstance.addSchema(ProblemJson); ajvInstance.addSchema(ProcedureJson); ajvInstance.addSchema(ProcessJson);