From fdf75ca0228dcc63f11c53408ae1ada23b655bd0 Mon Sep 17 00:00:00 2001 From: Jehison Prada Date: Thu, 2 May 2024 20:07:01 -0500 Subject: [PATCH 1/5] Add IpRange and Port schemas --- src/IntegrationSchema.ts | 104 ++------------------------- src/registerFormats.ts | 17 +++-- src/schemas/IpRange.json | 42 +++++++++++ src/schemas/Port.json | 39 ++++++++++ src/validateEntityWithSchema.test.ts | 56 +++++++++++++++ yarn.lock | 82 +++++++++------------ 6 files changed, 189 insertions(+), 151 deletions(-) create mode 100644 src/schemas/IpRange.json create mode 100644 src/schemas/Port.json diff --git a/src/IntegrationSchema.ts b/src/IntegrationSchema.ts index e73865c..1e39c30 100644 --- a/src/IntegrationSchema.ts +++ b/src/IntegrationSchema.ts @@ -28,494 +28,402 @@ import WorkloadJson from './schemas/Workload.json'; export const Workload = WorkloadJson; IntegrationSchema.addSchema(Workload); - import WorkflowJson from './schemas/Workflow.json'; export const Workflow = WorkflowJson; IntegrationSchema.addSchema(Workflow); - import WeaknessJson from './schemas/Weakness.json'; export const Weakness = WeaknessJson; IntegrationSchema.addSchema(Weakness); - import VulnerabilityJson from './schemas/Vulnerability.json'; export const Vulnerability = VulnerabilityJson; IntegrationSchema.addSchema(Vulnerability); - import VendorJson from './schemas/Vendor.json'; export const Vendor = VendorJson; IntegrationSchema.addSchema(Vendor); - import VaultJson from './schemas/Vault.json'; export const Vault = VaultJson; IntegrationSchema.addSchema(Vault); - import UserJson from './schemas/User.json'; export const User = UserJson; IntegrationSchema.addSchema(User); - import UserGroupJson from './schemas/UserGroup.json'; export const UserGroup = UserGroupJson; IntegrationSchema.addSchema(UserGroup); - import TrainingJson from './schemas/Training.json'; export const Training = TrainingJson; IntegrationSchema.addSchema(Training); - import ThreatIntelJson from './schemas/ThreatIntel.json'; export const ThreatIntel = ThreatIntelJson; IntegrationSchema.addSchema(ThreatIntel); - import TeamJson from './schemas/Team.json'; export const Team = TeamJson; IntegrationSchema.addSchema(Team); - import TaskJson from './schemas/Task.json'; export const Task = TaskJson; IntegrationSchema.addSchema(Task); - import SubscriptionJson from './schemas/Subscription.json'; export const Subscription = SubscriptionJson; IntegrationSchema.addSchema(Subscription); - import StandardJson from './schemas/Standard.json'; export const Standard = StandardJson; IntegrationSchema.addSchema(Standard); - import SiteJson from './schemas/Site.json'; export const Site = SiteJson; IntegrationSchema.addSchema(Site); - import ServiceJson from './schemas/Service.json'; export const Service = ServiceJson; IntegrationSchema.addSchema(Service); - import SectionJson from './schemas/Section.json'; export const Section = SectionJson; IntegrationSchema.addSchema(Section); - import SecretJson from './schemas/Secret.json'; export const Secret = SecretJson; IntegrationSchema.addSchema(Secret); - import ScannerJson from './schemas/Scanner.json'; export const Scanner = ScannerJson; IntegrationSchema.addSchema(Scanner); - import RulesetJson from './schemas/Ruleset.json'; export const Ruleset = RulesetJson; IntegrationSchema.addSchema(Ruleset); - import RuleJson from './schemas/Rule.json'; export const Rule = RuleJson; IntegrationSchema.addSchema(Rule); - import RootJson from './schemas/Root.json'; export const Root = RootJson; IntegrationSchema.addSchema(Root); - import RiskJson from './schemas/Risk.json'; export const Risk = RiskJson; IntegrationSchema.addSchema(Risk); - import ReviewJson from './schemas/Review.json'; export const Review = ReviewJson; IntegrationSchema.addSchema(Review); - import ResourceJson from './schemas/Resource.json'; export const Resource = ResourceJson; IntegrationSchema.addSchema(Resource); - import RequirementJson from './schemas/Requirement.json'; export const Requirement = RequirementJson; IntegrationSchema.addSchema(Requirement); - import RepositoryJson from './schemas/Repository.json'; export const Repository = RepositoryJson; IntegrationSchema.addSchema(Repository); - import RecordJson from './schemas/Record.json'; export const Record = RecordJson; IntegrationSchema.addSchema(Record); - import RecordEntityJson from './schemas/RecordEntity.json'; export const RecordEntity = RecordEntityJson; IntegrationSchema.addSchema(RecordEntity); - import QueueJson from './schemas/Queue.json'; export const Queue = QueueJson; IntegrationSchema.addSchema(Queue); - import QuestionJson from './schemas/Question.json'; export const Question = QuestionJson; IntegrationSchema.addSchema(Question); - import ProjectJson from './schemas/Project.json'; export const Project = ProjectJson; IntegrationSchema.addSchema(Project); - import ProgramJson from './schemas/Program.json'; export const Program = ProgramJson; IntegrationSchema.addSchema(Program); - import ProductJson from './schemas/Product.json'; export const Product = ProductJson; IntegrationSchema.addSchema(Product); - import ProcessJson from './schemas/Process.json'; export const Process = ProcessJson; IntegrationSchema.addSchema(Process); - import ProcedureJson from './schemas/Procedure.json'; export const Procedure = ProcedureJson; IntegrationSchema.addSchema(Procedure); - import ProblemJson from './schemas/Problem.json'; export const Problem = ProblemJson; IntegrationSchema.addSchema(Problem); - import PRJson from './schemas/PR.json'; export const PR = PRJson; IntegrationSchema.addSchema(PR); - import PolicyJson from './schemas/Policy.json'; export const Policy = PolicyJson; IntegrationSchema.addSchema(Policy); - import PersonJson from './schemas/Person.json'; export const Person = PersonJson; IntegrationSchema.addSchema(Person); - import PasswordPolicyJson from './schemas/PasswordPolicy.json'; export const PasswordPolicy = PasswordPolicyJson; IntegrationSchema.addSchema(PasswordPolicy); - import OrganizationJson from './schemas/Organization.json'; export const Organization = OrganizationJson; IntegrationSchema.addSchema(Organization); - import NetworkJson from './schemas/Network.json'; export const Network = NetworkJson; IntegrationSchema.addSchema(Network); - import NetworkInterfaceJson from './schemas/NetworkInterface.json'; export const NetworkInterface = NetworkInterfaceJson; IntegrationSchema.addSchema(NetworkInterface); - import NetworkEndpointJson from './schemas/NetworkEndpoint.json'; export const NetworkEndpoint = NetworkEndpointJson; IntegrationSchema.addSchema(NetworkEndpoint); - import ModuleJson from './schemas/Module.json'; export const Module = ModuleJson; IntegrationSchema.addSchema(Module); - import ModelJson from './schemas/Model.json'; export const Model = ModelJson; IntegrationSchema.addSchema(Model); - import LogsJson from './schemas/Logs.json'; export const Logs = LogsJson; IntegrationSchema.addSchema(Logs); - import KeyJson from './schemas/Key.json'; export const Key = KeyJson; IntegrationSchema.addSchema(Key); - import IssueJson from './schemas/Issue.json'; export const Issue = IssueJson; IntegrationSchema.addSchema(Issue); - import IpAddressJson from './schemas/IpAddress.json'; export const IpAddress = IpAddressJson; IntegrationSchema.addSchema(IpAddress); - import InternetJson from './schemas/Internet.json'; export const Internet = InternetJson; IntegrationSchema.addSchema(Internet); - import IncidentJson from './schemas/Incident.json'; export const Incident = IncidentJson; IntegrationSchema.addSchema(Incident); - import ImageJson from './schemas/Image.json'; export const Image = ImageJson; IntegrationSchema.addSchema(Image); - import HostJson from './schemas/Host.json'; export const Host = HostJson; IntegrationSchema.addSchema(Host); - import HostAgentJson from './schemas/HostAgent.json'; export const HostAgent = HostAgentJson; IntegrationSchema.addSchema(HostAgent); - import GroupJson from './schemas/Group.json'; export const Group = GroupJson; IntegrationSchema.addSchema(Group); - import GraphObjectJson from './schemas/GraphObject.json'; export const GraphObject = GraphObjectJson; IntegrationSchema.addSchema(GraphObject); - import GatewayJson from './schemas/Gateway.json'; export const Gateway = GatewayJson; IntegrationSchema.addSchema(Gateway); - import FunctionJson from './schemas/Function.json'; export const Function = FunctionJson; IntegrationSchema.addSchema(Function); - import FrameworkJson from './schemas/Framework.json'; export const Framework = FrameworkJson; IntegrationSchema.addSchema(Framework); - import FirewallJson from './schemas/Firewall.json'; export const Firewall = FirewallJson; IntegrationSchema.addSchema(Firewall); - import FindingJson from './schemas/Finding.json'; export const Finding = FindingJson; IntegrationSchema.addSchema(Finding); - import EntityJson from './schemas/Entity.json'; export const Entity = EntityJson; IntegrationSchema.addSchema(Entity); - import DomainZoneJson from './schemas/DomainZone.json'; export const DomainZone = DomainZoneJson; IntegrationSchema.addSchema(DomainZone); - import DomainRecordJson from './schemas/DomainRecord.json'; export const DomainRecord = DomainRecordJson; IntegrationSchema.addSchema(DomainRecord); - import DomainJson from './schemas/Domain.json'; export const Domain = DomainJson; IntegrationSchema.addSchema(Domain); - import DocumentJson from './schemas/Document.json'; export const Document = DocumentJson; IntegrationSchema.addSchema(Document); - import DiskJson from './schemas/Disk.json'; export const Disk = DiskJson; IntegrationSchema.addSchema(Disk); - import DirectoryJson from './schemas/Directory.json'; export const Directory = DirectoryJson; IntegrationSchema.addSchema(Directory); - import DeviceJson from './schemas/Device.json'; export const Device = DeviceJson; IntegrationSchema.addSchema(Device); - import DeploymentJson from './schemas/Deployment.json'; export const Deployment = DeploymentJson; IntegrationSchema.addSchema(Deployment); - import DataStoreJson from './schemas/DataStore.json'; export const DataStore = DataStoreJson; IntegrationSchema.addSchema(DataStore); - import DataObjectJson from './schemas/DataObject.json'; export const DataObject = DataObjectJson; IntegrationSchema.addSchema(DataObject); - import DataCollectionJson from './schemas/DataCollection.json'; export const DataCollection = DataCollectionJson; IntegrationSchema.addSchema(DataCollection); - import DatabaseJson from './schemas/Database.json'; export const Database = DatabaseJson; IntegrationSchema.addSchema(Database); - import CryptoKeyJson from './schemas/CryptoKey.json'; export const CryptoKey = CryptoKeyJson; IntegrationSchema.addSchema(CryptoKey); - import ControlPolicyJson from './schemas/ControlPolicy.json'; export const ControlPolicy = ControlPolicyJson; IntegrationSchema.addSchema(ControlPolicy); - import ControlJson from './schemas/Control.json'; export const Control = ControlJson; IntegrationSchema.addSchema(Control); - import ContainerJson from './schemas/Container.json'; export const Container = ContainerJson; IntegrationSchema.addSchema(Container); - import ConfigurationJson from './schemas/Configuration.json'; export const Configuration = ConfigurationJson; IntegrationSchema.addSchema(Configuration); - import CodeReviewJson from './schemas/CodeReview.json'; export const CodeReview = CodeReviewJson; IntegrationSchema.addSchema(CodeReview); - import CodeRepoJson from './schemas/CodeRepo.json'; export const CodeRepo = CodeRepoJson; IntegrationSchema.addSchema(CodeRepo); - import CodeModuleJson from './schemas/CodeModule.json'; export const CodeModule = CodeModuleJson; IntegrationSchema.addSchema(CodeModule); - import CodeDeployJson from './schemas/CodeDeploy.json'; export const CodeDeploy = CodeDeployJson; IntegrationSchema.addSchema(CodeDeploy); - import CodeCommitJson from './schemas/CodeCommit.json'; export const CodeCommit = CodeCommitJson; IntegrationSchema.addSchema(CodeCommit); - import ClusterJson from './schemas/Cluster.json'; export const Cluster = ClusterJson; IntegrationSchema.addSchema(Cluster); - import ChannelJson from './schemas/Channel.json'; export const Channel = ChannelJson; IntegrationSchema.addSchema(Channel); - import CertificateJson from './schemas/Certificate.json'; export const Certificate = CertificateJson; IntegrationSchema.addSchema(Certificate); - import BackupJson from './schemas/Backup.json'; export const Backup = BackupJson; IntegrationSchema.addSchema(Backup); - import AttackerJson from './schemas/Attacker.json'; export const Attacker = AttackerJson; IntegrationSchema.addSchema(Attacker); - import AssessmentJson from './schemas/Assessment.json'; export const Assessment = AssessmentJson; IntegrationSchema.addSchema(Assessment); - import ApplicationJson from './schemas/Application.json'; export const Application = ApplicationJson; IntegrationSchema.addSchema(Application); - import ApplicationEndpointJson from './schemas/ApplicationEndpoint.json'; export const ApplicationEndpoint = ApplicationEndpointJson; IntegrationSchema.addSchema(ApplicationEndpoint); - import AlertJson from './schemas/Alert.json'; export const Alert = AlertJson; IntegrationSchema.addSchema(Alert); - import AccountJson from './schemas/Account.json'; export const Account = AccountJson; IntegrationSchema.addSchema(Account); - import AccessRoleJson from './schemas/AccessRole.json'; export const AccessRole = AccessRoleJson; IntegrationSchema.addSchema(AccessRole); - import AccessPolicyJson from './schemas/AccessPolicy.json'; export const AccessPolicy = AccessPolicyJson; IntegrationSchema.addSchema(AccessPolicy); - import AccessKeyJson from './schemas/AccessKey.json'; export const AccessKey = AccessKeyJson; IntegrationSchema.addSchema(AccessKey); +import IpRangeJson from './schemas/IpRange.json'; +export const IpRange = IpRangeJson; +IntegrationSchema.addSchema(IpRange); +import PortJson from './schemas/Port.json'; +export const Port = PortJson; +IntegrationSchema.addSchema(Port); diff --git a/src/registerFormats.ts b/src/registerFormats.ts index d39a818..e379a24 100644 --- a/src/registerFormats.ts +++ b/src/registerFormats.ts @@ -3,22 +3,31 @@ import Ajv from 'ajv'; const ipv4 = addFormats.get('ipv4') as RegExp; const ipv6 = addFormats.get('ipv6') as RegExp; -const ipv4CidrRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/(3[0-2]|[12]?[0-9])$/; -const ipv6CidrRegex = /^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^([0-9a-fA-F]{1,4}:){1,7}:\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^::\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^([0-9a-fA-F]{1,4}:){1,7}[0-9a-fA-F]{1,4}$/; +const ipv4CidrRegex = + /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/(3[0-2]|[12]?[0-9])$/; +const ipv6CidrRegex = + /^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^([0-9a-fA-F]{1,4}:){1,7}:\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^::\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$|^([0-9a-fA-F]{1,4}:){1,7}[0-9a-fA-F]{1,4}$/; +const asnRegex = /^AS\d{2,6}$/; const isValidIpFormat = { name: 'ip', - fn: (x) => ipv4.test(x) || ipv6.test(x), + fn: (x: string) => ipv4.test(x) || ipv6.test(x), }; const isValidIpCidrFormat = { name: 'ipCidr', - fn: (x) => ipv4CidrRegex.test(x) || ipv6CidrRegex.test(x), + fn: (x: string) => ipv4CidrRegex.test(x) || ipv6CidrRegex.test(x), +}; + +const isValidASN = { + name: 'asn', + fn: (x: string) => asnRegex.test(x), }; export function registerFormats(ajvInstance: Ajv): void { ajvInstance.addFormat(isValidIpFormat.name, isValidIpFormat.fn); ajvInstance.addFormat(isValidIpCidrFormat.name, isValidIpCidrFormat.fn); + ajvInstance.addFormat(isValidASN.name, isValidASN.fn); addFormats(ajvInstance); } diff --git a/src/schemas/IpRange.json b/src/schemas/IpRange.json new file mode 100644 index 0000000..ce3806b --- /dev/null +++ b/src/schemas/IpRange.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "#IpRange", + "description": "consecutive set of IP addresses used for network addressing and management.", + "type": "object", + "allOf": [ + { + "$ref": "#Entity" + }, + { + "properties": { + "source": { + "description": "The IP Range source", + "type": "string" + }, + "active": { + "description": "Indicates if the IP Range is currently active", + "type": "boolean" + }, + "cidr": { + "description": "The cidr that determines the IP Range", + "type": "string", + "format": "ipCidr" + }, + "public": { + "description": "Indicates if the IP Range is public", + "type": "boolean" + }, + "asn": { + "description": "Indicates IP version 4 or 6", + "type": "string", + "format": "asn" + }, + "country": { + "description": "Country where the IP range is registered or assigned", + "type": "string" + } + }, + "required": ["source", "active", "cidr", "public", "asn"] + } + ] +} diff --git a/src/schemas/Port.json b/src/schemas/Port.json new file mode 100644 index 0000000..f3460ba --- /dev/null +++ b/src/schemas/Port.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "#Port", + "description": "Network communication endpoint", + "type": "object", + "allOf": [ + { + "$ref": "#Entity" + }, + { + "properties": { + "protocol": { + "description": "Communication protocol used last time in the Port.", + "type": "string", + "enum": ["TCP", "UDP", "TCP/UDP", "UDP/TCP"] + }, + "open": { + "description": "Indicates if the Port is accessible and available for communication.", + "type": "boolean" + }, + "port": { + "description": "Port number", + "type": "integer", + "minimum": 1, + "maximum": 65536 + }, + "banner": { + "description": "Provides information about the service running on the port.", + "type": "string" + }, + "service": { + "description": " Indicates the type or protocol of the service running on the port.", + "type": "string" + } + }, + "required": ["protocol", "open", "port"] + } + ] +} diff --git a/src/validateEntityWithSchema.test.ts b/src/validateEntityWithSchema.test.ts index 7d6ae77..57c1bec 100644 --- a/src/validateEntityWithSchema.test.ts +++ b/src/validateEntityWithSchema.test.ts @@ -334,3 +334,59 @@ describe('#DataCollection', () => { ).not.toThrow(); }); }); + +describe('#IpRange', () => { + const requiredProperties = { + ...requiredGraphObjectProperties, + _class: ['IpRange'], + source: 'test', + active: true, + cidr: '105.115.141.50/24', + public: true, + asn: 'AS4676', + }; + + test('Should successfully validate required properties', () => { + expect(() => + validateEntityWithSchema({ + ...requiredProperties, + } as any), + ).not.toThrow(); + }); + + test('disallows invalid cidr', () => { + expect(() => + validateEntityWithSchema({ + ...requiredProperties, + cidr: '256.0.0.0/24', + } as any), + ).toThrow(/must match format/); + }); + + test('disallows invalid asn', () => { + expect(() => + validateEntityWithSchema({ + ...requiredProperties, + asn: 'AS2', + } as any), + ).toThrow(/must match format/); + }); +}); + +describe('#Port', () => { + const requiredProperties = { + ...requiredGraphObjectProperties, + _class: ['Port'], + protocol: 'TCP', + open: true, + port: 80, + }; + + test('Should successfully validate required properties', () => { + expect(() => + validateEntityWithSchema({ + ...requiredProperties, + } as any), + ).not.toThrow(); + }); +}); diff --git a/yarn.lock b/yarn.lock index 953a735..4ee94f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz" integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": version "7.24.4" resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz" integrity sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg== @@ -557,7 +557,7 @@ slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.0.0", "@jest/types@^29.6.3": +"@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== @@ -593,14 +593,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" @@ -609,6 +601,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -617,7 +617,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -738,6 +738,8 @@ "@types/json-schema@^7.0.15": version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*", "@types/node@^18.19.29": version "18.19.31" @@ -790,7 +792,7 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.0.0", "@typescript-eslint/parser@^7.5.0": +"@typescript-eslint/parser@^7.5.0": version "7.7.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz" integrity sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg== @@ -874,7 +876,7 @@ acorn-walk@^8.1.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.4.1, acorn@^8.9.0: +acorn@^8.4.1, acorn@^8.9.0: version "8.11.3" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -985,7 +987,7 @@ astral-regex@^2.0.0: resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -babel-jest@^29.0.0, babel-jest@^29.7.0: +babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== @@ -1072,7 +1074,7 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -browserslist@^4.22.2, "browserslist@>= 4.21.0": +browserslist@^4.22.2: version "4.23.0" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz" integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== @@ -1206,16 +1208,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + commander@^6.2.0: version "6.2.1" resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" @@ -1347,7 +1349,7 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.6, "enquirer@>= 2.3.0 < 3": +enquirer@^2.3.6: version "2.3.6" resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -1399,7 +1401,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.56.0, eslint@^8.57.0, eslint@>=7.0.0: +eslint@^8.57.0: version "8.57.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -1543,7 +1545,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -1588,15 +1590,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^4.1.0: +find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -2139,7 +2133,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@*, jest-resolve@^29.7.0: +jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -2283,7 +2277,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.0.0, jest@^29.7.0: +jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== @@ -2465,7 +2459,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@^1.1.1, make-error@1.x: +make-error@1.x, make-error@^1.1.1: version "1.3.6" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -2639,12 +2633,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^3.0.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^3.1.0: +path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -2823,12 +2812,7 @@ semver-compare@^1.0.0: resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -semver@^6.3.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.3.1: +semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -3044,7 +3028,7 @@ ts-jest@^29.1.2: semver "^7.5.3" yargs-parser "^21.0.1" -ts-node@^10.9.2, ts-node@>=9.0.0: +ts-node@^10.9.2: version "10.9.2" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -3090,7 +3074,7 @@ type-fest@^0.21.3: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript@^4.9.5, typescript@>=2.7, typescript@>=4.2.0, "typescript@>=4.3 <6": +typescript@^4.9.5: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== From 0b4cd8f4927a3d8f3d47c0912088dd31d93d20d3 Mon Sep 17 00:00:00 2001 From: Jehison Prada Date: Thu, 2 May 2024 20:08:24 -0500 Subject: [PATCH 2/5] 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); From 8c0eb4beae9ce34e619583cf973f2e88e20b9b11 Mon Sep 17 00:00:00 2001 From: Jehison Prada Date: Thu, 2 May 2024 20:11:12 -0500 Subject: [PATCH 3/5] Revert unneeded changes in yarn lock --- yarn.lock | 82 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ee94f0..953a735 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz" integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": version "7.24.4" resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz" integrity sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg== @@ -557,7 +557,7 @@ slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.6.3": +"@jest/types@^29.0.0", "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== @@ -593,14 +593,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" @@ -609,6 +601,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -617,7 +617,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -738,8 +738,6 @@ "@types/json-schema@^7.0.15": version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*", "@types/node@^18.19.29": version "18.19.31" @@ -792,7 +790,7 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.5.0": +"@typescript-eslint/parser@^7.0.0", "@typescript-eslint/parser@^7.5.0": version "7.7.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz" integrity sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg== @@ -876,7 +874,7 @@ acorn-walk@^8.1.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.4.1, acorn@^8.9.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.4.1, acorn@^8.9.0: version "8.11.3" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -987,7 +985,7 @@ astral-regex@^2.0.0: resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -babel-jest@^29.7.0: +babel-jest@^29.0.0, babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== @@ -1074,7 +1072,7 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -browserslist@^4.22.2: +browserslist@^4.22.2, "browserslist@>= 4.21.0": version "4.23.0" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz" integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== @@ -1208,16 +1206,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + commander@^6.2.0: version "6.2.1" resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" @@ -1349,7 +1347,7 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.6: +enquirer@^2.3.6, "enquirer@>= 2.3.0 < 3": version "2.3.6" resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -1401,7 +1399,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.57.0: +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.56.0, eslint@^8.57.0, eslint@>=7.0.0: version "8.57.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -1545,7 +1543,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -1590,7 +1588,15 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -2133,7 +2139,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@^29.7.0: +jest-resolve@*, jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -2277,7 +2283,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.7.0: +jest@^29.0.0, jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== @@ -2459,7 +2465,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x, make-error@^1.1.1: +make-error@^1.1.1, make-error@1.x: version "1.3.6" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -2633,7 +2639,12 @@ path-is-absolute@^1.0.0: resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.0.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-key@^3.1.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -2812,7 +2823,12 @@ semver-compare@^1.0.0: resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -semver@^6.3.0, semver@^6.3.1: +semver@^6.3.0: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -3028,7 +3044,7 @@ ts-jest@^29.1.2: semver "^7.5.3" yargs-parser "^21.0.1" -ts-node@^10.9.2: +ts-node@^10.9.2, ts-node@>=9.0.0: version "10.9.2" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -3074,7 +3090,7 @@ type-fest@^0.21.3: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript@^4.9.5: +typescript@^4.9.5, typescript@>=2.7, typescript@>=4.2.0, "typescript@>=4.3 <6": version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== From 2cda8dfa190bbdb5307291207e1752a13ef3e8c0 Mon Sep 17 00:00:00 2001 From: Jehison Prada Date: Fri, 3 May 2024 15:42:54 -0500 Subject: [PATCH 4/5] Fix descriptions for IPRange and Port schemas --- src/schemas/IpRange.json | 2 +- src/schemas/Port.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/schemas/IpRange.json b/src/schemas/IpRange.json index ce3806b..65ea44d 100644 --- a/src/schemas/IpRange.json +++ b/src/schemas/IpRange.json @@ -27,7 +27,7 @@ "type": "boolean" }, "asn": { - "description": "Indicates IP version 4 or 6", + "description": "Autonomous System Number that identifies a routing policy", "type": "string", "format": "asn" }, diff --git a/src/schemas/Port.json b/src/schemas/Port.json index f3460ba..6c6a837 100644 --- a/src/schemas/Port.json +++ b/src/schemas/Port.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "#Port", - "description": "Network communication endpoint", + "description": "A number assigned to identify a network communication endpoint.", "type": "object", "allOf": [ { @@ -10,12 +10,12 @@ { "properties": { "protocol": { - "description": "Communication protocol used last time in the Port.", + "description": "Communication protocol last observed being used on this port.", "type": "string", "enum": ["TCP", "UDP", "TCP/UDP", "UDP/TCP"] }, "open": { - "description": "Indicates if the Port is accessible and available for communication.", + "description": "Indicates if the port is open or shut communication.", "type": "boolean" }, "port": { @@ -29,7 +29,7 @@ "type": "string" }, "service": { - "description": " Indicates the type or protocol of the service running on the port.", + "description": "Indicates the type or protocol of the service running on the port.", "type": "string" } }, From fdc62eb3a3cb1ecb0c087d7fb2695e1c7240d514 Mon Sep 17 00:00:00 2001 From: jehisonprada Date: Fri, 3 May 2024 15:58:18 -0500 Subject: [PATCH 5/5] Improve IpRange `public` property description Co-authored-by: Samuel Poulton --- src/schemas/IpRange.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/IpRange.json b/src/schemas/IpRange.json index 65ea44d..9d2c4b5 100644 --- a/src/schemas/IpRange.json +++ b/src/schemas/IpRange.json @@ -23,7 +23,7 @@ "format": "ipCidr" }, "public": { - "description": "Indicates if the IP Range is public", + "description": "Indicates if the IP Range is private or public. If the source does not provide this value, it is computed using the CIDR", "type": "boolean" }, "asn": {