vanhecke/celmex/3.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vanhecke/celmex is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with the same repo name found; no cached copy. Use another version.

Details

Cortex.Api.Assets

Cortex asset inventory and external attack-surface views.

type alias SearchArgs =
{ filters : List Filter
, sort : Maybe Sort
, range : Maybe Range
, timeframe : Maybe Timeframe
, extra : List ( String, Value )
}

Arguments to the filtered asset list endpoints. All fields are optional; pass defaultSearchArgs for an unfiltered request. extra is merged last into request_data and overrides any SDK-generated key on collision.

defaultSearchArgs : SearchArgs

A SearchArgs with no filters, sort, pagination, or timeframe.

type alias AssetsResponse =
{ data : List Asset
, filterCount : Maybe Int
, totalCount : Maybe Int
}

Top-level envelope for the asset inventory list.

type alias Asset =
{ id : Maybe String
, strongId : Maybe String
, name : Maybe String
, externalProviderId : Maybe String
, provider : Maybe String
, realm : Maybe String
, typeId : Maybe String
, typeName : Maybe String
, typeCategory : Maybe String
, typeClass : Maybe String
, cloudRegion : Maybe String
, firstObserved : Maybe Int
, lastObserved : Maybe Int
, groupIds : List Int
, hostIpv4Addresses : List String
, relatedIssuesCritical : Maybe Int
, relatedIssuesBreakdown : Maybe AssetCounts
, relatedCasesCritical : Maybe Int
, relatedCasesBreakdown : Maybe AssetCounts
}

A single asset from the inventory. Field names mirror the wire format's xdm.asset.* dotted-lowercase shape.

type alias AssetCounts =
{ critical : Maybe Int
, high : Maybe Int
, medium : Maybe Int
, low : Maybe Int
}

Severity breakdown for an asset's related issues or cases.

type alias SchemaEntry =
{ fieldName : Maybe String
, fieldPrettyName : Maybe String
, dataType : Maybe String
}

One row of the asset inventory schema returned by getSchema.

type alias ExternalService =
{ serviceId : Maybe String
, serviceName : Maybe String
, serviceType : Maybe String
, ipAddress : List String
, externallyDetectedProviders : List String
, externallyInferredCves : List String
, isActive : Maybe String
, firstObserved : Maybe Int
, lastObserved : Maybe Int
, protocol : Maybe String
, port_ : Maybe Int
, domain : List String
, activeClassifications : List String
, inactiveClassifications : List String
, discoveryType : Maybe String
, businessUnits : List String
, tags : List String
, details : Maybe Value
}

A single externally-reachable service (open port + protocol on a discovered IP). Tenant returned no services on this fixture; full field list is the spec's external_services item shape (~20 fields, mostly optional). Sub-objects like details and service_classifications are preserved as Encode.Value with inline justification.

{ totalCount : Maybe Int
, resultCount : Maybe Int
, externalServices : List ExternalService
}

Paginated envelope returned by getExternalServices.

type alias InternetExposure =
{ assetId : Maybe String
, name : Maybe String
, type_ : Maybe String
, ipAddress : Maybe String
, ipv6Address : Maybe String
, domain : Maybe String
, externallyDetectedProviders : List String
, externallyInferredCves : List String
, externallyInferredVulnerabilityScore : Maybe Float
, businessUnits : List String
, firstObserved : Maybe Int
, lastObserved : Maybe Int
, activeServices : Maybe Int
, activeExternalServices : List String
, tags : List String
}

One internet-exposure record (an asset reachable from the public internet).

{ totalCount : Maybe Int
, resultCount : Maybe Int
, assetsInternetExposure : List InternetExposure
}

Paginated envelope returned by getInternetExposures.

type alias ExternalIpRange =
{ rangeId : Maybe String
, firstIp : Maybe String
, lastIp : Maybe String
, ipsCount : Maybe Int
, activeResponsiveIpsCount : Maybe Int
, dateAdded : Maybe Int
, annotations : List String
, organizationHandles : List String
, businessUnits : List String
, tags : List String
}

One external IP-address range registered to or attributed to the organization.

{ totalCount : Maybe Int
, resultCount : Maybe Int
, externalIpAddressRanges : List ExternalIpRange
}

Paginated envelope returned by getExternalIpRanges.

type alias VulnerabilityTest =
{ id : Maybe String
, name : Maybe String
, description : Maybe String
, status : Maybe String
, severityScore : Maybe Float
, epssScore : Maybe Float
, intrusiveLevel : Maybe String
, countVulnerableServices : Maybe Int
, vulnerabilityIds : List String
, vendorNames : List String
, cweIds : List String
, references : List String
, remediationGuidance : Maybe String
, firstPublished : Maybe Int
, created : Maybe Int
, affectedSoftware : List AffectedSoftware
}

One vulnerability-test definition (a CVE / scanner check the ASM engine runs against discovered services).

type alias AffectedSoftware =
{ name : Maybe String
, vendor : Maybe String
, product : Maybe String
, version : Maybe String
, versionStartIncluding : Maybe String
, versionStartExcluding : Maybe String
, versionEndIncluding : Maybe String
, versionEndExcluding : Maybe String
}

One affected-software entry under a VulnerabilityTest — a CPE plus version range describing which package versions the test applies to.

{ totalCount : Maybe Int
, resultCount : Maybe Int
, vulnerabilityTests : List VulnerabilityTest
}

Paginated envelope returned by getVulnerabilityTests.

type alias ExternalWebsite =
{ id : Maybe String
, url : Maybe String
, statusCode : Maybe Int
, title : Maybe String
, favicon : Maybe String
, firstObserved : Maybe Int
, lastObserved : Maybe Int
, externallyDetectedProviders : List String
, externallyInferredCves : List String
, technologyMatches : List String
, businessUnits : List String
, tags : List String
}

One externally-reachable website (a URL the ASM engine has discovered).

{ totalCount : Maybe Int
, resultCount : Maybe Int
, websites : List ExternalWebsite
}

Paginated envelope returned by getExternalWebsites.

type alias LastAssessment =
{ status : Maybe Bool
, time : Maybe Int
}

Status + timestamp pair used inside WebsitesLastAssessment.

{ lastExternalAssessment : LastAssessment }

Wrapper for the single last_external_assessment field returned by getWebsitesLastAssessment.

list : Request AssetsResponse

POST /public_api/v1/assets — the asset inventory list.

getSchema : Request (List SchemaEntry)

GET /public_api/v1/assets/schema — list the tenant's asset schema.

getExternalServices : SearchArgs -> Request ExternalServicesResponse

POST /public_api/v1/assets/get_external_services — externally reachable services.

getInternetExposures : SearchArgs -> Request InternetExposuresResponse

POST /public_api/v1/assets/get_assets_internet_exposure — assets exposed to the public internet.

getExternalIpRanges : SearchArgs -> Request ExternalIpRangesResponse

POST /public_api/v1/assets/get_external_ip_address_ranges — discovered external IP ranges.

getVulnerabilityTests : SearchArgs -> Request VulnerabilityTestsResponse

POST /public_api/v1/assets/get_vulnerability_tests — vulnerability scanner results.

getExternalWebsites : SearchArgs -> Request ExternalWebsitesResponse

POST /public_api/v1/assets/get_external_websites — externally reachable websites.

getWebsitesLastAssessment : Request WebsitesLastAssessment

POST /public_api/v1/assets/get_external_websites/last_external_assessment — status + timestamp of the most recent websites scan.