@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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThreatService = void 0;
|
|
4
|
+
const queries_js_1 = require("../graphql/queries.js");
|
|
5
|
+
/**
|
|
6
|
+
* ThreatService — the client for JupiterOne's Emerging Exposures (threat intelligence) queries on
|
|
7
|
+
* the apps-api public subgraph. Mirrors the other per-domain services: thin request wrappers that
|
|
8
|
+
* surface the raw response and rethrow transport/permission errors for the tool chokepoint to frame.
|
|
9
|
+
*
|
|
10
|
+
* The brief and environment queries return GraphQL UNIONS. A `not_found` or an `unavailable` is a
|
|
11
|
+
* valid union member, NOT an error — only transport, schema, or permission failures throw. The tool
|
|
12
|
+
* handlers flatten the unions to a discriminated shape; nothing here interprets an outcome.
|
|
13
|
+
*/
|
|
14
|
+
class ThreatService {
|
|
15
|
+
client;
|
|
16
|
+
constructor(client) {
|
|
17
|
+
this.client = client;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Fetch the decision-grade brief for one subject. `detail` selects the full brief; the default
|
|
21
|
+
* fetches the compact selection set. Returns one of the four outcome union members.
|
|
22
|
+
*/
|
|
23
|
+
async getThreatBrief(subjectId, options = {}) {
|
|
24
|
+
const document = options.detail ? queries_js_1.GET_THREAT_FULL : queries_js_1.GET_THREAT_COMPACT;
|
|
25
|
+
try {
|
|
26
|
+
const response = await this.client.request(document, { subjectId, assetExposure: options.assetExposure ?? null });
|
|
27
|
+
if (!response?.emergingExposure) {
|
|
28
|
+
throw new Error('Invalid response structure from JupiterOne API: emergingExposure is missing');
|
|
29
|
+
}
|
|
30
|
+
return response.emergingExposure;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
console.error('Error fetching threat brief:', error);
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Fetch the cached trending region (ranked items). */
|
|
38
|
+
async getThreatTrending() {
|
|
39
|
+
try {
|
|
40
|
+
const response = await this.client.request(queries_js_1.GET_THREAT_TRENDING);
|
|
41
|
+
const trending = response?.emergingExposureTrending;
|
|
42
|
+
if (!trending || !Array.isArray(trending.items)) {
|
|
43
|
+
throw new Error('Invalid response structure from JupiterOne API: emergingExposureTrending is missing ' +
|
|
44
|
+
'its items');
|
|
45
|
+
}
|
|
46
|
+
return trending;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
console.error('Error fetching trending threats:', error);
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fetch this account's own exposure for up to 25 subjects in one batched traversal. Each element
|
|
55
|
+
* carries its own `subjectId`; key off it rather than position.
|
|
56
|
+
*/
|
|
57
|
+
async checkThreatExposure(subjectIds) {
|
|
58
|
+
try {
|
|
59
|
+
const response = await this.client.request(queries_js_1.CHECK_THREAT_EXPOSURE, { subjectIds });
|
|
60
|
+
if (!Array.isArray(response?.emergingExposureEnvironments)) {
|
|
61
|
+
throw new Error('Invalid response structure from JupiterOne API: emergingExposureEnvironments is not an array');
|
|
62
|
+
}
|
|
63
|
+
return response.emergingExposureEnvironments;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error('Error checking threat exposure:', error);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.ThreatService = ThreatService;
|
|
72
|
+
//# sourceMappingURL=threat-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threat-service.js","sourceRoot":"","sources":["../../../src/client/services/threat-service.ts"],"names":[],"mappings":";;;AAOA,sDAK+B;AAE/B;;;;;;;;GAQG;AACH,MAAa,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;I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,CAAC,UAAoB;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAEvC,kCAAqB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,4BAA4B,CAAC,EAAE,CAAC;gBAC3D,MAAM,IAAI,KAAK,CACb,8FAA8F,CAC/F,CAAC;YACJ,CAAC;YACD,OAAO,QAAQ,CAAC,4BAA4B,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAnED,sCAmEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAm3GjD,CAAC"}
|
|
@@ -3,6 +3,54 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.descriptionMap = void 0;
|
|
4
4
|
/* AUTO-GENERATED — DO NOT EDIT MANUALLY */
|
|
5
5
|
exports.descriptionMap = {
|
|
6
|
+
"check-threat-exposure.md": `# Check Threat Exposure Tool
|
|
7
|
+
|
|
8
|
+
Answer, from **this account's own graph**, whether it is exposed to one or more
|
|
9
|
+
CVEs — how many of its devices a vulnerability scanner has confirmed carry each
|
|
10
|
+
CVE, a handle to drill into the affected assets, and whether any matched device
|
|
11
|
+
is internet-facing.
|
|
12
|
+
|
|
13
|
+
This is the **direct/strict** match: it joins on the unified vulnerability's
|
|
14
|
+
\`cveId\`, so it sees only what a scanner has already fingerprinted for that
|
|
15
|
+
specific CVE. It is the companion to \`get-threat\` (intelligence about the CVE)
|
|
16
|
+
and \`get-threat-trending\` (what is hot).
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
- \`cveIds\` (required): 1–25 CVE identifiers. Each is answered independently and
|
|
20
|
+
carries its own \`subjectId\`; key results off \`subjectId\`, not position. A
|
|
21
|
+
malformed id fails only its own entry.
|
|
22
|
+
|
|
23
|
+
## Reading the result — the rules that matter
|
|
24
|
+
- **\`status: "checked"\` means the lookup ran and the count is real.** It says nothing about
|
|
25
|
+
whether the vulnerability is remediated — read the count.
|
|
26
|
+
- **\`scannerConfirmedAssetCount: 0\` does NOT mean "not affected."** It means no scanner reported
|
|
27
|
+
it — absence of a finding is not evidence of absence. Render it as "none found," never "not
|
|
28
|
+
affected." There is no not-found outcome: a CVE that does not exist and a real CVE with no
|
|
29
|
+
scanner findings both return \`0\`. Only \`get-threat\` answers existence.
|
|
30
|
+
- **\`status: "unavailable"\` is NOT a zero count.** The graph lookup failed or timed out; it is a
|
|
31
|
+
retry state. Never collapse it into "0 affected."
|
|
32
|
+
- **\`assetExposure: null\` means unknown**, not "not internet-facing." It is set only when a matched
|
|
33
|
+
device carries an exposure classification.
|
|
34
|
+
- **A count is only as fresh as the scanner behind it.** Before calling a count live, drill in and
|
|
35
|
+
check when the findings were last observed; a feed that stopped months ago still reports its last
|
|
36
|
+
findings. \`unifiedVulnerabilityId\` is the \`_id\` of this account's \`unified_entity\` for the CVE:
|
|
37
|
+
\`\`\`
|
|
38
|
+
FIND * WITH _id = '<unifiedVulnerabilityId>' THAT RELATES TO Finding AS f THAT RELATES TO (Host|Device|Domain) AS a RETURN a.displayName, a._type, f._type, f._beginOn ORDER BY f._beginOn DESC LIMIT 50
|
|
39
|
+
\`\`\`
|
|
40
|
+
Restrict the second hop as shown — unrestricted, it is dominated by control tests and alerts.
|
|
41
|
+
- Ids are normalised to upper case before the lookup; casing does not matter.
|
|
42
|
+
|
|
43
|
+
Each result's \`status\` is one of: \`checked\`, \`invalid_input\`, \`unavailable\`.
|
|
44
|
+
|
|
45
|
+
## Access
|
|
46
|
+
Requires the account's VulnerabilityManagement entitlement and vulnerability read
|
|
47
|
+
permission.
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
\`\`\`json
|
|
51
|
+
{ "cveIds": ["CVE-2021-44228", "CVE-2023-4966"] }
|
|
52
|
+
\`\`\`
|
|
53
|
+
`,
|
|
6
54
|
"create-dashboard-widget.md": `# JupiterOne Create Dashboard Widget Tool
|
|
7
55
|
|
|
8
56
|
**Purpose**: Adds a new widget to a specified JupiterOne dashboard. This tool allows you to programmatically create visual widgets (such as pie charts, bar charts, tables, etc.) on any dashboard, using custom queries and configuration.
|
|
@@ -1742,6 +1790,101 @@ Get query results from a rule evaluation:
|
|
|
1742
1790
|
"rawDataKey": "results-key-123"
|
|
1743
1791
|
}
|
|
1744
1792
|
\`\`\``,
|
|
1793
|
+
"get-threat-trending.md": `# Get Trending Threats Tool
|
|
1794
|
+
|
|
1795
|
+
Return the ranked list of currently trending threats — CVEs that have recently
|
|
1796
|
+
escalated (newly exploited in the wild, weaponized, added to a KEV catalog, or a
|
|
1797
|
+
public PoC appeared). Each row carries the escalation reason, the affected
|
|
1798
|
+
vendor/product, whether a commercial-scanner coverage gap exists, and KEV
|
|
1799
|
+
additions.
|
|
1800
|
+
|
|
1801
|
+
This is JupiterOne's threat-intelligence trending region. It says what is hot
|
|
1802
|
+
right now; it does NOT say whether this account is affected — pair it with
|
|
1803
|
+
\`check-threat-exposure\` (direct/scanner match) or, for product-presence, a J1QL
|
|
1804
|
+
query on the row's \`affectedProduct\`.
|
|
1805
|
+
|
|
1806
|
+
## Parameters
|
|
1807
|
+
- \`limit\` (optional): client-side cap on the number of items returned. The server list is
|
|
1808
|
+
ranked and capped upstream (25 rows at the time of writing), usually all \`act_now\`, so list
|
|
1809
|
+
order is the ranking.
|
|
1810
|
+
|
|
1811
|
+
## Important
|
|
1812
|
+
- The list is **cached** (~30-minute TTL) — the one non-live path. \`generatedAt\` is the cache
|
|
1813
|
+
fill time of the instance that answered; consecutive calls can differ by a minute.
|
|
1814
|
+
- \`affectedProduct\` and \`impactLabel\` are **null on roughly a third of rows**. For those, a
|
|
1815
|
+
product-presence search is impossible from this result alone. \`get-threat\` may fill the gap — its
|
|
1816
|
+
compact brief carries \`affectedProduct\` — but **often it cannot**: a newly-trending CVE frequently
|
|
1817
|
+
has no product identity anywhere upstream, in the compact brief or under \`detail: true\`. When both
|
|
1818
|
+
are null the row simply cannot be assessed by presence. Use \`check-threat-exposure\` alone, and
|
|
1819
|
+
report the row as **"cannot assess"** — never as "not affected".
|
|
1820
|
+
- A product-presence search matches on **text**, so it also matches your own tooling: searching the
|
|
1821
|
+
graph for \`artifactory\` returns the container images of JupiterOne's *integration for* Artifactory,
|
|
1822
|
+
not a running Artifactory server. Before counting presence hits as exposure, confirm the matched
|
|
1823
|
+
entities are instances of the product rather than code, images, pipelines or alarms named after it.
|
|
1824
|
+
|
|
1825
|
+
## Access
|
|
1826
|
+
Requires the account's VulnerabilityManagement entitlement and vulnerability read
|
|
1827
|
+
permission.
|
|
1828
|
+
|
|
1829
|
+
## Example
|
|
1830
|
+
\`\`\`json
|
|
1831
|
+
{}
|
|
1832
|
+
\`\`\`
|
|
1833
|
+
`,
|
|
1834
|
+
"get-threat.md": `# Get Threat Brief Tool
|
|
1835
|
+
|
|
1836
|
+
Return JupiterOne's decision-grade threat brief for a single CVE — how dangerous
|
|
1837
|
+
it is, whether it is being exploited, whether the security ecosystem can detect
|
|
1838
|
+
it, and how fast CISA's directive says to remediate it. This is threat
|
|
1839
|
+
intelligence about the CVE itself; to find out whether **this account** is
|
|
1840
|
+
affected, use \`check-threat-exposure\`.
|
|
1841
|
+
|
|
1842
|
+
## Parameters
|
|
1843
|
+
- \`cveId\` (required): a CVE identifier, e.g. \`CVE-2021-44228\`. Case-insensitive.
|
|
1844
|
+
- \`assetExposure\` (optional): \`public\` or \`internal\`. The BOD 26-04 asset-exposure
|
|
1845
|
+
hook — when supplied, the remediation section returns a single resolved branch
|
|
1846
|
+
instead of the two-branch conditional. Omit to receive both branches when they differ; when the
|
|
1847
|
+
directive gives the same answer for public and internal assets the section carries one branch.
|
|
1848
|
+
- \`detail\` (optional, default \`false\`): when \`false\`, returns a compact,
|
|
1849
|
+
decision-first summary. When \`true\`, returns the full brief (CPE footprint, threat-actor
|
|
1850
|
+
techniques and control mappings, detection tooling, exploit references, source labels) — a
|
|
1851
|
+
much larger payload. The raw reference URL lists (thousands of rows) are not included.
|
|
1852
|
+
|
|
1853
|
+
The compact result also carries \`affectedProduct\` (vendor, product, version ranges) — the join key
|
|
1854
|
+
for a product-presence search of the graph when a trending row has none. It is **itself null for a
|
|
1855
|
+
substantial share of newly-trending CVEs**, and \`detail: true\` does not fill it in when it is: if
|
|
1856
|
+
the compact brief has no product, the full brief has none either, so do not spend the larger call
|
|
1857
|
+
looking. A CVE with no product identity cannot be assessed by presence at all — say so rather than
|
|
1858
|
+
reporting it as not affected.
|
|
1859
|
+
|
|
1860
|
+
The compact result carries \`ssvc.divergences\` when the sources behind the SSVC triple disagree
|
|
1861
|
+
(e.g. exploitation \`displayed: "active"\` against another source's \`"none"\`). The \`headline\` and
|
|
1862
|
+
\`support\` prose states the displayed value flatly, so when \`divergences\` is non-empty, carry the
|
|
1863
|
+
disagreement into any claim you make about active exploitation.
|
|
1864
|
+
|
|
1865
|
+
## Outcomes
|
|
1866
|
+
The \`outcome\` field is always one of four, and they are NOT interchangeable:
|
|
1867
|
+
- \`found\` — a brief was returned. This describes the lookup, not the CVE: it says nothing about
|
|
1868
|
+
whether the vulnerability is remediated anywhere.
|
|
1869
|
+
- \`not_found\` — a valid CVE id with no upstream record.
|
|
1870
|
+
- \`invalid_input\` — the input was not a CVE identifier; no lookup was attempted.
|
|
1871
|
+
- \`source_unavailable\` — the upstream was unreachable/timed out/rate-limited.
|
|
1872
|
+
**This is a retry state, never "no such CVE."** Do not tell the user the CVE
|
|
1873
|
+
does not exist; the id is preserved so you can retry.
|
|
1874
|
+
|
|
1875
|
+
## Access
|
|
1876
|
+
Requires the account's VulnerabilityManagement entitlement and vulnerability read
|
|
1877
|
+
permission. Without them the call returns an access-denied error.
|
|
1878
|
+
|
|
1879
|
+
## Example
|
|
1880
|
+
\`\`\`json
|
|
1881
|
+
{ "cveId": "CVE-2021-44228" }
|
|
1882
|
+
\`\`\`
|
|
1883
|
+
Full detail, with a known internet-facing asset:
|
|
1884
|
+
\`\`\`json
|
|
1885
|
+
{ "cveId": "CVE-2023-4966", "assetExposure": "public", "detail": true }
|
|
1886
|
+
\`\`\`
|
|
1887
|
+
`,
|
|
1745
1888
|
"list-accounts.md": `# List Accounts Tool
|
|
1746
1889
|
|
|
1747
1890
|
List the JupiterOne accounts the authenticated user can access. Returns each account's \`accountId\`, a human-readable \`displayName\`, and — when the host can construct one — \`mcpUrl\`, the connector/server URL that pins that account. The list is scoped to the user's memberships. Membership is not a guarantee of live access, though — an account may still reject the connection if access was revoked or disabled, or if it requires a different sign-in method such as SSO.
|
|
@@ -2053,6 +2196,54 @@ design the board on paper before creating anything.
|
|
|
2053
2196
|
exposed buckets" is a result worth showing; decide whether zero is the point, and if it is,
|
|
2054
2197
|
keep the widget with its \`noResultMessage\`. Then tell the user what the board shows, what it
|
|
2055
2198
|
deliberately does not, which reader each tier serves, and give them its URL.
|
|
2199
|
+
`,
|
|
2200
|
+
"prompt-check-trending-threats.md": `Review the currently trending threats. Scope: {{scope}}.
|
|
2201
|
+
|
|
2202
|
+
Use \`get-threat-trending\` to fetch the ranked list. It is cached (~30-minute TTL);
|
|
2203
|
+
\`generatedAt\` is the fill time. Each item carries \`subjectId\`, \`tier\`,
|
|
2204
|
+
\`impactLabel\`, \`affectedProduct\` (vendor/product), the escalation \`reason\` (event,
|
|
2205
|
+
date, days ago), \`trendingMilestones\`, \`coverageGap\`, and KEV additions.
|
|
2206
|
+
|
|
2207
|
+
Interpret the scope as follows.
|
|
2208
|
+
|
|
2209
|
+
## scope = all (default)
|
|
2210
|
+
Present every trending threat, regardless of whether this account is affected.
|
|
2211
|
+
Rank them as returned (most recently escalated first). For each, state the
|
|
2212
|
+
escalation reason and age, the tier, and flag a \`coverageGap\` (no commercial
|
|
2213
|
+
scanner can detect it — the sharpest signal a row carries). Do not filter.
|
|
2214
|
+
|
|
2215
|
+
## scope = environment
|
|
2216
|
+
Show only trending threats that are relevant to this account's environment. Two
|
|
2217
|
+
applicability bars — use PRODUCT PRESENCE as the default bar:
|
|
2218
|
+
|
|
2219
|
+
1. **Product presence (loose, version-agnostic — the default).** For each trending
|
|
2220
|
+
item, take \`affectedProduct.vendor\` / \`affectedProduct.product\` and use
|
|
2221
|
+
\`execute-j1ql-query\` to check whether the account runs that product AT ALL,
|
|
2222
|
+
regardless of version. Search across the plausible entity classes (e.g.
|
|
2223
|
+
Application, Host, Device, and installed-software/CodeModule entities) matching
|
|
2224
|
+
on name/displayName/vendor. Treat ANY match as "product present." A trending
|
|
2225
|
+
threat on one version of a product is shown if the customer has any instance of
|
|
2226
|
+
that product. **This is a heuristic name match** — it can over-match (an
|
|
2227
|
+
unrelated product of the same name) or under-match (the graph names the product
|
|
2228
|
+
differently); label these results "product likely present, version unconfirmed"
|
|
2229
|
+
and never state a definitive version-specific exposure from this bar alone.
|
|
2230
|
+
Rows with \`affectedProduct: null\` (roughly a third) cannot be checked this way: call
|
|
2231
|
+
\`get-threat\` for the row and use the compact brief's \`affectedProduct\` if present;
|
|
2232
|
+
otherwise rely on the direct match alone and say so in the output.
|
|
2233
|
+
|
|
2234
|
+
2. **Direct match (strict — an overlay, not the gate).** Also call
|
|
2235
|
+
\`check-threat-exposure\` with the trending \`subjectId\`s (batched, ≤25) to get the
|
|
2236
|
+
scanner-confirmed signal. Where \`scannerConfirmedAssetCount > 0\`, annotate the
|
|
2237
|
+
row as "scanner-confirmed on N assets" — a stronger statement than product
|
|
2238
|
+
presence. Remember: count \`0\` means "none found," not "not affected," and
|
|
2239
|
+
\`unavailable\` is a retry state, not a zero.
|
|
2240
|
+
|
|
2241
|
+
Present the relevant threats ranked, each showing which bar it met (product present
|
|
2242
|
+
vs scanner-confirmed) and its escalation reason and remediation urgency. If nothing
|
|
2243
|
+
is relevant, say so plainly rather than padding the list.
|
|
2244
|
+
|
|
2245
|
+
(A future option may let the user require a direct match only; for now the default
|
|
2246
|
+
bar is product presence.)
|
|
2056
2247
|
`,
|
|
2057
2248
|
"server-instructions.md": `JupiterOne is a security asset graph. Assets are entities, connected by relationships, queried with
|
|
2058
2249
|
J1QL. Use these tools for anything about the user's real inventory, misconfigurations,
|
|
@@ -2143,6 +2334,21 @@ cursor silently re-returns the first page rather than advancing.
|
|
|
2143
2334
|
\`get-rule-evaluation-details\` for that run's conditions and actions, or a \`rawDataKey\` to
|
|
2144
2335
|
\`get-rule-evaluation-query-results\` for the entities it matched.
|
|
2145
2336
|
|
|
2337
|
+
## Threat intelligence vs. your own environment
|
|
2338
|
+
|
|
2339
|
+
Three threat tools answer three different questions, and conflating them is the trap. \`get-threat\`
|
|
2340
|
+
is intelligence about a CVE itself (how dangerous, exploited, detectable, remediation deadline).
|
|
2341
|
+
\`get-threat-trending\` is what has recently escalated across the ecosystem. \`check-threat-exposure\`
|
|
2342
|
+
is the only one that reads THIS account's graph — whether a scanner has confirmed the CVE on the
|
|
2343
|
+
account's devices. A trending or high-tier CVE says nothing about whether the account is affected
|
|
2344
|
+
until you check exposure. For a looser read than a scanner match — the account runs the affected
|
|
2345
|
+
product at any version — take a trending row's \`affectedProduct\` (vendor/product) and search the
|
|
2346
|
+
graph with \`execute-j1ql-query\`; treat a name match as "product likely present, version
|
|
2347
|
+
unconfirmed", never a definitive exposure.
|
|
2348
|
+
|
|
2349
|
+
These tools also need the account's VulnerabilityManagement entitlement and vulnerability read
|
|
2350
|
+
permission. An access-denied from them says so; do not read it as a revoked account.
|
|
2351
|
+
|
|
2146
2352
|
## Permissions are advisory, never a reason to refuse
|
|
2147
2353
|
|
|
2148
2354
|
\`test-connection\` reports \`permissions.resourceAreas\` and \`permissions.hasBroadAccess\`. Both
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-map.js","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC9B,QAAA,cAAc,GAA2B;IACpD,4BAA4B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAyc2D;IACzF,qBAAqB,EAAE;;;;;;;;;;;;;iGAawE;IAC/F,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACH,OAAO,CAAC,QAAQ;IAKhB,oDAAoD;IACpD,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,gBAAgB;IAsBxB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAC0G;YAE3I,MAAM;IA0DpB;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,GAAG,cAAc;IAI3E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAM5B"}
|
|
@@ -35,6 +35,17 @@ function isStandardSchema(outputSchema) {
|
|
|
35
35
|
function buildOutputSchema(outputSchema) {
|
|
36
36
|
return isStandardSchema(outputSchema) ? outputSchema : zod_1.z.object(outputSchema).loose();
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* A prompt's single user message, built from a description template with every `{{name}}` filled
|
|
40
|
+
* from `vars`. Function replacement, because as a string `$&`, `$'` and `$1` in a user-supplied value
|
|
41
|
+
* would be read as replacement patterns and silently rewrite what they typed. Global, because a
|
|
42
|
+
* template may name the same argument in several steps. A placeholder `vars` does not name is left
|
|
43
|
+
* as written.
|
|
44
|
+
*/
|
|
45
|
+
function promptFromTemplate(file, vars) {
|
|
46
|
+
const text = (0, load_description_js_1.loadDescription)(file).replace(/\{\{(\w+)\}\}/g, (placeholder, name) => Object.hasOwn(vars, name) ? vars[name] : placeholder);
|
|
47
|
+
return { messages: [{ role: 'user', content: { type: 'text', text } }] };
|
|
48
|
+
}
|
|
38
49
|
class JupiterOneMcpServer {
|
|
39
50
|
server;
|
|
40
51
|
client;
|
|
@@ -94,19 +105,23 @@ class JupiterOneMcpServer {
|
|
|
94
105
|
.string()
|
|
95
106
|
.describe('What the dashboard is for, e.g. "a CISO view of internet-exposed risk"'),
|
|
96
107
|
},
|
|
97
|
-
}, ({ objective }) => ({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
}, ({ objective }) => promptFromTemplate('prompt-build-dashboard.md', { objective }));
|
|
109
|
+
// Trending-threat triage: a multi-tool sequence no single tool description can own (trending
|
|
110
|
+
// -> product presence via J1QL -> scanner-confirmed exposure as an overlay). A per-CVE
|
|
111
|
+
// investigation needs no prompt: get-threat and check-threat-exposure each name the other.
|
|
112
|
+
server.registerPrompt('check-trending-threats', {
|
|
113
|
+
title: 'Check trending threats',
|
|
114
|
+
description: 'Review the currently trending threats. Default shows all trending threats; scope ' +
|
|
115
|
+
'"environment" filters to those relevant to this account (product presence, with the ' +
|
|
116
|
+
'scanner-confirmed match as an overlay).',
|
|
117
|
+
argsSchema: {
|
|
118
|
+
scope: zod_1.z
|
|
119
|
+
.enum(['all', 'environment'])
|
|
120
|
+
.optional()
|
|
121
|
+
.describe('all (default) = every trending threat; environment = only those relevant to this ' +
|
|
122
|
+
"account's environment."),
|
|
123
|
+
},
|
|
124
|
+
}, ({ scope }) => promptFromTemplate('prompt-check-trending-threats.md', { scope: scope ?? 'all' }));
|
|
110
125
|
for (const tool of index_js_1.allTools) {
|
|
111
126
|
// Account-discovery tools need a host-supplied resolver (the multi-tenant remote); skip them
|
|
112
127
|
// when none is provided (stdio / fixed-account connectors have nothing to list or select).
|
|
@@ -219,6 +234,7 @@ class JupiterOneMcpServer {
|
|
|
219
234
|
? (0, errors_js_1.accessDeniedResult)(deniedStatus, {
|
|
220
235
|
hasAccountDiscovery: !!this.resolveAccounts,
|
|
221
236
|
pinnedAccountId: this.envAccountId,
|
|
237
|
+
hint: tool.accessDeniedHint,
|
|
222
238
|
})
|
|
223
239
|
: tool.formatError
|
|
224
240
|
? tool.formatError(error, toolParams, this.validator)
|
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GAAG,SAAS;gBAClC,UAAU;gBACV,YAAY;gBACZ,SAAS;gBACT,MAAM;gBACN,KAAK,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;gBACjC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAA,0BAAe,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;aAChE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAA8C;QAC9D,OAAO,IAAA,yBAAgB,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,KAAK;QACT,sFAAsF;QACtF,2EAA2E;QAC3E,2FAA2F;QAC3F,+FAA+F;QAC/F,yEAAyE;QACzE,IAAI,CAAC,WAAW,GAAG,IAAA,kBAAU,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,IAAI;QACR,sFAAsF;QACtF,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC;IACxB,CAAC;;AAxRH,kDAyRC"}
|
|
@@ -17,6 +17,8 @@ export interface AccessDeniedContext {
|
|
|
17
17
|
hasAccountDiscovery: boolean;
|
|
18
18
|
/** The fixed account this instance is bound to (URL subdomain / env config), when single-tenant. */
|
|
19
19
|
pinnedAccountId?: string;
|
|
20
|
+
/** Tool-supplied sentence for a tool whose API gates on more than account membership. */
|
|
21
|
+
hint?: string;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Agent-facing message for an access-denied upstream response. Three shapes:
|
|
@@ -24,6 +26,9 @@ export interface AccessDeniedContext {
|
|
|
24
26
|
* steer to list-accounts + fixing the connector URL. Re-authenticating cannot fix a bad binding.
|
|
25
27
|
* - pinned, no discovery (stdio env account): point at the configured account and credentials.
|
|
26
28
|
* - multi-tenant: per-call accountId — steer to list-accounts and a different accountId.
|
|
29
|
+
*
|
|
30
|
+
* A tool that gates on more than account membership appends its own `hint`, so a 403 from an
|
|
31
|
+
* unentitled account is not read as a revoked one.
|
|
27
32
|
*/
|
|
28
33
|
export declare function accessDeniedMessage(statusCode: number, context: AccessDeniedContext): string;
|
|
29
34
|
export declare function accessDeniedResult(statusCode: number, context: AccessDeniedContext): ToolResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAiBrC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAYhE;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,wFAAwF;IACxF,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oGAAoG;IACpG,eAAe,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAiBrC;;;;;;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AAkF;AAClF,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AA0BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,GAC3B,uBAAuB,EAAE,CAuB3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,GAC3B,MAAM,EAAE,CAoBV;AAuCD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,uBAAuB,EAAE,EACrC,SAAS,GAAE,QAAQ,GAAG,QAAmB,GACxC,UAAU,CA0CZ"}
|
|
@@ -54,8 +54,15 @@ function accessDeniedStatus(error) {
|
|
|
54
54
|
* steer to list-accounts + fixing the connector URL. Re-authenticating cannot fix a bad binding.
|
|
55
55
|
* - pinned, no discovery (stdio env account): point at the configured account and credentials.
|
|
56
56
|
* - multi-tenant: per-call accountId — steer to list-accounts and a different accountId.
|
|
57
|
+
*
|
|
58
|
+
* A tool that gates on more than account membership appends its own `hint`, so a 403 from an
|
|
59
|
+
* unentitled account is not read as a revoked one.
|
|
57
60
|
*/
|
|
58
61
|
function accessDeniedMessage(statusCode, context) {
|
|
62
|
+
const base = accountAccessMessage(statusCode, context);
|
|
63
|
+
return context.hint ? `${base} ${context.hint}` : base;
|
|
64
|
+
}
|
|
65
|
+
function accountAccessMessage(statusCode, context) {
|
|
59
66
|
const { hasAccountDiscovery, pinnedAccountId } = context;
|
|
60
67
|
if (pinnedAccountId) {
|
|
61
68
|
const preamble = `Not authorized (HTTP ${statusCode}). This connection is pinned to account ` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":";;AAkCA,gDAYC;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":";;AAkCA,gDAYC;AAsBD,kDAGC;AA4BD,gDAKC;AAOD,0CAMC;AAiCD,0CAgBC;AAMD,oDAeC;AAGD,sEAcC;AAGD,4DAqBC;AAkDD,gDA0BC;AAaD,kDAuBC;AA6CD,kEA8CC;AA/aD,sEAAoE;AAEpE,qEAAoF;AAEpF,2EAKqC;AAErC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEjD,kGAAkG;AAClG,yGAAyG;AACzG,6CAA6C;AAC7C,MAAM,yBAAyB,GAA2B;IACxD,SAAS,EAAE,GAAG;IACd,eAAe,EAAE,GAAG;IACpB,YAAY,EAAE,GAAG;CAClB,CAAC;AAEF,iGAAiG;AACjG,qGAAqG;AACrG,MAAM,qBAAqB,GAAG,yDAAyD,CAAC;AAExF;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,CAAC,KAAK,YAAY,sCAAkB,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;QACjF,OAAO,KAAK,CAAC,UAAU,CAAC;IAC1B,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,yBAAyB,EAAE,CAAC;QAC1D,OAAO,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9C,OAAO,GAAG,C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AAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;YACvF,8FAA8F;YAC9F,4FAA4F;YAC5F,8FAA8F;YAC9F,iBAAiB,EAAE,YAAY;SAChC;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AASjD,wDAAwD;AACxD,eAAO,MAAM,QAAQ,EAAE,cAAc,EAQpC,CAAC"}
|
|
@@ -7,6 +7,7 @@ const dashboards_js_1 = require("./dashboards.js");
|
|
|
7
7
|
const integrations_js_1 = require("./integrations.js");
|
|
8
8
|
const j1ql_js_1 = require("./j1ql.js");
|
|
9
9
|
const account_js_1 = require("./account.js");
|
|
10
|
+
const threat_js_1 = require("./threat.js");
|
|
10
11
|
/** Every tool the server exposes, grouped by domain. */
|
|
11
12
|
exports.allTools = [
|
|
12
13
|
...rules_js_1.ruleTools,
|
|
@@ -15,5 +16,6 @@ exports.allTools = [
|
|
|
15
16
|
...integrations_js_1.integrationTools,
|
|
16
17
|
...j1ql_js_1.j1qlTools,
|
|
17
18
|
...account_js_1.accountTools,
|
|
19
|
+
...threat_js_1.threatTools,
|
|
18
20
|
];
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AACvC,2CAAyC;AACzC,mDAAiD;AACjD,uDAAqD;AACrD,uCAAsC;AACtC,6CAA4C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AACvC,2CAAyC;AACzC,mDAAiD;AACjD,uDAAqD;AACrD,uCAAsC;AACtC,6CAA4C;AAC5C,2CAA0C;AAE1C,wDAAwD;AAC3C,QAAA,QAAQ,GAAqB;IACxC,GAAG,oBAAS;IACZ,GAAG,sBAAU;IACb,GAAG,8BAAc;IACjB,GAAG,kCAAgB;IACnB,GAAG,mBAAS;IACZ,GAAG,yBAAY;IACf,GAAG,uBAAW;CACf,CAAC"}
|
|
@@ -19,7 +19,7 @@ export interface ToolTelemetryEvent {
|
|
|
19
19
|
reason?: string;
|
|
20
20
|
/** Sanitized, allowlisted summary of the call inputs (redacted J1QL, IDs, limits, names). */
|
|
21
21
|
input?: Record<string, unknown>;
|
|
22
|
-
/** Result metadata derived from structuredContent (resultCount, hasNextPage, status, isError). */
|
|
22
|
+
/** Result metadata derived from structuredContent (resultCount, hasNextPage, status, outcome, isError). */
|
|
23
23
|
result?: Record<string, unknown>;
|
|
24
24
|
}
|
|
25
25
|
/** Sink for tool telemetry. The remote injects a request-scoped logger that ships to New Relic. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/server/tools/telemetry.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/server/tools/telemetry.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,2GAA2G;IAC3G,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,mGAAmG;AACnG,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threat.d.ts","sourceRoot":"","sources":["../../../src/server/tools/threat.ts"],"names":[],"mappings":"AAUA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAyNxE,eAAO,MAAM,WAAW,EAAE,cAAc,EAwFvC,CAAC"}
|