@jupiterone/jupiterone-mcp 2.2.0 → 2.3.0
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.
- package/README.md +18 -2
- package/dist/client/graphql/queries.d.ts +47 -0
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +325 -1
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +8 -0
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +13 -0
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/threat-service.d.ts +31 -0
- package/dist/client/services/threat-service.d.ts.map +1 -0
- package/dist/client/services/threat-service.js +72 -0
- package/dist/client/services/threat-service.js.map +1 -0
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +206 -0
- package/dist/generated/description-map.js.map +1 -1
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +29 -13
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/errors.d.ts +5 -0
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +7 -0
- package/dist/server/tools/errors.js.map +1 -1
- package/dist/server/tools/index.d.ts.map +1 -1
- package/dist/server/tools/index.js +2 -0
- package/dist/server/tools/index.js.map +1 -1
- package/dist/server/tools/telemetry.d.ts +1 -1
- package/dist/server/tools/telemetry.d.ts.map +1 -1
- package/dist/server/tools/threat.d.ts +3 -0
- package/dist/server/tools/threat.d.ts.map +1 -0
- package/dist/server/tools/threat.js +284 -0
- package/dist/server/tools/threat.js.map +1 -0
- package/dist/server/tools/types.d.ts +5 -0
- package/dist/server/tools/types.d.ts.map +1 -1
- package/dist/server/tools/types.js.map +1 -1
- package/dist/server/tools/usage.d.ts.map +1 -1
- package/dist/server/tools/usage.js +46 -3
- package/dist/server/tools/usage.js.map +1 -1
- package/dist/types/jupiterone.d.ts +132 -0
- package/dist/types/jupiterone.d.ts.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,6 +132,13 @@ Replace the placeholder values with your actual JupiterOne credentials:
|
|
|
132
132
|
### Query Execution
|
|
133
133
|
- **execute-j1ql-query** - Execute a J1QL query
|
|
134
134
|
|
|
135
|
+
### Threat Intelligence (Emerging Exposures)
|
|
136
|
+
- **get-threat** - Decision-grade threat brief for a CVE (compact by default; full with `detail: true`)
|
|
137
|
+
- **get-threat-trending** - The trending/recently-escalated threats region (cached)
|
|
138
|
+
- **check-threat-exposure** - Whether this account's own graph is exposed to given CVEs (scanner-confirmed match)
|
|
139
|
+
|
|
140
|
+
These tools require the account's **VulnerabilityManagement** entitlement and vulnerability **read** permission. One guided prompt is also exposed: **Check trending threats** (`check-trending-threats`).
|
|
141
|
+
|
|
135
142
|
## Available Tools
|
|
136
143
|
|
|
137
144
|
### Rules Management
|
|
@@ -185,8 +192,17 @@ Replace the placeholder values with your actual JupiterOne credentials:
|
|
|
185
192
|
|------|-------------|------------|
|
|
186
193
|
| `execute-j1ql-query` | Execute a J1QL query | `query`, `variables` (optional), `cursor` (optional), `includeDeleted` (optional), `flags` (optional), `scopeFilters` (optional) |
|
|
187
194
|
|
|
195
|
+
### Threat Intelligence (Emerging Exposures)
|
|
196
|
+
| Tool | Description | Parameters |
|
|
197
|
+
|------|-------------|------------|
|
|
198
|
+
| `get-threat` | Decision-grade threat brief for a CVE | `cveId`; `assetExposure` (optional: `public`/`internal`); `detail` (optional: full brief) |
|
|
199
|
+
| `get-threat-trending` | Trending/recently-escalated threats (cached ~30 min) | `limit` (optional) |
|
|
200
|
+
| `check-threat-exposure` | This account's own exposure per CVE (scanner-confirmed) | `cveIds` (1–25) |
|
|
201
|
+
|
|
202
|
+
Requires the account's VulnerabilityManagement entitlement and vulnerability read permission. `check-threat-exposure` returning `scannerConfirmedAssetCount: 0` means "none found," not "not affected."
|
|
203
|
+
|
|
188
204
|
## Deployment
|
|
189
205
|
|
|
190
|
-
|
|
206
|
+
`deploy.yml` publishes this package to npm when a merge to `main` carries a `package.json` version that differs from the published one. It does not bump the version itself, so a PR that should ship must bump it.
|
|
191
207
|
|
|
192
|
-
|
|
208
|
+
A successful publish dispatches `npm-package-published` to the JupiterOne Remote MCP server, whose `auto-bump-core` workflow opens a review-gated pull request pinning the new version — patch and minor alike. A maintainer merges that PR; it must carry the `patch` label or the remote's deploy does not run.
|
|
@@ -14,4 +14,51 @@ export declare const GET_RULE_EVALUATION_DETAILS = "\n query ruleEvaluationDeta
|
|
|
14
14
|
export declare const GET_RAW_DATA_DOWNLOAD_URL = "\n query getRawDataDownloadUrl($rawDataKey: String!) {\n getRawDataDownloadUrl(rawDataKey: $rawDataKey)\n }\n";
|
|
15
15
|
export declare const QUERY_V2 = "\n query J1QLv2($query: String!, $variables: JSON, $cursor: String, $scopeFilters: JSON, $includeDeleted: Boolean, $returnRowMetadata: Boolean, $returnComputedProperties: Boolean) {\n queryV2(query: $query, variables: $variables, cursor: $cursor, scopeFilters: $scopeFilters, includeDeleted: $includeDeleted, returnRowMetadata: $returnRowMetadata, returnComputedProperties: $returnComputedProperties) {\n type\n url\n correlationId\n }\n }\n";
|
|
16
16
|
export declare const GET_ENTITY_COUNTS = "\n query GetEntityCounts {\n getEntityCounts {\n classes\n types\n }\n }\n";
|
|
17
|
+
/**
|
|
18
|
+
* The compact brief — the default get-threat payload. Decision-first: verdict,
|
|
19
|
+
* tiles, remediation window, timeline, coverage gap, and who-is-using-it signals,
|
|
20
|
+
* without the heavy drill-in lists (CPE footprints, threat-actor techniques,
|
|
21
|
+
* detection tooling, references) that only `detail: true` fetches.
|
|
22
|
+
*
|
|
23
|
+
* `ssvc.divergences` is selected here as well as on the full brief: the sources behind the triple
|
|
24
|
+
* can disagree — CVE-2026-11613 on dev (2026-09-14) carries exploitation displayed `active`
|
|
25
|
+
* against another source's `none` while `verdict.headline` states flatly that it is exploited in
|
|
26
|
+
* the wild. It costs a handful of bytes, and without it the compact brief asserts the claim with
|
|
27
|
+
* the contradiction stripped out.
|
|
28
|
+
*/
|
|
29
|
+
export declare const GET_THREAT_COMPACT = "\n query GetThreatBriefCompact($subjectId: String!, $assetExposure: EmergingExposureAssetExposure) {\n emergingExposure(subjectId: $subjectId, assetExposure: $assetExposure) {\n __typename\n ... on EmergingExposureBrief {\n subjectId\n assessedAt\n verdict {\n tier\n stance\n impactLabel\n headline { \n text\n emphasis\n }\n support { \n text\n emphasis\n }\n beats\n }\n tiles { \n __typename\n ... on EmergingExposureCvssTile { score severity emphasis }\n ... on EmergingExposureEpssTile { percentile emphasis }\n ... on EmergingExposureMaturityTile { maturity emphasis }\n ... on EmergingExposureKevTile { state emphasis }\n }\n ssvc {\n available\n source\n triple { exploitation automatable technicalImpact }\n divergences { field displayed other }\n amplifier\n }\n remediation { \n available\n envGap\n knownPoints { kev automatable technicalImpact }\n branches { \n exposure\n outcome\n dueInDays\n urgencyWord\n }\n resolvedBranch { \n exposure\n outcome\n dueInDays\n urgencyWord\n }\n kevDueDate\n }\n timeline { \n nodes { id state date }\n kevLead { kind days }\n inCisaKev\n inVulncheckKev\n cisaKevDateAdded\n vulncheckKevDateAdded\n }\n coverage { coverageGap scanners { scanner covered shipDate } }\n whoIsUsingIt { \n threatActors\n ransomware\n botnets\n honeypot\n canaries\n github\n hasAttribution\n counts { threatActors botnets ransomwareFamilies githubRepos }\n exploitationActivity { \n state\n firstObserved\n lastObserved\n source\n quiet\n lastReportedDate\n windowDays\n }\n }\n fingerprint { affectedProduct { vendor product versionRanges } }\n }\n ... on EmergingExposureNotFound { subjectId }\n ... on EmergingExposureInvalidInput { message }\n ... on EmergingExposureSourceUnavailable { subjectId retryable }\n }\n }\n";
|
|
30
|
+
/**
|
|
31
|
+
* The full brief — fetched only when get-threat is called with `detail: true`. Everything on
|
|
32
|
+
* EmergingExposureBrief except five lists measured on dev that made the payload unusable —
|
|
33
|
+
* 6.1 MB for Log4Shell, 2.7 MB for CVE-2023-4966, past the tool-result limit of at least one host:
|
|
34
|
+
* - `sources.references` and `fixAndMitigation.references`: the same list twice (5,519 rows for
|
|
35
|
+
* Log4Shell, byte-identical), 1.8 MB each. `sourceLabels` and `detection.exploitRefs` stay.
|
|
36
|
+
* - `threatActorAttribution.actors[].priorCveReferences`: an "Unattributed" bucket citing
|
|
37
|
+
* thousands of OTHER CVEs (4,930 rows, ~1 MB); the actors, techniques and controls stay.
|
|
38
|
+
* - `whatItIs.affectedFootprint.cpes`: a near-copy of `fingerprint.additionalCpes`, which stays.
|
|
39
|
+
* - `actors[].techniques[].nistControls/cisControls`: the full control list repeated inside each
|
|
40
|
+
* of 270 techniques (1.0 MB of the 1.2 MB left after the first three); the aggregate mapping in
|
|
41
|
+
* `detection.controlMapping` stays.
|
|
42
|
+
* - `actors[].vendorsProductsTargeted`: the same "Unattributed" bucket as `priorCveReferences`,
|
|
43
|
+
* missed when that one went. Every vendor/product the bucket has ever been associated with,
|
|
44
|
+
* unrelated to the subject — 2,095 rows / 121 KB of a 136 KB brief for CVE-2026-11613, a CVE
|
|
45
|
+
* with one actor and no product identity of its own (2026-09-14). The actor's `techniques`,
|
|
46
|
+
* `country` and `sourceUrl` stay; `fingerprint.affectedProduct` is where the subject's own
|
|
47
|
+
* product belongs.
|
|
48
|
+
*/
|
|
49
|
+
export declare const GET_THREAT_FULL = "\n query GetThreatBriefFull($subjectId: String!, $assetExposure: EmergingExposureAssetExposure) {\n emergingExposure(subjectId: $subjectId, assetExposure: $assetExposure) {\n __typename\n ... on EmergingExposureBrief {\n subjectId\n assessedAt\n verdict {\n tier\n stance\n impactLabel\n headline { \n text\n emphasis\n }\n support { \n text\n emphasis\n }\n beats\n }\n tiles { \n __typename\n ... on EmergingExposureCvssTile { score severity emphasis }\n ... on EmergingExposureEpssTile { percentile emphasis }\n ... on EmergingExposureMaturityTile { maturity emphasis }\n ... on EmergingExposureKevTile { state emphasis }\n }\n ssvc {\n available\n source\n triple { exploitation automatable technicalImpact }\n divergences { field displayed other }\n amplifier\n }\n remediation { \n available\n envGap\n knownPoints { kev automatable technicalImpact }\n branches { \n exposure\n outcome\n dueInDays\n urgencyWord\n }\n resolvedBranch { \n exposure\n outcome\n dueInDays\n urgencyWord\n }\n kevDueDate\n }\n timeline { \n nodes { id state date }\n kevLead { kind days }\n inCisaKev\n inVulncheckKev\n cisaKevDateAdded\n vulncheckKevDateAdded\n }\n whatItIs {\n description\n cwe { id name }\n affectedFootprint { summary }\n cvss {\n primary { \n version\n baseScore\n baseSeverity\n impactScore\n vectorString\n type\n }\n all { \n version\n baseScore\n baseSeverity\n impactScore\n vectorString\n type\n }\n provenance { score severity vectorString cvssVersion sourceLabel type }\n cnaOnly\n sourceConflict { score sourceLabel }\n vulnStatus\n }\n }\n whoIsUsingIt {\n \n threatActors\n ransomware\n botnets\n honeypot\n canaries\n github\n hasAttribution\n counts { threatActors botnets ransomwareFamilies githubRepos }\n exploitationActivity { \n state\n firstObserved\n lastObserved\n source\n quiet\n lastReportedDate\n windowDays\n }\n\n threatActorDates { firstSeen mostRecent }\n ransomwareDates { firstSeen mostRecent }\n botnetDates { firstSeen mostRecent }\n honeypotFirstSeen\n honeypotLastSeen\n canariesFirstSeen\n canariesLastObserved\n exploitationDetail {\n ransomware { \n name\n malpediaUrl\n }\n botnets { \n name\n malpediaUrl\n }\n githubRepos {\n owner name fullPath htmlUrl stars forks language\n exploitType dateAdded dateLastRevised trending\n }\n }\n threatActorAttribution {\n status\n actors {\n name country firstObserved sourceUrl\n techniques { id name domain tactics subtechnique }\n }\n reports { source firstObserved }\n count\n hasUnattributedBucket\n firstReported\n mostRecentReported\n }\n }\n coverage { coverageGap scanners { scanner covered shipDate } }\n detection {\n exploitRefs { url name source maturity }\n tooling { name status }\n hasInitialAccessExploit\n frameworkMapping {\n techniques { id name tactics }\n capec\n cwe\n }\n controlMapping {\n hasTechniques\n controls { id name family }\n provenance { \n source\n mapping\n version\n published\n attribution\n license\n }\n }\n }\n sources {\n sourceLabels\n crosswalk { \n source\n mapping\n version\n published\n attribution\n license\n }\n }\n fingerprint {\n affectedProduct { vendor product versionRanges }\n primaryCpes { \n criteria\n part\n vendor\n product\n vulnerable\n versionStartIncluding\n versionStartExcluding\n versionEndIncluding\n versionEndExcluding\n }\n additionalCpes { \n criteria\n part\n vendor\n product\n vulnerable\n versionStartIncluding\n versionStartExcluding\n versionEndIncluding\n versionEndExcluding\n }\n purls { purl version fixedVersion }\n crossIds { source id url }\n }\n }\n ... on EmergingExposureNotFound { subjectId }\n ... on EmergingExposureInvalidInput { message }\n ... on EmergingExposureSourceUnavailable { subjectId retryable }\n }\n }\n";
|
|
50
|
+
/**
|
|
51
|
+
* The trending region. Cached (~30 min TTL) — the one non-live path. `items` is
|
|
52
|
+
* ranked and already truncated server-side. `affectedProduct` (vendor/product) is
|
|
53
|
+
* projected because it is the join key for the environment-relevance filter. The
|
|
54
|
+
* upstream also offers a `candidates` search-suggestion pool; it is not selected —
|
|
55
|
+
* it is not an existence check and carried nothing an agent could act on.
|
|
56
|
+
*/
|
|
57
|
+
export declare const GET_THREAT_TRENDING = "\n query GetThreatTrending {\n emergingExposureTrending {\n generatedAt\n items {\n subjectId\n tier\n impactLabel\n affectedProduct { vendor product }\n reason { event date ageDays actorClass }\n trendingMilestones { event date ageDays recent }\n coverageGap\n addedToKev {\n cisa { ageDays recent }\n vulncheck { ageDays recent }\n }\n }\n }\n }\n";
|
|
58
|
+
/**
|
|
59
|
+
* The account's own exposure per subject (direct/strict match — joins on the
|
|
60
|
+
* unified vulnerability's `cveId`, so it sees only what a scanner already
|
|
61
|
+
* fingerprinted). Batched; every union member carries `subjectId`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const CHECK_THREAT_EXPOSURE = "\n query CheckThreatExposure($subjectIds: [String!]!) {\n emergingExposureEnvironments(subjectIds: $subjectIds) {\n __typename\n ... on EmergingExposureEnvironment {\n subjectId\n scannerConfirmedAssetCount\n unifiedVulnerabilityId\n assetExposure\n }\n ... on EmergingExposureEnvironmentInvalidSubject {\n subjectId\n message\n }\n ... on EmergingExposureEnvironmentUnavailable {\n subjectId\n retryable\n }\n }\n }\n";
|
|
17
64
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mSAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;AAKF,eAAO,MAAM,qBAAqB,0kEAuHjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,uxDA8FvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,ggCAiDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,o+BA2ChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kmBA+B/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8nBA+BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,ijCA2CjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+2BA0CvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uHAIrC,CAAC;AAGF,eAAO,MAAM,QAAQ,qdAQpB,CAAC;AAGF,eAAO,MAAM,iBAAiB,iGAO7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mSAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;AAKF,eAAO,MAAM,qBAAqB,0kEAuHjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,uxDA8FvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,ggCAiDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,o+BA2ChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kmBA+B/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8nBA+BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,ijCA2CjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+2BA0CvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uHAIrC,CAAC;AAGF,eAAO,MAAM,QAAQ,qdAQpB,CAAC;AAGF,eAAO,MAAM,iBAAiB,iGAO7B,CAAC;AAiFF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,y+DAkC9B,CAAC;AAqCF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,4jJAqG3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0cAmB/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,0gBAoBjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_ENTITY_COUNTS = exports.QUERY_V2 = exports.GET_RAW_DATA_DOWNLOAD_URL = exports.GET_RULE_EVALUATION_DETAILS = exports.LIST_RULE_EVALUATIONS = exports.GET_INTEGRATION_EVENTS = exports.GET_INTEGRATION_JOB = exports.GET_INTEGRATION_JOBS = exports.GET_INTEGRATION_INSTANCES = exports.GET_INTEGRATION_DEFINITIONS = exports.GET_DASHBOARD_DETAILS = exports.GET_DASHBOARDS = exports.GET_CURRENT_USER = exports.GET_ACCOUNT_INFO = exports.LIST_RULE_INSTANCES = exports.LIST_ALERT_INSTANCES = void 0;
|
|
3
|
+
exports.CHECK_THREAT_EXPOSURE = exports.GET_THREAT_TRENDING = exports.GET_THREAT_FULL = exports.GET_THREAT_COMPACT = exports.GET_ENTITY_COUNTS = exports.QUERY_V2 = exports.GET_RAW_DATA_DOWNLOAD_URL = exports.GET_RULE_EVALUATION_DETAILS = exports.LIST_RULE_EVALUATIONS = exports.GET_INTEGRATION_EVENTS = exports.GET_INTEGRATION_JOB = exports.GET_INTEGRATION_JOBS = exports.GET_INTEGRATION_INSTANCES = exports.GET_INTEGRATION_DEFINITIONS = exports.GET_DASHBOARD_DETAILS = exports.GET_DASHBOARDS = exports.GET_CURRENT_USER = exports.GET_ACCOUNT_INFO = exports.LIST_RULE_INSTANCES = exports.LIST_ALERT_INSTANCES = void 0;
|
|
4
4
|
exports.LIST_ALERT_INSTANCES = `
|
|
5
5
|
query listAlertInstances($alertStatus: AlertStatus, $limit: Int, $cursor: String) {
|
|
6
6
|
listAlertInstances(alertStatus: $alertStatus, limit: $limit, cursor: $cursor) {
|
|
@@ -678,4 +678,328 @@ exports.GET_ENTITY_COUNTS = `
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
`;
|
|
681
|
+
// ---------------------------------------------------------------------------------------------
|
|
682
|
+
// Threat (Emerging Exposures) — the apps-api public subgraph behind the threat tools.
|
|
683
|
+
//
|
|
684
|
+
// - `emergingExposure` -> get-threat (per-CVE decision-grade brief)
|
|
685
|
+
// - `emergingExposureTrending` -> get-threat-trending (the cached trending region)
|
|
686
|
+
// - `emergingExposureEnvironments` -> check-threat-exposure (this account's own exposure)
|
|
687
|
+
//
|
|
688
|
+
// The brief has TWO selection sets: a compact one (the default get-threat output) and a full one
|
|
689
|
+
// (used only when the caller passes `detail: true`). The compact set is a deliberate subset — the
|
|
690
|
+
// full brief is ~40 nested types and is a large payload to hand a model on every call.
|
|
691
|
+
//
|
|
692
|
+
// Every union is queried with `__typename` plus inline fragments so the handler can flatten it to
|
|
693
|
+
// a discriminated shape. Enum values are the engine's exact lowercase tokens (`act_now`, not
|
|
694
|
+
// `ACT_NOW`) — do not uppercase them.
|
|
695
|
+
// ---------------------------------------------------------------------------------------------
|
|
696
|
+
/** One emphasis-tagged narrative run. */
|
|
697
|
+
const SEGMENT_FIELDS = `
|
|
698
|
+
text
|
|
699
|
+
emphasis
|
|
700
|
+
`;
|
|
701
|
+
/** The four metric tiles, a discriminated union in fixed order (cvss, epss, maturity, kev). */
|
|
702
|
+
const METRIC_TILE_FIELDS = `
|
|
703
|
+
__typename
|
|
704
|
+
... on EmergingExposureCvssTile { score severity emphasis }
|
|
705
|
+
... on EmergingExposureEpssTile { percentile emphasis }
|
|
706
|
+
... on EmergingExposureMaturityTile { maturity emphasis }
|
|
707
|
+
... on EmergingExposureKevTile { state emphasis }
|
|
708
|
+
`;
|
|
709
|
+
/** A BOD 26-04 remediation branch. */
|
|
710
|
+
const BOD_BRANCH_FIELDS = `
|
|
711
|
+
exposure
|
|
712
|
+
outcome
|
|
713
|
+
dueInDays
|
|
714
|
+
urgencyWord
|
|
715
|
+
`;
|
|
716
|
+
const REMEDIATION_FIELDS = `
|
|
717
|
+
available
|
|
718
|
+
envGap
|
|
719
|
+
knownPoints { kev automatable technicalImpact }
|
|
720
|
+
branches { ${BOD_BRANCH_FIELDS} }
|
|
721
|
+
resolvedBranch { ${BOD_BRANCH_FIELDS} }
|
|
722
|
+
kevDueDate
|
|
723
|
+
`;
|
|
724
|
+
const TIMELINE_FIELDS = `
|
|
725
|
+
nodes { id state date }
|
|
726
|
+
kevLead { kind days }
|
|
727
|
+
inCisaKev
|
|
728
|
+
inVulncheckKev
|
|
729
|
+
cisaKevDateAdded
|
|
730
|
+
vulncheckKevDateAdded
|
|
731
|
+
`;
|
|
732
|
+
const EXPLOITATION_ACTIVITY_FIELDS = `
|
|
733
|
+
state
|
|
734
|
+
firstObserved
|
|
735
|
+
lastObserved
|
|
736
|
+
source
|
|
737
|
+
quiet
|
|
738
|
+
lastReportedDate
|
|
739
|
+
windowDays
|
|
740
|
+
`;
|
|
741
|
+
/** Compact who-is-using-it: booleans + counts + the active-exploitation signal (no drill-in lists). */
|
|
742
|
+
const WHO_IS_USING_IT_COMPACT = `
|
|
743
|
+
threatActors
|
|
744
|
+
ransomware
|
|
745
|
+
botnets
|
|
746
|
+
honeypot
|
|
747
|
+
canaries
|
|
748
|
+
github
|
|
749
|
+
hasAttribution
|
|
750
|
+
counts { threatActors botnets ransomwareFamilies githubRepos }
|
|
751
|
+
exploitationActivity { ${EXPLOITATION_ACTIVITY_FIELDS} }
|
|
752
|
+
`;
|
|
753
|
+
/**
|
|
754
|
+
* The compact brief — the default get-threat payload. Decision-first: verdict,
|
|
755
|
+
* tiles, remediation window, timeline, coverage gap, and who-is-using-it signals,
|
|
756
|
+
* without the heavy drill-in lists (CPE footprints, threat-actor techniques,
|
|
757
|
+
* detection tooling, references) that only `detail: true` fetches.
|
|
758
|
+
*
|
|
759
|
+
* `ssvc.divergences` is selected here as well as on the full brief: the sources behind the triple
|
|
760
|
+
* can disagree — CVE-2026-11613 on dev (2026-09-14) carries exploitation displayed `active`
|
|
761
|
+
* against another source's `none` while `verdict.headline` states flatly that it is exploited in
|
|
762
|
+
* the wild. It costs a handful of bytes, and without it the compact brief asserts the claim with
|
|
763
|
+
* the contradiction stripped out.
|
|
764
|
+
*/
|
|
765
|
+
exports.GET_THREAT_COMPACT = `
|
|
766
|
+
query GetThreatBriefCompact($subjectId: String!, $assetExposure: EmergingExposureAssetExposure) {
|
|
767
|
+
emergingExposure(subjectId: $subjectId, assetExposure: $assetExposure) {
|
|
768
|
+
__typename
|
|
769
|
+
... on EmergingExposureBrief {
|
|
770
|
+
subjectId
|
|
771
|
+
assessedAt
|
|
772
|
+
verdict {
|
|
773
|
+
tier
|
|
774
|
+
stance
|
|
775
|
+
impactLabel
|
|
776
|
+
headline { ${SEGMENT_FIELDS} }
|
|
777
|
+
support { ${SEGMENT_FIELDS} }
|
|
778
|
+
beats
|
|
779
|
+
}
|
|
780
|
+
tiles { ${METRIC_TILE_FIELDS} }
|
|
781
|
+
ssvc {
|
|
782
|
+
available
|
|
783
|
+
source
|
|
784
|
+
triple { exploitation automatable technicalImpact }
|
|
785
|
+
divergences { field displayed other }
|
|
786
|
+
amplifier
|
|
787
|
+
}
|
|
788
|
+
remediation { ${REMEDIATION_FIELDS} }
|
|
789
|
+
timeline { ${TIMELINE_FIELDS} }
|
|
790
|
+
coverage { coverageGap scanners { scanner covered shipDate } }
|
|
791
|
+
whoIsUsingIt { ${WHO_IS_USING_IT_COMPACT} }
|
|
792
|
+
fingerprint { affectedProduct { vendor product versionRanges } }
|
|
793
|
+
}
|
|
794
|
+
... on EmergingExposureNotFound { subjectId }
|
|
795
|
+
... on EmergingExposureInvalidInput { message }
|
|
796
|
+
... on EmergingExposureSourceUnavailable { subjectId retryable }
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
`;
|
|
800
|
+
const CVSS_VECTOR_FIELDS = `
|
|
801
|
+
version
|
|
802
|
+
baseScore
|
|
803
|
+
baseSeverity
|
|
804
|
+
impactScore
|
|
805
|
+
vectorString
|
|
806
|
+
type
|
|
807
|
+
`;
|
|
808
|
+
const AFFECTED_CPE_FIELDS = `
|
|
809
|
+
criteria
|
|
810
|
+
part
|
|
811
|
+
vendor
|
|
812
|
+
product
|
|
813
|
+
vulnerable
|
|
814
|
+
versionStartIncluding
|
|
815
|
+
versionStartExcluding
|
|
816
|
+
versionEndIncluding
|
|
817
|
+
versionEndExcluding
|
|
818
|
+
`;
|
|
819
|
+
const CROSSWALK_PROVENANCE_FIELDS = `
|
|
820
|
+
source
|
|
821
|
+
mapping
|
|
822
|
+
version
|
|
823
|
+
published
|
|
824
|
+
attribution
|
|
825
|
+
license
|
|
826
|
+
`;
|
|
827
|
+
const NAMED_ENTITY_FIELDS = `
|
|
828
|
+
name
|
|
829
|
+
malpediaUrl
|
|
830
|
+
`;
|
|
831
|
+
/**
|
|
832
|
+
* The full brief — fetched only when get-threat is called with `detail: true`. Everything on
|
|
833
|
+
* EmergingExposureBrief except five lists measured on dev that made the payload unusable —
|
|
834
|
+
* 6.1 MB for Log4Shell, 2.7 MB for CVE-2023-4966, past the tool-result limit of at least one host:
|
|
835
|
+
* - `sources.references` and `fixAndMitigation.references`: the same list twice (5,519 rows for
|
|
836
|
+
* Log4Shell, byte-identical), 1.8 MB each. `sourceLabels` and `detection.exploitRefs` stay.
|
|
837
|
+
* - `threatActorAttribution.actors[].priorCveReferences`: an "Unattributed" bucket citing
|
|
838
|
+
* thousands of OTHER CVEs (4,930 rows, ~1 MB); the actors, techniques and controls stay.
|
|
839
|
+
* - `whatItIs.affectedFootprint.cpes`: a near-copy of `fingerprint.additionalCpes`, which stays.
|
|
840
|
+
* - `actors[].techniques[].nistControls/cisControls`: the full control list repeated inside each
|
|
841
|
+
* of 270 techniques (1.0 MB of the 1.2 MB left after the first three); the aggregate mapping in
|
|
842
|
+
* `detection.controlMapping` stays.
|
|
843
|
+
* - `actors[].vendorsProductsTargeted`: the same "Unattributed" bucket as `priorCveReferences`,
|
|
844
|
+
* missed when that one went. Every vendor/product the bucket has ever been associated with,
|
|
845
|
+
* unrelated to the subject — 2,095 rows / 121 KB of a 136 KB brief for CVE-2026-11613, a CVE
|
|
846
|
+
* with one actor and no product identity of its own (2026-09-14). The actor's `techniques`,
|
|
847
|
+
* `country` and `sourceUrl` stay; `fingerprint.affectedProduct` is where the subject's own
|
|
848
|
+
* product belongs.
|
|
849
|
+
*/
|
|
850
|
+
exports.GET_THREAT_FULL = `
|
|
851
|
+
query GetThreatBriefFull($subjectId: String!, $assetExposure: EmergingExposureAssetExposure) {
|
|
852
|
+
emergingExposure(subjectId: $subjectId, assetExposure: $assetExposure) {
|
|
853
|
+
__typename
|
|
854
|
+
... on EmergingExposureBrief {
|
|
855
|
+
subjectId
|
|
856
|
+
assessedAt
|
|
857
|
+
verdict {
|
|
858
|
+
tier
|
|
859
|
+
stance
|
|
860
|
+
impactLabel
|
|
861
|
+
headline { ${SEGMENT_FIELDS} }
|
|
862
|
+
support { ${SEGMENT_FIELDS} }
|
|
863
|
+
beats
|
|
864
|
+
}
|
|
865
|
+
tiles { ${METRIC_TILE_FIELDS} }
|
|
866
|
+
ssvc {
|
|
867
|
+
available
|
|
868
|
+
source
|
|
869
|
+
triple { exploitation automatable technicalImpact }
|
|
870
|
+
divergences { field displayed other }
|
|
871
|
+
amplifier
|
|
872
|
+
}
|
|
873
|
+
remediation { ${REMEDIATION_FIELDS} }
|
|
874
|
+
timeline { ${TIMELINE_FIELDS} }
|
|
875
|
+
whatItIs {
|
|
876
|
+
description
|
|
877
|
+
cwe { id name }
|
|
878
|
+
affectedFootprint { summary }
|
|
879
|
+
cvss {
|
|
880
|
+
primary { ${CVSS_VECTOR_FIELDS} }
|
|
881
|
+
all { ${CVSS_VECTOR_FIELDS} }
|
|
882
|
+
provenance { score severity vectorString cvssVersion sourceLabel type }
|
|
883
|
+
cnaOnly
|
|
884
|
+
sourceConflict { score sourceLabel }
|
|
885
|
+
vulnStatus
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
whoIsUsingIt {
|
|
889
|
+
${WHO_IS_USING_IT_COMPACT}
|
|
890
|
+
threatActorDates { firstSeen mostRecent }
|
|
891
|
+
ransomwareDates { firstSeen mostRecent }
|
|
892
|
+
botnetDates { firstSeen mostRecent }
|
|
893
|
+
honeypotFirstSeen
|
|
894
|
+
honeypotLastSeen
|
|
895
|
+
canariesFirstSeen
|
|
896
|
+
canariesLastObserved
|
|
897
|
+
exploitationDetail {
|
|
898
|
+
ransomware { ${NAMED_ENTITY_FIELDS} }
|
|
899
|
+
botnets { ${NAMED_ENTITY_FIELDS} }
|
|
900
|
+
githubRepos {
|
|
901
|
+
owner name fullPath htmlUrl stars forks language
|
|
902
|
+
exploitType dateAdded dateLastRevised trending
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
threatActorAttribution {
|
|
906
|
+
status
|
|
907
|
+
actors {
|
|
908
|
+
name country firstObserved sourceUrl
|
|
909
|
+
techniques { id name domain tactics subtechnique }
|
|
910
|
+
}
|
|
911
|
+
reports { source firstObserved }
|
|
912
|
+
count
|
|
913
|
+
hasUnattributedBucket
|
|
914
|
+
firstReported
|
|
915
|
+
mostRecentReported
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
coverage { coverageGap scanners { scanner covered shipDate } }
|
|
919
|
+
detection {
|
|
920
|
+
exploitRefs { url name source maturity }
|
|
921
|
+
tooling { name status }
|
|
922
|
+
hasInitialAccessExploit
|
|
923
|
+
frameworkMapping {
|
|
924
|
+
techniques { id name tactics }
|
|
925
|
+
capec
|
|
926
|
+
cwe
|
|
927
|
+
}
|
|
928
|
+
controlMapping {
|
|
929
|
+
hasTechniques
|
|
930
|
+
controls { id name family }
|
|
931
|
+
provenance { ${CROSSWALK_PROVENANCE_FIELDS} }
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
sources {
|
|
935
|
+
sourceLabels
|
|
936
|
+
crosswalk { ${CROSSWALK_PROVENANCE_FIELDS} }
|
|
937
|
+
}
|
|
938
|
+
fingerprint {
|
|
939
|
+
affectedProduct { vendor product versionRanges }
|
|
940
|
+
primaryCpes { ${AFFECTED_CPE_FIELDS} }
|
|
941
|
+
additionalCpes { ${AFFECTED_CPE_FIELDS} }
|
|
942
|
+
purls { purl version fixedVersion }
|
|
943
|
+
crossIds { source id url }
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
... on EmergingExposureNotFound { subjectId }
|
|
947
|
+
... on EmergingExposureInvalidInput { message }
|
|
948
|
+
... on EmergingExposureSourceUnavailable { subjectId retryable }
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
`;
|
|
952
|
+
/**
|
|
953
|
+
* The trending region. Cached (~30 min TTL) — the one non-live path. `items` is
|
|
954
|
+
* ranked and already truncated server-side. `affectedProduct` (vendor/product) is
|
|
955
|
+
* projected because it is the join key for the environment-relevance filter. The
|
|
956
|
+
* upstream also offers a `candidates` search-suggestion pool; it is not selected —
|
|
957
|
+
* it is not an existence check and carried nothing an agent could act on.
|
|
958
|
+
*/
|
|
959
|
+
exports.GET_THREAT_TRENDING = `
|
|
960
|
+
query GetThreatTrending {
|
|
961
|
+
emergingExposureTrending {
|
|
962
|
+
generatedAt
|
|
963
|
+
items {
|
|
964
|
+
subjectId
|
|
965
|
+
tier
|
|
966
|
+
impactLabel
|
|
967
|
+
affectedProduct { vendor product }
|
|
968
|
+
reason { event date ageDays actorClass }
|
|
969
|
+
trendingMilestones { event date ageDays recent }
|
|
970
|
+
coverageGap
|
|
971
|
+
addedToKev {
|
|
972
|
+
cisa { ageDays recent }
|
|
973
|
+
vulncheck { ageDays recent }
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
`;
|
|
979
|
+
/**
|
|
980
|
+
* The account's own exposure per subject (direct/strict match — joins on the
|
|
981
|
+
* unified vulnerability's `cveId`, so it sees only what a scanner already
|
|
982
|
+
* fingerprinted). Batched; every union member carries `subjectId`.
|
|
983
|
+
*/
|
|
984
|
+
exports.CHECK_THREAT_EXPOSURE = `
|
|
985
|
+
query CheckThreatExposure($subjectIds: [String!]!) {
|
|
986
|
+
emergingExposureEnvironments(subjectIds: $subjectIds) {
|
|
987
|
+
__typename
|
|
988
|
+
... on EmergingExposureEnvironment {
|
|
989
|
+
subjectId
|
|
990
|
+
scannerConfirmedAssetCount
|
|
991
|
+
unifiedVulnerabilityId
|
|
992
|
+
assetExposure
|
|
993
|
+
}
|
|
994
|
+
... on EmergingExposureEnvironmentInvalidSubject {
|
|
995
|
+
subjectId
|
|
996
|
+
message
|
|
997
|
+
}
|
|
998
|
+
... on EmergingExposureEnvironmentUnavailable {
|
|
999
|
+
subjectId
|
|
1000
|
+
retryable
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
`;
|
|
681
1005
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":";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;;;;;;;;GAWG;AACU,QAAA,kBAAkB,GAAG;;;;;;;;;;;uBAWX,cAAc;sBACf,cAAc;;;kBAGlB,kBAAkB;;;;;;;;wBAQZ,kBAAkB;qBACrB,eAAe;;yBAEX,uBAAuB;;;;;;;;CAQ/C,CAAC;AAEF,MAAM,kBAAkB,GAAG;;;;;;;CAO1B,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;;;;;;;;CAU3B,CAAC;AAEF,MAAM,2BAA2B,GAAG;;;;;;;CAOnC,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;CAG3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,eAAe,GAAG;;;;;;;;;;;uBAWR,cAAc;sBACf,cAAc;;;kBAGlB,kBAAkB;;;;;;;;wBAQZ,kBAAkB;qBACrB,eAAe;;;;;;wBAMZ,kBAAkB;oBACtB,kBAAkB;;;;;;;;YAQ1B,uBAAuB;;;;;;;;;2BASR,mBAAmB;wBACtB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgChB,2BAA2B;;;;;wBAK9B,2BAA2B;;;;0BAIzB,mBAAmB;6BAChB,mBAAmB;;;;;;;;;;CAU/C,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;CAmBlC,CAAC;AAEF;;;;GAIG;AACU,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBpC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { RuleService } from './services/rule-service.js';
|
|
|
4
4
|
import { DashboardService } from './services/dashboard-service.js';
|
|
5
5
|
import { IntegrationService } from './services/integration-service.js';
|
|
6
6
|
import { J1qlService } from './services/j1ql-service.js';
|
|
7
|
+
import { ThreatService } from './services/threat-service.js';
|
|
7
8
|
export declare class JupiterOneClient {
|
|
8
9
|
private client;
|
|
9
10
|
private config;
|
|
@@ -13,6 +14,7 @@ export declare class JupiterOneClient {
|
|
|
13
14
|
private accountService;
|
|
14
15
|
private integrationService;
|
|
15
16
|
j1qlService: J1qlService;
|
|
17
|
+
private threatService;
|
|
16
18
|
constructor(config: JupiterOneConfig);
|
|
17
19
|
cloneWithAccountId(accountId: string): JupiterOneClient;
|
|
18
20
|
getAllAlertInstances(...args: Parameters<AlertService['getAllAlertInstances']>): Promise<import("../types/jupiterone.js").AlertRuleInstance[]>;
|
|
@@ -98,5 +100,11 @@ export declare class JupiterOneClient {
|
|
|
98
100
|
}>;
|
|
99
101
|
executeJ1qlQuery(...args: Parameters<J1qlService['executeJ1qlQuery']>): Promise<any>;
|
|
100
102
|
listEntityTypes(): Promise<any>;
|
|
103
|
+
getThreatBrief(...args: Parameters<ThreatService['getThreatBrief']>): Promise<import("../types/jupiterone.js").ThreatBriefResult>;
|
|
104
|
+
getThreatTrending(...args: Parameters<ThreatService['getThreatTrending']>): Promise<{
|
|
105
|
+
generatedAt: string;
|
|
106
|
+
items: import("../types/jupiterone.js").ThreatTrendingItem[];
|
|
107
|
+
}>;
|
|
108
|
+
checkThreatExposure(...args: Parameters<ThreatService['checkThreatExposure']>): Promise<import("../types/jupiterone.js").ThreatEnvironmentResult[]>;
|
|
101
109
|
}
|
|
102
110
|
//# sourceMappingURL=jupiterone-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jupiterone-client.d.ts","sourceRoot":"","sources":["../../src/client/jupiterone-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,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,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,CAAC;;;;;;IAKhE,uBAAuB,CAC3B,GAAG,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAC;;;;;;IAK9D,kBAAkB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;;;;;;IAItF;;;;OAIG;IACG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM;IAI/E;;;;;;OAMG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,qBAAqB,EAAE,MAAM,EAC7B,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM;;;;;;;IAMT,gBAAgB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAIrE,eAAe;IAKf,cAAc,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAInE,iBAAiB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;;;;IAIzE,mBAAmB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAGpF"}
|
|
@@ -8,6 +8,7 @@ const dashboard_service_js_1 = require("./services/dashboard-service.js");
|
|
|
8
8
|
const account_service_js_1 = require("./services/account-service.js");
|
|
9
9
|
const integration_service_js_1 = require("./services/integration-service.js");
|
|
10
10
|
const j1ql_service_js_1 = require("./services/j1ql-service.js");
|
|
11
|
+
const threat_service_js_1 = require("./services/threat-service.js");
|
|
11
12
|
const package_json_1 = require("../../package.json");
|
|
12
13
|
class JupiterOneClient {
|
|
13
14
|
client;
|
|
@@ -18,6 +19,7 @@ class JupiterOneClient {
|
|
|
18
19
|
accountService;
|
|
19
20
|
integrationService;
|
|
20
21
|
j1qlService;
|
|
22
|
+
threatService;
|
|
21
23
|
constructor(config) {
|
|
22
24
|
this.config = config;
|
|
23
25
|
const headers = {
|
|
@@ -41,6 +43,7 @@ class JupiterOneClient {
|
|
|
41
43
|
this.integrationService = new integration_service_js_1.IntegrationService(this.client);
|
|
42
44
|
// The J1QL deferred-result poll uses raw fetch, not the GraphQL client, so it needs the signal too.
|
|
43
45
|
this.j1qlService = new j1ql_service_js_1.J1qlService(this.client, config.abortSignal);
|
|
46
|
+
this.threatService = new threat_service_js_1.ThreatService(this.client);
|
|
44
47
|
}
|
|
45
48
|
cloneWithAccountId(accountId) {
|
|
46
49
|
const newConfig = { ...this.config, accountId };
|
|
@@ -148,6 +151,16 @@ class JupiterOneClient {
|
|
|
148
151
|
async listEntityTypes() {
|
|
149
152
|
return this.j1qlService.listEntityTypes();
|
|
150
153
|
}
|
|
154
|
+
// Threat (Emerging Exposures) methods
|
|
155
|
+
async getThreatBrief(...args) {
|
|
156
|
+
return this.threatService.getThreatBrief(...args);
|
|
157
|
+
}
|
|
158
|
+
async getThreatTrending(...args) {
|
|
159
|
+
return this.threatService.getThreatTrending(...args);
|
|
160
|
+
}
|
|
161
|
+
async checkThreatExposure(...args) {
|
|
162
|
+
return this.threatService.checkThreatExposure(...args);
|
|
163
|
+
}
|
|
151
164
|
}
|
|
152
165
|
exports.JupiterOneClient = JupiterOneClient;
|
|
153
166
|
//# sourceMappingURL=jupiterone-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jupiterone-client.js","sourceRoot":"","sources":["../../src/client/jupiterone-client.ts"],"names":[],"mappings":";;;AAEA,2DAA8D;AAC9D,kEAA2D;AAC3D,gEAAyD;AACzD,0EAAmE;AACnE,sEAA+D;AAC/D,8EAAuE;AACvE,gEAAyD;AACzD,qDAA6C;AAE7C,MAAa,gBAAgB;IACnB,MAAM,CAAgB;IACtB,MAAM,CAAmB;IACzB,YAAY,CAAe;IAC5B,WAAW,CAAc;IACzB,gBAAgB,CAAmB;IAClC,cAAc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;IACH,KAAK,CAAC,iBAAiB,CAAC,gBAAwB,EAAE,qBAA6B;QAC7E,OAAO,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,KAAa,EACb,qBAA6B,EAC7B,MAAe,EACf,IAAa;QAEb,OAAO,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAClG,CAAC;IAED,eAAe;IACf,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAiD;QACzE,OAAO,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;IAED,sCAAsC;IACtC,KAAK,CAAC,cAAc,CAAC,GAAG,IAAiD;QACvE,OAAO,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,GAAG,IAAoD;QAC7E,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,GAAG,IAAsD;QACjF,OAAO,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;IACzD,CAAC;CACF;AAzMD,4CAyMC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
import type { ThreatAssetExposure, ThreatBriefResult, ThreatEnvironmentResult, ThreatTrendingResponse } from '../../types/jupiterone.js';
|
|
3
|
+
/**
|
|
4
|
+
* ThreatService — the client for JupiterOne's Emerging Exposures (threat intelligence) queries on
|
|
5
|
+
* the apps-api public subgraph. Mirrors the other per-domain services: thin request wrappers that
|
|
6
|
+
* surface the raw response and rethrow transport/permission errors for the tool chokepoint to frame.
|
|
7
|
+
*
|
|
8
|
+
* The brief and environment queries return GraphQL UNIONS. A `not_found` or an `unavailable` is a
|
|
9
|
+
* valid union member, NOT an error — only transport, schema, or permission failures throw. The tool
|
|
10
|
+
* handlers flatten the unions to a discriminated shape; nothing here interprets an outcome.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ThreatService {
|
|
13
|
+
private client;
|
|
14
|
+
constructor(client: GraphQLClient);
|
|
15
|
+
/**
|
|
16
|
+
* Fetch the decision-grade brief for one subject. `detail` selects the full brief; the default
|
|
17
|
+
* fetches the compact selection set. Returns one of the four outcome union members.
|
|
18
|
+
*/
|
|
19
|
+
getThreatBrief(subjectId: string, options?: {
|
|
20
|
+
assetExposure?: ThreatAssetExposure;
|
|
21
|
+
detail?: boolean;
|
|
22
|
+
}): Promise<ThreatBriefResult>;
|
|
23
|
+
/** Fetch the cached trending region (ranked items). */
|
|
24
|
+
getThreatTrending(): Promise<ThreatTrendingResponse['emergingExposureTrending']>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetch this account's own exposure for up to 25 subjects in one batched traversal. Each element
|
|
27
|
+
* carries its own `subjectId`; key off it rather than position.
|
|
28
|
+
*/
|
|
29
|
+
checkThreatExposure(subjectIds: string[]): Promise<ThreatEnvironmentResult[]>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=threat-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threat-service.d.ts","sourceRoot":"","sources":["../../../src/client/services/threat-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,2BAA2B,CAAC;AAQnC;;;;;;;;GAQG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;;OAGG;IACG,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;QAAE,aAAa,CAAC,EAAE,mBAAmB,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,GACtE,OAAO,CAAC,iBAAiB,CAAC;IAmB7B,uDAAuD;IACjD,iBAAiB,IAAI,OAAO,CAAC,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;IAiBtF;;;OAGG;IACG,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;CAgBpF"}
|