import { Entity, Relationship, TargetEntityProperties } from '@jupiterone/integration-sdk-core'; import { assets, vmpc } from '../../provider/client'; import { HostAssetTargets } from './types'; /** * Creates a mapped relationship between a Service and Host. This should not be * used when the target is known to be an EC2 Host. * * @see createServiceScansEC2HostAssetRelationship * * @param serviceEntity the Service that provides scanning of the host * @param host a HostAsset that is scanned by the Service */ export declare function createServiceScansDiscoveredHostAssetRelationship(serviceEntity: Entity, host: assets.HostAsset): Relationship; /** * Creates a mapped relationship between a Service and EC2 Host. * * The `targetEntity` is defined in a way to allow the mapper to relate to * existing EC2 Host entities and, when they don't already exist, allows the AWS * integration to adopt the placeholder entity. * * @see createServiceScansDiscoveredHostAssetRelationship * * @param serviceEntity the Service that provides scanning of the host * @param host a HostAsset that is scanned by the Service */ export declare function createServiceScansEC2HostAssetRelationship(serviceEntity: Entity, host: assets.HostAsset): Relationship; /** * Creates a mapped relationship between a Service and GCP Host. * * The `targetEntity` is defined in a way to allow the mapper to relate to * existing GCP Host entities and, when they don't already exist, allows the GCP * integration to adopt the placeholder entity. * * @see createServiceScansDiscoveredHostAssetRelationship * * @param serviceEntity the Service that provides scanning of the host * @param host a HostAsset that is scanned by the Service */ export declare function createServiceScansGCPHostAssetRelationship(serviceEntity: Entity, host: assets.HostAsset): Relationship; /** * Creates a mapped relationship between a Service and Azure Host. * * The `targetEntity` is defined in a way to allow the mapper to relate to * existing Azure Host entities and, when they don't already exist, allows the Azure * integration to adopt the placeholder entity. * * @see createServiceScansDiscoveredHostAssetRelationship * * @param serviceEntity the Service that provides scanning of the host * @param host a HostAsset that is scanned by the Service */ export declare function createServiceScansAzureHostAssetRelationship(serviceEntity: Entity, host: assets.HostAsset): Relationship; export declare function createDiscoveredHostAssetTargetEntity(hostAsset: assets.HostAsset): Partial; export declare function createEC2HostAssetTargetEntity(hostAsset: assets.HostAsset): Partial; export declare function createGCPHostAssetTargetEntity(hostAsset: assets.HostAsset): Partial; export declare function createAzureHostAssetTargetEntity(hostAsset: assets.HostAsset): Partial; export declare function isTagsValid(properties: TargetEntityProperties): boolean; export declare function markInvalidTags(properties: TargetEntityProperties): TargetEntityProperties; /** * Create a Finding entity for a detection host. Relationships to Host entities * depend on global mappings that match `Finding.targets`. * * @param key the Finding entity _key value * @param host the Host for which a vulnerability was detected * @param detection the detection of a vulnerability * @param hostAssetTargets detection target information by host, collected from * the host asset API, which is not available in the detection data itself */ export declare function createHostFindingEntity({ key, host, detection, detectionResults, hostAssetTargets, }: { key: string; host: vmpc.DetectionHost; detection: vmpc.HostDetection; detectionResults: string | undefined; hostAssetTargets: HostAssetTargets | undefined; }): Entity; /** * Answers `Finding.targets` values for the `DetectionHost` reflecting the * values used in the integration's rules for mapping the Finding to Host and a * few more for completeness in the entity. * * This integration does NOT rely on the global mapping rules. It provides its * own rules designed to reduce load on the mapping system by limiting the * mapping to conditions known to exist in this integration's data. * * - Finding.fqdn === Host.fqdn * - Finding.ec2InstanceArn === Host._key && Host._type === aws_instance * * @param host the host associated with a vulnerability detection * @param hostAssetTargets additional targets collected from the corresponding * `HostAsset` */ export declare function getDetectionHostTargets(host: vmpc.DetectionHost, hostAssetTargets: HostAssetTargets | undefined): string[]; /** * Answers `HostAssetTargets` for the `HostAsset`. These values are not * available on the detection host data and so must be captured from the asset * data. `fqdn` is normalized with `toLowerCase()`. * * @param host an Asset Manager host */ export declare function getHostAssetTargets(host: assets.HostAsset): HostAssetTargets; export declare function getHostAssetFqdn(host: assets.HostAsset): string | undefined; export declare function getHostTags(host: vmpc.DetectionHost): string[]; export declare function getHostAssetTags(hostAsset: assets.HostAsset): string[]; export declare function getEC2HostAssetArn(hostAsset: assets.HostAsset): string | undefined; export declare function getEC2HostAccountId(hostAsset: assets.HostAsset): string | undefined; export declare function getEC2HostAssetTags(hostAsset: assets.HostAsset): { key: string; value: string; }[] | undefined; export declare function getEC2HostAssetDetails(hostAsset: assets.HostAsset): object | undefined; export declare function getGCPHostAssetSelfLink(hostAsset: assets.HostAsset): string | undefined; export declare function getGCPHostProjectId(hostAsset: assets.HostAsset): string | undefined; export declare function getGCPHostAssetTags(hostAsset: assets.HostAsset): { key: string; value: string; }[] | undefined; export declare function getGCPHostAssetDetails(hostAsset: assets.HostAsset): object | undefined; export declare function getAzureHostAssetSourceId(hostAsset: assets.HostAsset): string | undefined; export declare function getAzureHostAssetDetails(hostAsset: assets.HostAsset): object | undefined; export declare function getAzureHostSubscriptionId(hostAsset: assets.HostAsset): string | undefined; export declare function getAzureHostAssetTags(hostAsset: assets.HostAsset): { key: string; value: string; }[] | undefined; /** * Answers properties to assign to `Host` entities representing a `HostAsset`. * * @param host an Asset Manager host */ export declare function getHostAssetDetails(host: assets.HostAsset): { hostname: string; fqdn: string | undefined; os: string | undefined; platform: string | undefined; qualysAssetId: number | undefined; qualysQwebHostId: number | undefined; qualysCreatedOn: number | undefined; scannedBy: string; lastScannedOn: number | undefined; name: string; displayName: string; }; //# sourceMappingURL=converters.d.ts.map