@jupiterone/jupiterone-mcp 2.1.1 → 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 +48 -1
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +329 -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 +602 -14
- 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 +51 -1
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/alerts.d.ts.map +1 -1
- package/dist/server/tools/alerts.js +2 -5
- package/dist/server/tools/alerts.js.map +1 -1
- package/dist/server/tools/dashboard-layout.d.ts +80 -3
- package/dist/server/tools/dashboard-layout.d.ts.map +1 -1
- package/dist/server/tools/dashboard-layout.js +220 -15
- package/dist/server/tools/dashboard-layout.js.map +1 -1
- package/dist/server/tools/dashboards.d.ts.map +1 -1
- package/dist/server/tools/dashboards.js +379 -10
- package/dist/server/tools/dashboards.js.map +1 -1
- package/dist/server/tools/errors.d.ts +61 -10
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +201 -10
- 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/integrations.d.ts.map +1 -1
- package/dist/server/tools/integrations.js +15 -4
- package/dist/server/tools/integrations.js.map +1 -1
- package/dist/server/tools/j1ql.d.ts.map +1 -1
- package/dist/server/tools/j1ql.js +72 -4
- package/dist/server/tools/j1ql.js.map +1 -1
- package/dist/server/tools/rules.d.ts.map +1 -1
- package/dist/server/tools/rules.js +57 -6
- package/dist/server/tools/rules.js.map +1 -1
- package/dist/server/tools/telemetry.d.ts +7 -1
- package/dist/server/tools/telemetry.d.ts.map +1 -1
- package/dist/server/tools/telemetry.js.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 +7 -1
- package/dist/server/tools/types.js.map +1 -1
- package/dist/server/tools/usage.d.ts +13 -3
- package/dist/server/tools/usage.d.ts.map +1 -1
- package/dist/server/tools/usage.js +186 -7
- package/dist/server/tools/usage.js.map +1 -1
- package/dist/server/tools/value-probe.d.ts +85 -0
- package/dist/server/tools/value-probe.d.ts.map +1 -0
- package/dist/server/tools/value-probe.js +473 -0
- package/dist/server/tools/value-probe.js.map +1 -0
- package/dist/server/tools/widget-config-lint.d.ts +39 -0
- package/dist/server/tools/widget-config-lint.d.ts.map +1 -0
- package/dist/server/tools/widget-config-lint.js +290 -0
- package/dist/server/tools/widget-config-lint.js.map +1 -0
- package/dist/server/tools/widget-preflight.d.ts +63 -0
- package/dist/server/tools/widget-preflight.d.ts.map +1 -0
- package/dist/server/tools/widget-preflight.js +238 -0
- package/dist/server/tools/widget-preflight.js.map +1 -0
- package/dist/server/tools/widget-render-contract.d.ts +134 -0
- package/dist/server/tools/widget-render-contract.d.ts.map +1 -0
- package/dist/server/tools/widget-render-contract.js +421 -0
- package/dist/server/tools/widget-render-contract.js.map +1 -0
- package/dist/server/tools/widget-settings-keys.d.ts +51 -0
- package/dist/server/tools/widget-settings-keys.d.ts.map +1 -0
- package/dist/server/tools/widget-settings-keys.js +152 -0
- package/dist/server/tools/widget-settings-keys.js.map +1 -0
- package/dist/types/jupiterone.d.ts +139 -0
- package/dist/types/jupiterone.d.ts.map +1 -1
- package/dist/utils/j1ql-filters.d.ts +48 -0
- package/dist/utils/j1ql-filters.d.ts.map +1 -0
- package/dist/utils/j1ql-filters.js +184 -0
- package/dist/utils/j1ql-filters.js.map +1 -0
- package/dist/utils/j1ql-validator.d.ts +0 -5
- package/dist/utils/j1ql-validator.d.ts.map +1 -1
- package/dist/utils/j1ql-validator.js +27 -6
- package/dist/utils/j1ql-validator.js.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +1 -1
- package/package.json +1 -1
- package/dist/utils/description-loader.d.ts +0 -2
- package/dist/utils/description-loader.d.ts.map +0 -1
- package/dist/utils/description-loader.js +0 -17
- package/dist/utils/description-loader.js.map +0 -1
|
@@ -3,10 +3,77 @@ 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.
|
|
9
57
|
|
|
58
|
+
## Before you build: the render contract is enforced
|
|
59
|
+
|
|
60
|
+
Chart renderers read specific RETURN aliases. A query can be perfectly valid J1QL and still draw
|
|
61
|
+
nothing, so this tool **rejects** a widget whose query does not return the columns its chart type
|
|
62
|
+
reads. Nothing is created; fix and retry. The response carries a ready-to-run corrected query where
|
|
63
|
+
one can be derived safely — a straight alias rename — and otherwise names the alias shape to aim
|
|
64
|
+
for. The per-chart requirements are listed under "Chart Types and Example Queries" below.
|
|
65
|
+
|
|
66
|
+
Two things the check cannot do for you:
|
|
67
|
+
|
|
68
|
+
- **Confirm the query returns rows.** Run it through \`execute-j1ql-query\` first. A query that
|
|
69
|
+
returns nothing still creates a widget; that widget renders blank. The response reports
|
|
70
|
+
\`renderPreflight\` after the widget is written — deliberately, so that measuring what the widget
|
|
71
|
+
will draw can never delay or fail the write itself — but finding out beforehand costs you one call
|
|
72
|
+
and saves a correction.
|
|
73
|
+
- **Decide that empty is correct.** When it is — "critical findings: 0" is good news — set
|
|
74
|
+
\`noResultMessage\` so the widget says so instead of showing blank. Every JupiterOne-managed board
|
|
75
|
+
sets it.
|
|
76
|
+
|
|
10
77
|
This tool should be used when:
|
|
11
78
|
- You want to add a new visualization to an existing dashboard
|
|
12
79
|
- You need to automate dashboard widget creation for reporting or monitoring
|
|
@@ -18,8 +85,12 @@ This tool should be used when:
|
|
|
18
85
|
- \`title\`: Widget title
|
|
19
86
|
- \`description\`: Widget description (optional)
|
|
20
87
|
- \`type\`: Widget type (e.g., 'pie', 'bar', 'table', etc.)
|
|
21
|
-
- \`noResultMessage\`: Message
|
|
22
|
-
|
|
88
|
+
- \`noResultMessage\`: Message shown when the query returns nothing. Always set it — it is the
|
|
89
|
+
difference between a widget that explains itself and one that looks broken.
|
|
90
|
+
- \`config\`: Widget configuration, including queries and settings. Each query object takes \`name\`,
|
|
91
|
+
\`query\`, and optionally \`drilldownQuery\` — the J1QL opened when a reader clicks that query's
|
|
92
|
+
data point, so a count can lead to the assets it counted. It is parsed by the same gate as the
|
|
93
|
+
widget query, because it otherwise fails at the click rather than here.
|
|
23
94
|
|
|
24
95
|
## Supported Chart Types
|
|
25
96
|
|
|
@@ -85,11 +156,32 @@ When creating a dashboard, there are several options for widgets to choose from.
|
|
|
85
156
|
> **Note:**
|
|
86
157
|
> To enable trend functionality for a chart, set \`trendDataIsEnabled: true\` in the relevant chart type's settings (e.g., \`settings.pie.trendDataIsEnabled\`). You can also use keys like \`trendQueryResultsCount\` to control the number of trend data points, and \`upwardTrendIsGood\` to indicate if an upward trend is positive.
|
|
87
158
|
|
|
159
|
+
## Settings shared by several chart types
|
|
160
|
+
|
|
161
|
+
Every setting is nested under the chart type (\`settings.bar.decimalLimit\`). A key the service does
|
|
162
|
+
not recognise — at either level — is **dropped silently on save**, so the widget keeps its defaults
|
|
163
|
+
and the write still returns success. The response names anything it discarded; read it.
|
|
164
|
+
|
|
165
|
+
- **Threshold colouring** — \`default\`, \`success\`, \`warning\`, \`error\`, each
|
|
166
|
+
\`{"limitCondition": ..., "val1": ..., "val2": ...}\` where \`limitCondition\` is one of
|
|
167
|
+
\`greaterThan\`, \`greaterThanOrEqualTo\`, \`lessThan\`, \`lessThanOrEqualTo\`, \`equalTo\`, \`between\`
|
|
168
|
+
(\`val2\` is the upper bound of \`between\`). Long-standing on \`number\`, where it colours the value
|
|
169
|
+
text, and now also on \`bar\` and \`line\`, where it colours each bar or point whose OWN value
|
|
170
|
+
matches. Set one on any widget where a high number is bad news.
|
|
171
|
+
- **\`decimalLimit\`** — \`0\`, \`1\`, \`2\`, \`3\` or \`4\`: decimal places on the data labels. Accepted on
|
|
172
|
+
\`bar\`, \`line\`, \`number\` and \`pie\`. Counts want \`0\`.
|
|
173
|
+
- **Readability** — \`showDataLabels\` (bool), \`dataLabelUnit\` (\`'%'\`, \`'$'\`, \`'#'\` or \`''\`) and
|
|
174
|
+
\`chartFontSize\` (\`'small'\`, \`'medium'\`, \`'large'\`) on \`bar\`, \`line\`, \`area\` and \`pie\`;
|
|
175
|
+
\`xAxisLabel\` and \`yAxisLabel\` (strings) on \`bar\`, \`line\` and \`area\`. Axis labels are worth the
|
|
176
|
+
two keys — \`x\` and \`y\` tell a reader nothing.
|
|
177
|
+
|
|
88
178
|
## Number
|
|
89
179
|
The number chart visualization shows one large stat value. In the trend version of this chart you are able to track the value through a spark line to see if the result is getting larger or smaller over time.
|
|
90
180
|
|
|
91
181
|
### Query Requirements
|
|
92
|
-
Expects
|
|
182
|
+
**Enforced: required \`value\`.** Expects a single numeric column aliased \`value\`. That is a rule per
|
|
183
|
+
QUERY, not per widget: percentage mode below is legitimately multi-query, and each of those queries
|
|
184
|
+
still returns exactly one \`value\`.
|
|
93
185
|
|
|
94
186
|
### Example Queries
|
|
95
187
|
**Trend:**
|
|
@@ -103,13 +195,55 @@ FIND User AS u
|
|
|
103
195
|
RETURN count(u) AS value
|
|
104
196
|
\`\`\`
|
|
105
197
|
|
|
198
|
+
### Percentage mode — the way to chart a proportion
|
|
199
|
+
|
|
200
|
+
A number widget can show a ratio between its own queries instead of a count. The numerator is the
|
|
201
|
+
sum of the queries named in \`numeratorQueryName\`; the total is the sum of the others. "% of hosts
|
|
202
|
+
unpatched", as a query named \`Unpatched\`:
|
|
203
|
+
|
|
204
|
+
\`\`\`j1ql
|
|
205
|
+
FIND Host WITH patched = false AS h
|
|
206
|
+
RETURN count(h) AS value
|
|
207
|
+
\`\`\`
|
|
208
|
+
|
|
209
|
+
and one named \`All hosts\`:
|
|
210
|
+
|
|
211
|
+
\`\`\`j1ql
|
|
212
|
+
FIND Host AS h
|
|
213
|
+
RETURN count(h) AS value
|
|
214
|
+
\`\`\`
|
|
215
|
+
|
|
216
|
+
with:
|
|
217
|
+
|
|
218
|
+
\`\`\`json
|
|
219
|
+
{
|
|
220
|
+
"settings": {
|
|
221
|
+
"number": {
|
|
222
|
+
"showAsPercentage": true,
|
|
223
|
+
"numeratorQueryName": "Unpatched"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
\`\`\`
|
|
228
|
+
|
|
229
|
+
- \`numeratorQueryName\` is ONE string, not an array: several numerator queries are comma-joined into
|
|
230
|
+
it (\`"Unpatched,Stale"\`). A name matching no query on the widget makes the numerator zero, so the
|
|
231
|
+
widget draws a flat 0% that reads as healthy — this tool rejects that before writing, and names
|
|
232
|
+
the queries you do have.
|
|
233
|
+
- \`includeNumeratorInTotal\` decides what the total is. Left out (the default) it is "the other
|
|
234
|
+
queries", which is the pair above — a numerator and a query counting the whole population. Set
|
|
235
|
+
true it is "every query, numerator included", for queries that partition the population
|
|
236
|
+
(\`Patched\` + \`Unpatched\`).
|
|
237
|
+
- \`invertPercentage\` plots 100 − the ratio; \`showFraction\` shows the numerator/total breakdown
|
|
238
|
+
beside the figure. Both are number-only.
|
|
239
|
+
|
|
106
240
|
---
|
|
107
241
|
|
|
108
242
|
## Pie Chart
|
|
109
243
|
The pie chart displays values from one or more queries, as they relate to each other, in the form of slices of a pie. The arc length, area and central angle of a slice are all proportional to the slice's value, as it relates to the sum of all values. This type of chart is best used when you want a quick comparison of a small set of values in an aesthetically pleasing form. In the trend version of this chart you are able to track the value change of each slice value as well as the total value through a spark line to see if the data set is getting larger or smaller over time.
|
|
110
244
|
|
|
111
245
|
### Query Requirements
|
|
112
|
-
|
|
246
|
+
**Enforced: required \`value\`, and \`name\` too on a single-query pie.** The renderer GROUPS slices by the \`name\` column: a lone query without it does not draw an unlabelled pie, it draws ONE slice labelled \`undefined\` summing every row. A multi-query pie labels each slice by its own query name instead, so \`name\` is optional there.
|
|
113
247
|
|
|
114
248
|
### Example Queries
|
|
115
249
|
**Trend:**
|
|
@@ -128,21 +262,32 @@ RETURN
|
|
|
128
262
|
a.tag.AccountName AS name,
|
|
129
263
|
count(ds) AS value
|
|
130
264
|
\`\`\`
|
|
131
|
-
**Non-Trend 2
|
|
265
|
+
**Non-Trend 2 — one query per slice.** Only valid as one of SEVERAL queries on the widget, which is
|
|
266
|
+
what supplies the labels; a pie carrying this query alone draws a single \`undefined\` slice:
|
|
132
267
|
\`\`\`j1ql
|
|
133
|
-
FIND DataStore
|
|
268
|
+
FIND DataStore
|
|
269
|
+
WITH classification = 'critical' AS ds
|
|
134
270
|
THAT RELATES TO (Account|Service) AS a
|
|
135
271
|
RETURN
|
|
136
272
|
count(ds) AS value
|
|
137
273
|
\`\`\`
|
|
138
274
|
|
|
275
|
+
### Settings
|
|
276
|
+
|
|
277
|
+
\`type: 'percent'\` labels each slice with its share instead of its count; \`type: 'count'\` is the
|
|
278
|
+
default. \`hideSum\` drops the total from the centre. \`mapColorsByQuery\` colours by query rather than
|
|
279
|
+
by slice on a multi-query pie, and \`customColors\` sets them by index (see the example at the top).
|
|
280
|
+
|
|
139
281
|
---
|
|
140
282
|
|
|
141
283
|
## Bar Chart
|
|
142
284
|
The bar chart visualization allows you to view categorical data to analyze your queries with a specified x and y axis. You are able to run multiple queries and visualize the bar chart in stacked format. This chart is best suited for categorizing your results. In the trend version of the chart you are able to visualize the value change of each categorical result through a %Change indicator and a reference category bar of the result value from the previous time period selected.
|
|
143
285
|
|
|
144
286
|
### Query Requirements
|
|
145
|
-
|
|
287
|
+
**Enforced: required \`x\`, \`y\`.** Stacking is one query PER SERIES, never multiple \`y\` columns:
|
|
288
|
+
each query becomes one colored segment (with \`settings.bar.view: 'stacked'\`), aligned on the shared
|
|
289
|
+
\`x\` categories — keep the \`x\` alias identical across queries, and each query's \`name\` becomes its
|
|
290
|
+
series label in the legend.
|
|
146
291
|
|
|
147
292
|
### Example Queries
|
|
148
293
|
**Trend:**
|
|
@@ -175,7 +320,7 @@ LIMIT 5
|
|
|
175
320
|
The line chart is created by plotting a series of several points and connecting them with a straight line. This is best suited for data that has historical trend data enabled.
|
|
176
321
|
|
|
177
322
|
### Query Requirements
|
|
178
|
-
|
|
323
|
+
**Enforced: required \`y\`.** Add \`x\`, and \`line\` to split several series out of one query — both recommended, not required, because a multi-query line chart names its series by query.
|
|
179
324
|
|
|
180
325
|
### Example Queries
|
|
181
326
|
**Trend:**
|
|
@@ -196,13 +341,32 @@ RETURN
|
|
|
196
341
|
f.numericSeverity AS line
|
|
197
342
|
\`\`\`
|
|
198
343
|
|
|
344
|
+
### Percentage mode
|
|
345
|
+
|
|
346
|
+
\`showAsPercentage\` works here too, and it behaves differently from a number widget: the line chart
|
|
347
|
+
collapses ALL its queries into ONE derived ratio series rather than drawing a line each. So the
|
|
348
|
+
column rule is stricter — every query needs an \`x\` (the bucket its rows fall into) plus the metric,
|
|
349
|
+
and only the \`x\` positions present in EVERY query are plotted, so a gap is left out rather than
|
|
350
|
+
drawn as 0%. Alias the metric \`y\`: the renderer reads a \`value\` column first and falls back to \`y\`,
|
|
351
|
+
and \`y\` is what the requirement above enforces. The \`line\` grouping column is ignored in this mode.
|
|
352
|
+
|
|
353
|
+
\`\`\`j1ql
|
|
354
|
+
FIND Finding WITH open = true AS f
|
|
355
|
+
RETURN
|
|
356
|
+
f.createdOn AS x,
|
|
357
|
+
count(f) AS y
|
|
358
|
+
\`\`\`
|
|
359
|
+
|
|
360
|
+
\`numeratorQueryName\` and \`includeNumeratorInTotal\` mean what they do on a number widget;
|
|
361
|
+
\`invertPercentage\` and \`showFraction\` do not apply.
|
|
362
|
+
|
|
199
363
|
---
|
|
200
364
|
|
|
201
365
|
## Matrix Chart
|
|
202
366
|
The matrix chart is used for analyzing and displaying the relationship between data sets. The matrix diagram shows the relationship between two, three, or four groups of information.
|
|
203
367
|
|
|
204
368
|
### Query Requirements
|
|
205
|
-
|
|
369
|
+
**Enforced: required \`x\`, \`y\`.** Optional \`label\` is shown in each cell; any additional properties returned are shown as key: value.
|
|
206
370
|
|
|
207
371
|
### Example Queries
|
|
208
372
|
**Firewall matrix:**
|
|
@@ -245,17 +409,32 @@ FIND Person AS p
|
|
|
245
409
|
## Graph Chart
|
|
246
410
|
The graph chart displays a tree graph of query results. This chart is best used to visualize specific relationships between entities.
|
|
247
411
|
|
|
412
|
+
**Enforced: the query must \`RETURN TREE\`.** A graph widget draws the tree J1QL returns for that
|
|
413
|
+
projection; give it columns and there is nothing to draw.
|
|
414
|
+
|
|
248
415
|
### Example Queries
|
|
249
416
|
**Most recent people:**
|
|
250
417
|
\`\`\`j1ql
|
|
251
418
|
FIND Person RETURN TREE
|
|
252
419
|
\`\`\`
|
|
253
420
|
|
|
421
|
+
### Settings
|
|
422
|
+
|
|
423
|
+
\`viewType\` picks the layout — \`'mesh'\`, \`'tree'\`, \`'hierarchy'\` or \`'tree_horizontal'\` — and
|
|
424
|
+
\`nodeView\` is \`'expanded'\` or \`'grouped'\`. A traversal returning many nodes of the same type reads
|
|
425
|
+
far better grouped.
|
|
426
|
+
|
|
254
427
|
---
|
|
255
428
|
|
|
256
429
|
## Status
|
|
257
430
|
The status chart displays a visual summary of correlating queries. This chart is best used to show positive or negative results based on if relationships are present in query results. This chart is best suited by multiple queries.
|
|
258
431
|
|
|
432
|
+
**Enforced: required \`id\`, on every query.** The FIRST query is the identity roster and supplies
|
|
433
|
+
the display fields (\`... AS id, p.name AS displayName, p.iconWebLink AS iconWebLink\`); each LATER
|
|
434
|
+
query is one pass/fail check — an entity passes a check when that query returns a row with its
|
|
435
|
+
\`id\`, and fails when its \`id\` is absent. The \`id\` column is what correlates the queries with
|
|
436
|
+
each other — a check query without one contributes nothing and the row silently goes missing.
|
|
437
|
+
|
|
259
438
|
### Example Queries
|
|
260
439
|
**Users passing security check:**
|
|
261
440
|
\`\`\`j1ql
|
|
@@ -286,7 +465,7 @@ Find Person as p that is User as u
|
|
|
286
465
|
The area chart is a graph that combines a line chart and a bar chart to show changes in quantities over time. This chart requires the assets in the query to have relevant dates in their properties. For the best results, these charts can be generated by J1 Questions that have trend collection enabled. (This will soon be available straight from Insights.)
|
|
287
466
|
|
|
288
467
|
### Query Requirements
|
|
289
|
-
|
|
468
|
+
**Not a supported Insights widget type, and \`type: "area"\` is refused.** JupiterOne's documentation lists Number, Pie, Line, Bar, Matrix, Table, Graph and Status, and says "Area Chart is coming soon" — today an area trend comes from a Question. The API accepts an area widget and it renders nothing, so no column arrangement can fix it. Use \`bar\` or \`line\` instead.
|
|
290
469
|
|
|
291
470
|
### Example Queries
|
|
292
471
|
**Top 5 most open PRs by Person:**
|
|
@@ -1611,6 +1790,101 @@ Get query results from a rule evaluation:
|
|
|
1611
1790
|
"rawDataKey": "results-key-123"
|
|
1612
1791
|
}
|
|
1613
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
|
+
`,
|
|
1614
1888
|
"list-accounts.md": `# List Accounts Tool
|
|
1615
1889
|
|
|
1616
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.
|
|
@@ -1701,7 +1975,14 @@ Example response:
|
|
|
1701
1975
|
|
|
1702
1976
|
## Why This Is Essential
|
|
1703
1977
|
|
|
1704
|
-
When writing J1QL queries, you need to specify entity classes (like \`User\`, \`Device\`, \`Finding\`) or entity types (like \`aws_instance\`, \`github_user\`). Without running this tool first, you're essentially guessing what entities exist in your account. This tool provides the complete list of valid entity classes and types that you can query, ensuring your J1QL queries will actually find and return data
|
|
1978
|
+
When writing J1QL queries, you need to specify entity classes (like \`User\`, \`Device\`, \`Finding\`) or entity types (like \`aws_instance\`, \`github_user\`). Without running this tool first, you're essentially guessing what entities exist in your account. This tool provides the complete list of valid entity classes and types that you can query, ensuring your J1QL queries will actually find and return data.
|
|
1979
|
+
## Treat this list as a positive check, not a complete one
|
|
1980
|
+
|
|
1981
|
+
The counts come from a stored index, and it is not a superset of the graph: measured on a live
|
|
1982
|
+
tenant, it both disagreed with direct queries on counts and omitted types that queries returned. So
|
|
1983
|
+
a type appearing here proves it exists; a type missing from here does NOT prove it does not. When a
|
|
1984
|
+
type matters, confirm it directly with \`FIND <type> AS e RETURN count(e) AS value\`.
|
|
1985
|
+
`,
|
|
1705
1986
|
"list-rule-evaluations.md": `# List Rule Evaluations Tool
|
|
1706
1987
|
|
|
1707
1988
|
List the evaluation history for a specific rule. This tool shows when a rule was evaluated and the results of each evaluation.
|
|
@@ -1774,6 +2055,309 @@ To get all rules across multiple pages:
|
|
|
1774
2055
|
2. Check if \`pageInfo.hasNextPage\` is true
|
|
1775
2056
|
3. If true, call again with \`cursor\` set to \`pageInfo.endCursor\`
|
|
1776
2057
|
4. Repeat until \`hasNextPage\` is false`,
|
|
2058
|
+
"prompt-build-dashboard.md": `Build a JupiterOne Insights dashboard for: {{objective}}
|
|
2059
|
+
|
|
2060
|
+
You are building for a reader, not a grader. A board can pass every technical check and still be
|
|
2061
|
+
useless — ten near-identical tiles at uniform size is a data dump, not a dashboard. Work through
|
|
2062
|
+
the data steps first (skipping them is the main reason boards come back empty or wrong), then
|
|
2063
|
+
design the board on paper before creating anything.
|
|
2064
|
+
|
|
2065
|
+
## Get the data right
|
|
2066
|
+
|
|
2067
|
+
1. **Confirm the account.** Call \`test-connection\` and state which account you are on. A board
|
|
2068
|
+
validated on a demo tenant and delivered as production is the failure whose output looks
|
|
2069
|
+
entirely correct.
|
|
2070
|
+
|
|
2071
|
+
2. **Discover what this account actually holds.** \`list-entity-types\` for the classes and types
|
|
2072
|
+
present — treat it as a positive check only; a type missing from it may still exist. Sample
|
|
2073
|
+
every type you intend to use: \`FIND <type> AS e RETURN e.* LIMIT 5\`.
|
|
2074
|
+
|
|
2075
|
+
3. **Check the values you plan to filter or group on.** String comparison is case-sensitive and
|
|
2076
|
+
stored casing varies by integration — the same property routinely holds \`high\`, \`HIGH\` and
|
|
2077
|
+
\`High\` at once. For every literal you will filter on and every property you will group by:
|
|
2078
|
+
\`FIND <type> AS e RETURN e.<property> AS value, count(e) AS n ORDER BY n DESC LIMIT 250\`
|
|
2079
|
+
|
|
2080
|
+
4. **Prove every query** through \`execute-j1ql-query\` before building on it — rows AND shape. Two
|
|
2081
|
+
correctness traps that produce confident wrong numbers: rank entities by the entity itself (or
|
|
2082
|
+
\`_id\`), never by \`displayName\` — fleets share generic names and name-grouping silently merges
|
|
2083
|
+
distinct assets; and filter relationship semantics on the edge's own properties
|
|
2084
|
+
(\`rel.ingress = true\`), never on traversal direction, which does not filter anything.
|
|
2085
|
+
|
|
2086
|
+
## Design the board before building it
|
|
2087
|
+
|
|
2088
|
+
5. **Write down the reader's questions.** Who looks at this board, and what do they do next? If
|
|
2089
|
+
the objective does not name the reader or the goal, ask the user — with your environment's
|
|
2090
|
+
structured question tool (AskUserQuestion) when you have one, as one round of at most 4
|
|
2091
|
+
questions with concrete options and a recommended default each; in one plain message with
|
|
2092
|
+
stated defaults otherwise. Question Socratically: don't ask what widgets they want — ask the
|
|
2093
|
+
questions whose answers reveal it, in an order where each narrows the last. What decision
|
|
2094
|
+
should this board drive? Who makes it, and how often do they look? What would they do
|
|
2095
|
+
differently if the number were bad? What is deliberately out of scope? Never ask what you can
|
|
2096
|
+
discover from the graph yourself (which scanners feed it, whether exploitability fields are
|
|
2097
|
+
populated). Two answers change everything: *prove coverage to leadership* leads with
|
|
2098
|
+
percentage KPIs; *find the gaps for ops* leads with tables. Also settle the dashboard \`type\`:
|
|
2099
|
+
\`Account\` when the audience is a team, \`User\` for a personal workspace.
|
|
2100
|
+
|
|
2101
|
+
Every widget answers exactly one question; its **title states the answer's subject** ("Fleet
|
|
2102
|
+
coverage: devices with endpoint protection"), and its **description carries the method and
|
|
2103
|
+
caveats** (what counts as "open", what was normalized). 6–12 widgets — beyond ~15 the
|
|
2104
|
+
Insights page itself renders slowly; split by audience instead, and give a heavy graph
|
|
2105
|
+
traversal its own board.
|
|
2106
|
+
|
|
2107
|
+
The three tiers below are the DEFAULT for a metric-driven board, not a template to fill in:
|
|
2108
|
+
the structure serves the objective, never the other way around, and a board that ignores its
|
|
2109
|
+
objective's natural hero to satisfy a tier recipe is worse than one that breaks it. An
|
|
2110
|
+
incident/blast-radius board leads with the relationship \`graph\`; a compliance board is a
|
|
2111
|
+
\`status\` grid with a pass-rate tile; a pure inventory ask may be one excellent full-width
|
|
2112
|
+
table and two tiles. When the tiers do not fit, break them deliberately and say why in the
|
|
2113
|
+
markdown intro. Default composition:
|
|
2114
|
+
|
|
2115
|
+
- **Headline tier** — 2–4 \`number\` tiles, laid out \`small\`, first row: the figures the reader
|
|
2116
|
+
reacts to, with thresholds so a bad number reads as bad.
|
|
2117
|
+
- **Explanation tier** — the charts that say *why* the headline is what it is: breakdowns,
|
|
2118
|
+
rankings, trends. \`medium\`/\`large\`.
|
|
2119
|
+
- **Action tier** — one or two \`table\` widgets, \`full\` width, at the bottom: the specific
|
|
2120
|
+
items to go fix, with enough columns to act on.
|
|
2121
|
+
- Optionally open with a \`full\`-width \`markdown\` widget when the board needs a sentence of
|
|
2122
|
+
purpose or methodology a title cannot carry. Its slot grows with its text but caps at four
|
|
2123
|
+
rows, so keep the intro to roughly four short blocks and put the per-widget caveats in each
|
|
2124
|
+
widget's description — an intro longer than the fold pushes the numbers below it.
|
|
2125
|
+
|
|
2126
|
+
6. **Pick each widget's form by the reader's job — never default to one type.**
|
|
2127
|
+
|
|
2128
|
+
| The reader must… | Use | Not |
|
|
2129
|
+
|---|---|---|
|
|
2130
|
+
| React to one current value | \`number\` tile | a one-bar \`bar\`, a one-slice \`pie\` |
|
|
2131
|
+
| Judge a proportion or coverage ratio | \`number\` in percentage mode (\`showAsPercentage\` + \`numeratorQueryName\`; each query returns \`count(x) AS value\`) | a two-slice pie |
|
|
2132
|
+
| Compare or rank categories | \`bar\` (\`x\`,\`y\`) — one query per category when stored casings split, named for the category | a pie with many slices |
|
|
2133
|
+
| Follow change over time | \`line\`, or \`trendDataIsEnabled\` on a tile | — |
|
|
2134
|
+
| See part-to-whole, ≤6 slices | \`pie\` (\`name\` + \`value\`) | a pie of 10+ slices — use \`bar\` or \`table\` |
|
|
2135
|
+
| Act on specific items | \`table\` returning the entity itself (renders as a clickable link) plus the columns to act on | a chart of the same data |
|
|
2136
|
+
| Understand how things connect | \`graph\` with \`RETURN TREE\` — at most one per board, as a hero visual | — |
|
|
2137
|
+
|
|
2138
|
+
**Variety check:** when two widgets share the same type and the same shape, one of them is
|
|
2139
|
+
usually the wrong lens — turn a second count into a proportion, a trend, or the table behind
|
|
2140
|
+
it. A board of six identical tiles answers one question six times.
|
|
2141
|
+
|
|
2142
|
+
7. **Use the display capabilities — a board that ignores them reads as a draft.**
|
|
2143
|
+
|
|
2144
|
+
- **Thresholds** on \`number\`, \`bar\`, \`line\`: \`settings.<type>.error = {"limitCondition":
|
|
2145
|
+
"greaterThan", "val1": "0"}\` (also \`warning\`, \`success\`, \`default\`) — this is what makes a
|
|
2146
|
+
bad figure read as bad at a glance.
|
|
2147
|
+
- **Semantic colors** via \`settings.<type>.customColors\`: map severity ladders dark-red → red
|
|
2148
|
+
→ orange → blue, gray for neutral/"other" — color follows meaning, never decoration, and
|
|
2149
|
+
never a rainbow of arbitrary hues.
|
|
2150
|
+
- **Formatting**: \`decimalLimit\` (0–4) so figures read precisely; \`dataLabelUnit\` ('%', '$',
|
|
2151
|
+
'#') on \`bar\`/\`line\`/\`area\`/\`pie\` where the unit is not obvious — a \`number\` tile takes
|
|
2152
|
+
\`currencyFormat\` instead, and percentage mode renders its own \`%\`; axis labels on
|
|
2153
|
+
\`bar\`/\`line\` when the axes need naming.
|
|
2154
|
+
- **\`drilldownQuery\`** on every counting query: the J1QL a reader lands on when they click the
|
|
2155
|
+
number — typically the same filter returning the entities it counted. A count with no path
|
|
2156
|
+
to its items is a dead end.
|
|
2157
|
+
- **\`noResultMessage\` on every widget** — it is the difference between "verified clean" and
|
|
2158
|
+
"looks broken" when a query legitimately returns nothing.
|
|
2159
|
+
- **Percentage across casing splits**: a proportion whose property is stored in several
|
|
2160
|
+
casings is one numerator query ORing all its casings over one total query — cleaner than any
|
|
2161
|
+
grouped workaround.
|
|
2162
|
+
- **Trend where direction matters** (\`trendDataIsEnabled\` on number/pie/bar/line): data
|
|
2163
|
+
accrues forward-only from the day the flag is set, so a board headed for a recurring review
|
|
2164
|
+
gets its trend widgets on day one, not the week of the meeting. Set \`upwardTrendIsGood\`
|
|
2165
|
+
honestly — \`false\` for "open findings", \`true\` for "coverage".
|
|
2166
|
+
- **Figures the audience will copy or export live in tables** — charts do not export their
|
|
2167
|
+
rows, and the app renders large numbers compactly (\`234,000\` → \`234k\`).
|
|
2168
|
+
|
|
2169
|
+
**When the reader is an executive, these are rules, not suggestions** (they come from real
|
|
2170
|
+
executive feedback, and violating them is why boards get one glance): every coverage number
|
|
2171
|
+
carries its denominator — a percentage tile with \`showFraction: true\` shows "1,848 of 12,431"
|
|
2172
|
+
and the ratio in one widget, which survives the first question "of how many?"; the top risks
|
|
2173
|
+
sit at the very top, never below the fold; endpoint and cloud metrics never blend in one
|
|
2174
|
+
widget — blended numbers get challenged and lose the room; coverage math uses the deduplicated
|
|
2175
|
+
\`UnifiedDevice\`/\`UnifiedIdentity\` classes so multi-source assets do not double-count; at least
|
|
2176
|
+
one widget trends; and if accepted risks are not excluded, the widget description says
|
|
2177
|
+
"includes accepted risks" — surprise inflation destroys trust in the whole board.
|
|
2178
|
+
|
|
2179
|
+
## Build, lay out, verify
|
|
2180
|
+
|
|
2181
|
+
8. **Build.** \`create-dashboard\`, then \`create-dashboard-widget\` once per widget, in reading
|
|
2182
|
+
order.
|
|
2183
|
+
|
|
2184
|
+
9. **Lay it out deliberately.** \`update-dashboard\` with \`autoLayout\`, passing \`{ "id": …,
|
|
2185
|
+
"size": … }\` for every widget — the sizes ARE the visual hierarchy: \`small\` headline tiles
|
|
2186
|
+
share the first row, \`medium\`/\`large\` charts pair up beneath, \`full\` tables and markdown span
|
|
2187
|
+
the bottom and top. A list of bare ids gives every widget the same weight, which is how boards
|
|
2188
|
+
end up monotonous. **Make each row's sizes sum to twelve columns**: \`small\`+\`small\`+\`small\`
|
|
2189
|
+
(4+4+4), \`medium\`+\`medium\` (6+6), \`small\`+\`large\` (4+8), or \`full\` (12). The packer closes an
|
|
2190
|
+
incomplete row by widening its last widget, so an unpaired \`medium\` renders full-width — fine
|
|
2191
|
+
for a chart, but pair your tiles rather than leaving one to be stretched into a banner.
|
|
2192
|
+
|
|
2193
|
+
10. **Read what each write told you, before reporting done.** Every widget response carries a
|
|
2194
|
+
\`renderPreflight\`, and some carry \`configNotes\`. Act on a \`correctedQuery\` or a casing
|
|
2195
|
+
diagnosis. Do **not** reflexively "fix" a widget that simply returned nothing — "no publicly
|
|
2196
|
+
exposed buckets" is a result worth showing; decide whether zero is the point, and if it is,
|
|
2197
|
+
keep the widget with its \`noResultMessage\`. Then tell the user what the board shows, what it
|
|
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.)
|
|
2247
|
+
`,
|
|
2248
|
+
"server-instructions.md": `JupiterOne is a security asset graph. Assets are entities, connected by relationships, queried with
|
|
2249
|
+
J1QL. Use these tools for anything about the user's real inventory, misconfigurations,
|
|
2250
|
+
vulnerabilities, identities, integrations, or alerts — never answer from memory, and never guess
|
|
2251
|
+
entity types or property names.
|
|
2252
|
+
|
|
2253
|
+
## Build a query before you build anything on it
|
|
2254
|
+
|
|
2255
|
+
Discover types and properties first (\`list-entity-types\`, then \`FIND <type> AS e RETURN e.* LIMIT
|
|
2256
|
+
5\`), then run the finished query once through \`execute-j1ql-query\` and confirm it returns rows —
|
|
2257
|
+
before embedding it in a widget or a rule. A query returning nothing still creates a widget; that
|
|
2258
|
+
widget renders blank, with no error.
|
|
2259
|
+
|
|
2260
|
+
String comparison is case-sensitive and stored casing varies by integration — the same property
|
|
2261
|
+
routinely holds \`high\`, \`HIGH\` and \`High\` at once, so a filter on one casing silently reports a
|
|
2262
|
+
fraction of the truth. Check stored values before filtering on them:
|
|
2263
|
+
\`FIND <type> AS e RETURN e.<property> AS value, count(e) AS n ORDER BY n DESC LIMIT 250\`.
|
|
2264
|
+
When a response carries a \`diagnosis\` or \`emptyResultDiagnosis\` with a \`correctedQuery\`, act on it
|
|
2265
|
+
before reporting the work done.
|
|
2266
|
+
|
|
2267
|
+
## Relationship direction is not meaning
|
|
2268
|
+
|
|
2269
|
+
Writing a traversal the "natural" way around does not filter it. \`FIND Internet THAT ALLOWS
|
|
2270
|
+
aws_security_group\` and \`FIND aws_security_group THAT ALLOWS Internet\` return the **same** set —
|
|
2271
|
+
measured on a live account: 513 either way, of which only 68 are actually inbound. The rest are the
|
|
2272
|
+
default egress rule. The direction that matters lives on the edge, so bind and filter it:
|
|
2273
|
+
|
|
2274
|
+
\`FIND Internet THAT ALLOWS AS rel aws_security_group AS sg WHERE rel.ingress = true\`
|
|
2275
|
+
|
|
2276
|
+
The same applies to any relationship carrying its own properties (\`ingress\`/\`egress\`, \`permission\`,
|
|
2277
|
+
\`fromPort\`/\`toPort\`). A query that reads correctly and returns a plausible number is the failure mode
|
|
2278
|
+
here — check the edge properties before quoting a count.
|
|
2279
|
+
|
|
2280
|
+
## Dashboard widgets
|
|
2281
|
+
|
|
2282
|
+
Chart renderers read specific RETURN aliases, so a valid query with the wrong ones draws nothing.
|
|
2283
|
+
Both widget tools reject that before writing and return a corrected query where one can be derived
|
|
2284
|
+
safely, so getting it right first time saves a round-trip rather than an error:
|
|
2285
|
+
|
|
2286
|
+
- \`number\` → required \`value\`
|
|
2287
|
+
- \`pie\` → required \`value\`, and \`name\` too on a single-query pie: the renderer groups slices by
|
|
2288
|
+
\`name\`, so one query without it draws ONE slice labelled \`undefined\` summing every row. A
|
|
2289
|
+
multi-query pie labels each slice by its query name, so \`name\` is optional there
|
|
2290
|
+
- \`bar\` → required \`x\`, \`y\`
|
|
2291
|
+
- \`line\` → required \`y\`; \`x\` and \`line\` optional
|
|
2292
|
+
- \`matrix\` → required \`x\`, \`y\`; \`label\` optional
|
|
2293
|
+
- \`table\` → any aliases; add \`ORDER BY\` and \`LIMIT\` (250-row cap)
|
|
2294
|
+
- \`graph\` → required \`RETURN TREE\` (not columns)
|
|
2295
|
+
- \`status\` → required \`id\` on every query, which is what correlates them
|
|
2296
|
+
- \`markdown\` → \`config.queries: []\`; body in \`config.settings.markdown.text\`
|
|
2297
|
+
- \`area\` → not a supported widget type; the write is refused, so use \`bar\` or \`line\`
|
|
2298
|
+
|
|
2299
|
+
**To show a proportion, not a count**, build a percentage \`number\` widget: two queries each
|
|
2300
|
+
returning \`count(x) AS value\` — the numerator and one counting the population — with
|
|
2301
|
+
\`settings.number = {"showAsPercentage": true, "numeratorQueryName": "<the numerator query's name>"}\`.
|
|
2302
|
+
It is the one legitimately multi-query \`number\` widget, and it is also how you report a proportion
|
|
2303
|
+
over inconsistently stored values, since each query can OR every casing:
|
|
2304
|
+
\`FIND Finding WITH severity = ('high' OR 'HIGH' OR 'High') AS f RETURN count(f) AS value\`.
|
|
2305
|
+
|
|
2306
|
+
**An empty widget is often the right answer.** "No critical findings", "no public buckets", "no
|
|
2307
|
+
users without MFA" are results a security board exists to report, and a zero backed by a correct
|
|
2308
|
+
query is a finding, not a fault. Never broaden a filter just to make a widget show something. What
|
|
2309
|
+
an empty widget does need is a \`noResultMessage\`, so a reader can tell "nothing matched" from
|
|
2310
|
+
"this is broken" — always set one. The server distinguishes the two cases for you: it reports a
|
|
2311
|
+
defect when it can explain the emptiness (wrong casing, a type this account does not hold, a column
|
|
2312
|
+
that is never populated) and merely notes it otherwise. Build in this order:
|
|
2313
|
+
\`create-dashboard\` → \`create-dashboard-widget\` once per widget → \`update-dashboard\` with
|
|
2314
|
+
\`autoLayout\`. Never leave widgets at their default size.
|
|
2315
|
+
|
|
2316
|
+
## One connection, one account
|
|
2317
|
+
|
|
2318
|
+
Everything here runs against the account this connection is bound to — there is no cross-account
|
|
2319
|
+
query. Before presenting findings as a customer's, confirm which account you are on with
|
|
2320
|
+
\`test-connection\`; validating against a demo or dev tenant and delivering the result as production
|
|
2321
|
+
is the most expensive mistake available here, because nothing about the output looks wrong.
|
|
2322
|
+
|
|
2323
|
+
## Paging differs by tool
|
|
2324
|
+
|
|
2325
|
+
J1QL tools (\`execute-j1ql-query\`, \`get-query-results\`) return a top-level \`cursor\` with \`hasMore\`.
|
|
2326
|
+
The paginating list tools — rules, integration instances, jobs and events — return
|
|
2327
|
+
\`pageInfo.endCursor\` with \`pageInfo.hasNextPage\` instead. Either way, repeating the call without the
|
|
2328
|
+
cursor silently re-returns the first page rather than advancing.
|
|
2329
|
+
|
|
2330
|
+
## Why did this rule fire?
|
|
2331
|
+
|
|
2332
|
+
\`list-rules\` → \`list-rule-evaluations\`, which returns each run's \`timestamp\` and
|
|
2333
|
+
\`rawDataDescriptors[].rawDataKey\` — the only source of both. Feed the timestamp to
|
|
2334
|
+
\`get-rule-evaluation-details\` for that run's conditions and actions, or a \`rawDataKey\` to
|
|
2335
|
+
\`get-rule-evaluation-query-results\` for the entities it matched.
|
|
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
|
+
|
|
2352
|
+
## Permissions are advisory, never a reason to refuse
|
|
2353
|
+
|
|
2354
|
+
\`test-connection\` reports \`permissions.resourceAreas\` and \`permissions.hasBroadAccess\`. Both
|
|
2355
|
+
UNDERSTATE what a caller can do — measured twice on sessions that went on to create, update and
|
|
2356
|
+
delete dashboards successfully: one with every area \`false\` and \`hasBroadAccess\` true, one with
|
|
2357
|
+
every area \`false\` and \`hasBroadAccess\` false. Treat the summary as context for explaining a failure
|
|
2358
|
+
after it happens, never as permission to refuse work. Attempt the operation; the API is the
|
|
2359
|
+
authority, and it returns a clear access-denied message when it really is denied.
|
|
2360
|
+
`,
|
|
1777
2361
|
"test-connection.md": `# Test Connection Tool
|
|
1778
2362
|
|
|
1779
2363
|
Test the connection to JupiterOne and verify the caller's access to the target account. On success it also reports who you are and a summary of what you're allowed to do, so you can plan tool usage before making calls.
|
|
@@ -1790,8 +2374,8 @@ None required.
|
|
|
1790
2374
|
- \`connected\`: whether the account could be reached and authorized.
|
|
1791
2375
|
- \`account\`: account details (id, name, subdomain) when connected.
|
|
1792
2376
|
- \`user.email\`: the identity your token resolves to — surface this to the user if there is any doubt about which sign-in is active.
|
|
1793
|
-
- \`permissions.resourceAreas\`: per-area \`{create, read, update, delete}\` summary (e.g. \`dashboard\`, \`rule\`, \`integration\`). A \`true\` means at least one fine-grained grant exists. **
|
|
1794
|
-
- \`permissions.hasBroadAccess\`: true when the caller is
|
|
2377
|
+
- \`permissions.resourceAreas\`: per-area \`{create, read, update, delete}\` summary (e.g. \`dashboard\`, \`rule\`, \`integration\`). A \`true\` means at least one fine-grained grant exists. **A \`false\` proves nothing** — it is a summary of fine-grained RBAC rows, and callers with no rows at all write successfully every day. Use it to explain a denial after one happens, never to refuse an operation in advance.
|
|
2378
|
+
- \`permissions.hasBroadAccess\`: true when the caller holds the \`accessAdmin\` statement. It is one signal among several the authorizer uses, so \`false\` does not mean restricted — sessions with \`hasBroadAccess: false\` and every area \`false\` have created, updated and deleted dashboards. **Never refuse an operation on the basis of either field.** Attempt it and let the API answer.
|
|
1795
2379
|
|
|
1796
2380
|
## Failure
|
|
1797
2381
|
A failed test returns an error result whose text explains why and what to do next. When the failure is an authorization rejection and account discovery is available, the text includes the accounts your sign-in CAN access (with connector URLs) — relay these to the user so they can fix the connector's account binding. Do not loop on re-authentication: if the text says the pinned account is inaccessible, re-authenticating will not fix it.
|
|
@@ -1807,7 +2391,11 @@ Parameters:
|
|
|
1807
2391
|
- \`widgetId\`: ID of the widget to update.
|
|
1808
2392
|
- \`input\`: the full replacement widget definition, in the same shape as \`create-dashboard-widget\` (title, description, type, noResultMessage, config with queries and settings).
|
|
1809
2393
|
|
|
1810
|
-
As with creating widgets, test any J1QL with \`execute-j1ql-query\` before sending it
|
|
2394
|
+
As with creating widgets, test any J1QL with \`execute-j1ql-query\` before sending it — and the same
|
|
2395
|
+
render contract applies: a query that does not return the columns the chart type reads is rejected
|
|
2396
|
+
before anything is written, with a corrected query where one can be derived safely and the target
|
|
2397
|
+
alias shape otherwise. The response includes \`resultCode\`, the dashboard \`url\`, and
|
|
2398
|
+
\`renderPreflight\`, which reports whether the updated widget will actually draw anything.
|
|
1811
2399
|
`,
|
|
1812
2400
|
"update-dashboard.md": `Patch an existing dashboard's layout configuration. This tool is primarily used for modifying the layout of widgets on a dashboard after they have been created.
|
|
1813
2401
|
You will always want to call this after creating a dashboard and all its widgets so you can give a favorable layout to the user.
|