@jupiterone/jupiterone-mcp 2.1.0 → 2.2.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/dist/client/graphql/queries.d.ts +1 -1
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +4 -0
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +410 -15
- 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 +35 -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 +56 -10
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +194 -10
- package/dist/server/tools/errors.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 +6 -0
- package/dist/server/tools/telemetry.d.ts.map +1 -1
- package/dist/server/tools/telemetry.js.map +1 -1
- 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 +140 -4
- 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 +7 -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,7 +3,7 @@ export declare const LIST_RULE_INSTANCES = "\n query listRuleInstances($limit:
|
|
|
3
3
|
export declare const GET_ACCOUNT_INFO = "\n query account {\n iamGetAccount {\n accountId\n accountSubdomain\n accountName\n accountOwner\n status\n accountType\n accountLogoUrl\n __typename\n }\n }\n";
|
|
4
4
|
export declare const GET_CURRENT_USER = "\n query getCurrentUser {\n iamGetCurrentUser {\n email\n userAbacPermission {\n statement\n }\n resourcePermissions {\n resourceArea\n canCreate\n canRead\n canUpdate\n canDelete\n }\n __typename\n }\n }\n";
|
|
5
5
|
export declare const GET_DASHBOARDS = "\n query GetDashboards {\n getDashboards(options: {includeAllJ1ManagedDashboards: true}) {\n id\n name\n userId\n category\n supportedUseCase\n prerequisites {\n prerequisitesMet\n preRequisitesGroupsFulfilled\n preRequisitesGroupsRequired\n __typename\n }\n isJ1ManagedBoard\n resourceGroupId\n starred\n _timeUpdated\n _createdAt\n __typename\n }\n }\n";
|
|
6
|
-
export declare const GET_DASHBOARD_DETAILS = "\n query solo_GetDashboard($dashboardId: String!) {\n getDashboard(dashboardId: $dashboardId) {\n ...InsightsDashboard\n __typename\n }\n }\n\n fragment InsightsDashboard on InsightsDashboard {\n id\n name\n category\n userId\n supportedUseCase\n isJ1ManagedBoard\n published\n publishedToUserIds\n publishedToGroupIds\n groupIds\n userIds\n scopeFilters\n resourceGroupId\n starred\n _timeUpdated\n _createdAt\n prerequisites {\n prerequisitesMet\n preRequisitesGroupsFulfilled\n preRequisitesGroupsRequired\n __typename\n }\n parameters {\n ...DashboardParameterFields\n __typename\n }\n widgets {\n ...InsightsWidget\n __typename\n }\n layouts {\n ...InsightsDashboardLayoutConfig\n __typename\n }\n __typename\n }\n\n fragment DashboardParameterFields on DashboardParameter {\n dashboardId\n accountId\n id\n label\n name\n options\n valueType\n type\n default\n disableCustomInput\n requireValue\n __typename\n }\n\n fragment InsightsWidget on InsightsWidget {\n id\n title\n description\n type\n questionId\n noResultMessage\n includeDeleted\n config {\n queries {\n id\n name\n query\n __typename\n }\n settings\n postQueryFilters\n disableQueryPolicyFilters\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutConfig on InsightsDashboardLayoutConfig {\n xs {\n ...InsightsDashboardLayoutItem\n __typename\n }\n sm {\n ...InsightsDashboardLayoutItem\n __typename\n }\n md {\n ...InsightsDashboardLayoutItem\n __typename\n }\n lg {\n ...InsightsDashboardLayoutItem\n __typename\n }\n xl {\n ...InsightsDashboardLayoutItem\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutItem on InsightsDashboardLayoutItem {\n static\n moved\n w\n h\n x\n y\n i\n __typename\n }\n";
|
|
6
|
+
export declare const GET_DASHBOARD_DETAILS = "\n query solo_GetDashboard($dashboardId: String!) {\n getDashboard(dashboardId: $dashboardId) {\n ...InsightsDashboard\n __typename\n }\n }\n\n fragment InsightsDashboard on InsightsDashboard {\n id\n name\n category\n userId\n supportedUseCase\n isJ1ManagedBoard\n published\n publishedToUserIds\n publishedToGroupIds\n groupIds\n userIds\n scopeFilters\n resourceGroupId\n starred\n _timeUpdated\n _createdAt\n prerequisites {\n prerequisitesMet\n preRequisitesGroupsFulfilled\n preRequisitesGroupsRequired\n __typename\n }\n parameters {\n ...DashboardParameterFields\n __typename\n }\n widgets {\n ...InsightsWidget\n __typename\n }\n layouts {\n ...InsightsDashboardLayoutConfig\n __typename\n }\n __typename\n }\n\n fragment DashboardParameterFields on DashboardParameter {\n dashboardId\n accountId\n id\n label\n name\n options\n valueType\n type\n default\n disableCustomInput\n requireValue\n __typename\n }\n\n fragment InsightsWidget on InsightsWidget {\n id\n title\n description\n type\n questionId\n noResultMessage\n includeDeleted\n config {\n queries {\n id\n name\n query\n drilldownQuery\n __typename\n }\n settings\n postQueryFilters\n disableQueryPolicyFilters\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutConfig on InsightsDashboardLayoutConfig {\n xs {\n ...InsightsDashboardLayoutItem\n __typename\n }\n sm {\n ...InsightsDashboardLayoutItem\n __typename\n }\n md {\n ...InsightsDashboardLayoutItem\n __typename\n }\n lg {\n ...InsightsDashboardLayoutItem\n __typename\n }\n xl {\n ...InsightsDashboardLayoutItem\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutItem on InsightsDashboardLayoutItem {\n static\n moved\n w\n h\n x\n y\n i\n __typename\n }\n";
|
|
7
7
|
export declare const GET_INTEGRATION_DEFINITIONS = "\n query IntegrationDefinitions($cursor: String, $includeConfig: Boolean = false) {\n integrationDefinitions(cursor: $cursor) {\n definitions {\n ...IntegrationDefinitionsValues\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n __typename\n }\n }\n\n fragment IntegrationDefinitionsValues on IntegrationDefinition {\n id\n name\n type\n title\n integrationType\n integrationClass\n integrationCategory\n totalInstanceCount\n description\n ...IntegrationDefinitionConfigFragment @include(if: $includeConfig)\n __typename\n }\n\n fragment IntegrationDefinitionConfigFragment on IntegrationDefinition {\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n authSections {\n id\n description\n displayName\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n verificationDisabled\n __typename\n }\n configSections {\n displayName\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n __typename\n }\n __typename\n }\n\n fragment ConfigFieldsRecursive on ConfigField {\n ...ConfigFieldValues\n configFields {\n ...ConfigFieldValues\n configFields {\n ...ConfigFieldValues\n __typename\n }\n __typename\n }\n __typename\n }\n\n fragment ConfigFieldValues on ConfigField {\n key\n displayName\n description\n type\n format\n defaultValue\n helperText\n inputAdornment\n mask\n optional\n immutable\n readonly\n computed\n options {\n value\n description\n label\n webLink\n default\n __typename\n }\n __typename\n }\n";
|
|
8
8
|
export declare const GET_INTEGRATION_INSTANCES = "\n query IntegrationInstances($definitionId: String, $cursor: String, $limit: Int, $filter: ListIntegrationInstancesSearchFilter) {\n integrationInstancesV2(\n definitionId: $definitionId\n cursor: $cursor\n limit: $limit\n filter: $filter\n ) {\n instances {\n ...IntegrationInstanceLiteValues\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n __typename\n }\n }\n\n fragment IntegrationInstanceLiteValues on IntegrationInstanceLite {\n id\n name\n accountId\n sourceIntegrationInstanceId\n pollingInterval\n pollingIntervalCronExpression {\n hour\n dayOfWeek\n __typename\n }\n integrationDefinitionId\n description\n config\n instanceRelationship\n resourceGroupId\n createdOn\n createdBy\n updatedOn\n updatedBy\n mostRecentJob {\n status\n hasSkippedSteps\n createDate\n __typename\n }\n __typename\n }\n";
|
|
9
9
|
export declare const GET_INTEGRATION_JOBS = "\n query IntegrationJobs($status: IntegrationJobStatus, $integrationInstanceId: String, $integrationDefinitionId: String, $integrationInstanceIds: [String], $cursor: String, $size: Int) {\n integrationJobs(\n status: $status\n integrationInstanceId: $integrationInstanceId\n integrationDefinitionId: $integrationDefinitionId\n integrationInstanceIds: $integrationInstanceIds\n cursor: $cursor\n size: $size\n ) {\n jobs {\n ...IntegrationJobValues\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n __typename\n }\n }\n\n fragment IntegrationJobValues on IntegrationJob {\n id\n status\n integrationInstanceId\n createDate\n endDate\n hasSkippedSteps\n integrationInstance {\n id\n name\n __typename\n }\n integrationDefinition {\n id\n title\n integrationType\n __typename\n }\n __typename\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mSAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mSAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;AAKF,eAAO,MAAM,qBAAqB,0kEAuHjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,uxDA8FvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,ggCAiDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,o+BA2ChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kmBA+B/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8nBA+BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,ijCA2CjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+2BA0CvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uHAIrC,CAAC;AAGF,eAAO,MAAM,QAAQ,qdAQpB,CAAC;AAGF,eAAO,MAAM,iBAAiB,iGAO7B,CAAC"}
|
|
@@ -191,6 +191,9 @@ exports.GET_DASHBOARDS = `
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
`;
|
|
194
|
+
// The widget selection carries `drilldownQuery` because the documented update flow is read, modify,
|
|
195
|
+
// write and a widget write REPLACES the widget: the write path accepts a drilldown, so a read that
|
|
196
|
+
// omitted it made every read-modify-write erase the one already there, silently.
|
|
194
197
|
exports.GET_DASHBOARD_DETAILS = `
|
|
195
198
|
query solo_GetDashboard($dashboardId: String!) {
|
|
196
199
|
getDashboard(dashboardId: $dashboardId) {
|
|
@@ -265,6 +268,7 @@ exports.GET_DASHBOARD_DETAILS = `
|
|
|
265
268
|
id
|
|
266
269
|
name
|
|
267
270
|
query
|
|
271
|
+
drilldownQuery
|
|
268
272
|
__typename
|
|
269
273
|
}
|
|
270
274
|
settings
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEnC,CAAC;AAEW,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmElC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;CAa/B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;CAiB/B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC;
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEnC,CAAC;AAEW,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmElC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;CAa/B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;CAiB/B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC;AAEF,oGAAoG;AACpG,mGAAmG;AACnG,iFAAiF;AACpE,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuHpC,CAAC;AAEW,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8F1C,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDxC,CAAC;AAEW,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CnC,CAAC;AAEW,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlC,CAAC;AAEW,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrC,CAAC;AAEW,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CpC,CAAC;AAEW,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C1C,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;CAIxC,CAAC;AAEF,iEAAiE;AACpD,QAAA,QAAQ,GAAG;;;;;;;;CAQvB,CAAC;AAEF,sCAAsC;AACzB,QAAA,iBAAiB,GAAG;;;;;;;CAOhC,CAAC"}
|
|
@@ -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,CAqqGjD,CAAC"}
|
|
@@ -7,6 +7,25 @@ exports.descriptionMap = {
|
|
|
7
7
|
|
|
8
8
|
**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
9
|
|
|
10
|
+
## Before you build: the render contract is enforced
|
|
11
|
+
|
|
12
|
+
Chart renderers read specific RETURN aliases. A query can be perfectly valid J1QL and still draw
|
|
13
|
+
nothing, so this tool **rejects** a widget whose query does not return the columns its chart type
|
|
14
|
+
reads. Nothing is created; fix and retry. The response carries a ready-to-run corrected query where
|
|
15
|
+
one can be derived safely — a straight alias rename — and otherwise names the alias shape to aim
|
|
16
|
+
for. The per-chart requirements are listed under "Chart Types and Example Queries" below.
|
|
17
|
+
|
|
18
|
+
Two things the check cannot do for you:
|
|
19
|
+
|
|
20
|
+
- **Confirm the query returns rows.** Run it through \`execute-j1ql-query\` first. A query that
|
|
21
|
+
returns nothing still creates a widget; that widget renders blank. The response reports
|
|
22
|
+
\`renderPreflight\` after the widget is written — deliberately, so that measuring what the widget
|
|
23
|
+
will draw can never delay or fail the write itself — but finding out beforehand costs you one call
|
|
24
|
+
and saves a correction.
|
|
25
|
+
- **Decide that empty is correct.** When it is — "critical findings: 0" is good news — set
|
|
26
|
+
\`noResultMessage\` so the widget says so instead of showing blank. Every JupiterOne-managed board
|
|
27
|
+
sets it.
|
|
28
|
+
|
|
10
29
|
This tool should be used when:
|
|
11
30
|
- You want to add a new visualization to an existing dashboard
|
|
12
31
|
- You need to automate dashboard widget creation for reporting or monitoring
|
|
@@ -18,8 +37,12 @@ This tool should be used when:
|
|
|
18
37
|
- \`title\`: Widget title
|
|
19
38
|
- \`description\`: Widget description (optional)
|
|
20
39
|
- \`type\`: Widget type (e.g., 'pie', 'bar', 'table', etc.)
|
|
21
|
-
- \`noResultMessage\`: Message
|
|
22
|
-
|
|
40
|
+
- \`noResultMessage\`: Message shown when the query returns nothing. Always set it — it is the
|
|
41
|
+
difference between a widget that explains itself and one that looks broken.
|
|
42
|
+
- \`config\`: Widget configuration, including queries and settings. Each query object takes \`name\`,
|
|
43
|
+
\`query\`, and optionally \`drilldownQuery\` — the J1QL opened when a reader clicks that query's
|
|
44
|
+
data point, so a count can lead to the assets it counted. It is parsed by the same gate as the
|
|
45
|
+
widget query, because it otherwise fails at the click rather than here.
|
|
23
46
|
|
|
24
47
|
## Supported Chart Types
|
|
25
48
|
|
|
@@ -85,11 +108,32 @@ When creating a dashboard, there are several options for widgets to choose from.
|
|
|
85
108
|
> **Note:**
|
|
86
109
|
> 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
110
|
|
|
111
|
+
## Settings shared by several chart types
|
|
112
|
+
|
|
113
|
+
Every setting is nested under the chart type (\`settings.bar.decimalLimit\`). A key the service does
|
|
114
|
+
not recognise — at either level — is **dropped silently on save**, so the widget keeps its defaults
|
|
115
|
+
and the write still returns success. The response names anything it discarded; read it.
|
|
116
|
+
|
|
117
|
+
- **Threshold colouring** — \`default\`, \`success\`, \`warning\`, \`error\`, each
|
|
118
|
+
\`{"limitCondition": ..., "val1": ..., "val2": ...}\` where \`limitCondition\` is one of
|
|
119
|
+
\`greaterThan\`, \`greaterThanOrEqualTo\`, \`lessThan\`, \`lessThanOrEqualTo\`, \`equalTo\`, \`between\`
|
|
120
|
+
(\`val2\` is the upper bound of \`between\`). Long-standing on \`number\`, where it colours the value
|
|
121
|
+
text, and now also on \`bar\` and \`line\`, where it colours each bar or point whose OWN value
|
|
122
|
+
matches. Set one on any widget where a high number is bad news.
|
|
123
|
+
- **\`decimalLimit\`** — \`0\`, \`1\`, \`2\`, \`3\` or \`4\`: decimal places on the data labels. Accepted on
|
|
124
|
+
\`bar\`, \`line\`, \`number\` and \`pie\`. Counts want \`0\`.
|
|
125
|
+
- **Readability** — \`showDataLabels\` (bool), \`dataLabelUnit\` (\`'%'\`, \`'$'\`, \`'#'\` or \`''\`) and
|
|
126
|
+
\`chartFontSize\` (\`'small'\`, \`'medium'\`, \`'large'\`) on \`bar\`, \`line\`, \`area\` and \`pie\`;
|
|
127
|
+
\`xAxisLabel\` and \`yAxisLabel\` (strings) on \`bar\`, \`line\` and \`area\`. Axis labels are worth the
|
|
128
|
+
two keys — \`x\` and \`y\` tell a reader nothing.
|
|
129
|
+
|
|
88
130
|
## Number
|
|
89
131
|
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
132
|
|
|
91
133
|
### Query Requirements
|
|
92
|
-
Expects
|
|
134
|
+
**Enforced: required \`value\`.** Expects a single numeric column aliased \`value\`. That is a rule per
|
|
135
|
+
QUERY, not per widget: percentage mode below is legitimately multi-query, and each of those queries
|
|
136
|
+
still returns exactly one \`value\`.
|
|
93
137
|
|
|
94
138
|
### Example Queries
|
|
95
139
|
**Trend:**
|
|
@@ -103,13 +147,55 @@ FIND User AS u
|
|
|
103
147
|
RETURN count(u) AS value
|
|
104
148
|
\`\`\`
|
|
105
149
|
|
|
150
|
+
### Percentage mode — the way to chart a proportion
|
|
151
|
+
|
|
152
|
+
A number widget can show a ratio between its own queries instead of a count. The numerator is the
|
|
153
|
+
sum of the queries named in \`numeratorQueryName\`; the total is the sum of the others. "% of hosts
|
|
154
|
+
unpatched", as a query named \`Unpatched\`:
|
|
155
|
+
|
|
156
|
+
\`\`\`j1ql
|
|
157
|
+
FIND Host WITH patched = false AS h
|
|
158
|
+
RETURN count(h) AS value
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
and one named \`All hosts\`:
|
|
162
|
+
|
|
163
|
+
\`\`\`j1ql
|
|
164
|
+
FIND Host AS h
|
|
165
|
+
RETURN count(h) AS value
|
|
166
|
+
\`\`\`
|
|
167
|
+
|
|
168
|
+
with:
|
|
169
|
+
|
|
170
|
+
\`\`\`json
|
|
171
|
+
{
|
|
172
|
+
"settings": {
|
|
173
|
+
"number": {
|
|
174
|
+
"showAsPercentage": true,
|
|
175
|
+
"numeratorQueryName": "Unpatched"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
181
|
+
- \`numeratorQueryName\` is ONE string, not an array: several numerator queries are comma-joined into
|
|
182
|
+
it (\`"Unpatched,Stale"\`). A name matching no query on the widget makes the numerator zero, so the
|
|
183
|
+
widget draws a flat 0% that reads as healthy — this tool rejects that before writing, and names
|
|
184
|
+
the queries you do have.
|
|
185
|
+
- \`includeNumeratorInTotal\` decides what the total is. Left out (the default) it is "the other
|
|
186
|
+
queries", which is the pair above — a numerator and a query counting the whole population. Set
|
|
187
|
+
true it is "every query, numerator included", for queries that partition the population
|
|
188
|
+
(\`Patched\` + \`Unpatched\`).
|
|
189
|
+
- \`invertPercentage\` plots 100 − the ratio; \`showFraction\` shows the numerator/total breakdown
|
|
190
|
+
beside the figure. Both are number-only.
|
|
191
|
+
|
|
106
192
|
---
|
|
107
193
|
|
|
108
194
|
## Pie Chart
|
|
109
195
|
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
196
|
|
|
111
197
|
### Query Requirements
|
|
112
|
-
|
|
198
|
+
**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
199
|
|
|
114
200
|
### Example Queries
|
|
115
201
|
**Trend:**
|
|
@@ -128,21 +214,32 @@ RETURN
|
|
|
128
214
|
a.tag.AccountName AS name,
|
|
129
215
|
count(ds) AS value
|
|
130
216
|
\`\`\`
|
|
131
|
-
**Non-Trend 2
|
|
217
|
+
**Non-Trend 2 — one query per slice.** Only valid as one of SEVERAL queries on the widget, which is
|
|
218
|
+
what supplies the labels; a pie carrying this query alone draws a single \`undefined\` slice:
|
|
132
219
|
\`\`\`j1ql
|
|
133
|
-
FIND DataStore
|
|
220
|
+
FIND DataStore
|
|
221
|
+
WITH classification = 'critical' AS ds
|
|
134
222
|
THAT RELATES TO (Account|Service) AS a
|
|
135
223
|
RETURN
|
|
136
224
|
count(ds) AS value
|
|
137
225
|
\`\`\`
|
|
138
226
|
|
|
227
|
+
### Settings
|
|
228
|
+
|
|
229
|
+
\`type: 'percent'\` labels each slice with its share instead of its count; \`type: 'count'\` is the
|
|
230
|
+
default. \`hideSum\` drops the total from the centre. \`mapColorsByQuery\` colours by query rather than
|
|
231
|
+
by slice on a multi-query pie, and \`customColors\` sets them by index (see the example at the top).
|
|
232
|
+
|
|
139
233
|
---
|
|
140
234
|
|
|
141
235
|
## Bar Chart
|
|
142
236
|
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
237
|
|
|
144
238
|
### Query Requirements
|
|
145
|
-
|
|
239
|
+
**Enforced: required \`x\`, \`y\`.** Stacking is one query PER SERIES, never multiple \`y\` columns:
|
|
240
|
+
each query becomes one colored segment (with \`settings.bar.view: 'stacked'\`), aligned on the shared
|
|
241
|
+
\`x\` categories — keep the \`x\` alias identical across queries, and each query's \`name\` becomes its
|
|
242
|
+
series label in the legend.
|
|
146
243
|
|
|
147
244
|
### Example Queries
|
|
148
245
|
**Trend:**
|
|
@@ -175,7 +272,7 @@ LIMIT 5
|
|
|
175
272
|
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
273
|
|
|
177
274
|
### Query Requirements
|
|
178
|
-
|
|
275
|
+
**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
276
|
|
|
180
277
|
### Example Queries
|
|
181
278
|
**Trend:**
|
|
@@ -196,13 +293,32 @@ RETURN
|
|
|
196
293
|
f.numericSeverity AS line
|
|
197
294
|
\`\`\`
|
|
198
295
|
|
|
296
|
+
### Percentage mode
|
|
297
|
+
|
|
298
|
+
\`showAsPercentage\` works here too, and it behaves differently from a number widget: the line chart
|
|
299
|
+
collapses ALL its queries into ONE derived ratio series rather than drawing a line each. So the
|
|
300
|
+
column rule is stricter — every query needs an \`x\` (the bucket its rows fall into) plus the metric,
|
|
301
|
+
and only the \`x\` positions present in EVERY query are plotted, so a gap is left out rather than
|
|
302
|
+
drawn as 0%. Alias the metric \`y\`: the renderer reads a \`value\` column first and falls back to \`y\`,
|
|
303
|
+
and \`y\` is what the requirement above enforces. The \`line\` grouping column is ignored in this mode.
|
|
304
|
+
|
|
305
|
+
\`\`\`j1ql
|
|
306
|
+
FIND Finding WITH open = true AS f
|
|
307
|
+
RETURN
|
|
308
|
+
f.createdOn AS x,
|
|
309
|
+
count(f) AS y
|
|
310
|
+
\`\`\`
|
|
311
|
+
|
|
312
|
+
\`numeratorQueryName\` and \`includeNumeratorInTotal\` mean what they do on a number widget;
|
|
313
|
+
\`invertPercentage\` and \`showFraction\` do not apply.
|
|
314
|
+
|
|
199
315
|
---
|
|
200
316
|
|
|
201
317
|
## Matrix Chart
|
|
202
318
|
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
319
|
|
|
204
320
|
### Query Requirements
|
|
205
|
-
|
|
321
|
+
**Enforced: required \`x\`, \`y\`.** Optional \`label\` is shown in each cell; any additional properties returned are shown as key: value.
|
|
206
322
|
|
|
207
323
|
### Example Queries
|
|
208
324
|
**Firewall matrix:**
|
|
@@ -245,17 +361,32 @@ FIND Person AS p
|
|
|
245
361
|
## Graph Chart
|
|
246
362
|
The graph chart displays a tree graph of query results. This chart is best used to visualize specific relationships between entities.
|
|
247
363
|
|
|
364
|
+
**Enforced: the query must \`RETURN TREE\`.** A graph widget draws the tree J1QL returns for that
|
|
365
|
+
projection; give it columns and there is nothing to draw.
|
|
366
|
+
|
|
248
367
|
### Example Queries
|
|
249
368
|
**Most recent people:**
|
|
250
369
|
\`\`\`j1ql
|
|
251
370
|
FIND Person RETURN TREE
|
|
252
371
|
\`\`\`
|
|
253
372
|
|
|
373
|
+
### Settings
|
|
374
|
+
|
|
375
|
+
\`viewType\` picks the layout — \`'mesh'\`, \`'tree'\`, \`'hierarchy'\` or \`'tree_horizontal'\` — and
|
|
376
|
+
\`nodeView\` is \`'expanded'\` or \`'grouped'\`. A traversal returning many nodes of the same type reads
|
|
377
|
+
far better grouped.
|
|
378
|
+
|
|
254
379
|
---
|
|
255
380
|
|
|
256
381
|
## Status
|
|
257
382
|
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
383
|
|
|
384
|
+
**Enforced: required \`id\`, on every query.** The FIRST query is the identity roster and supplies
|
|
385
|
+
the display fields (\`... AS id, p.name AS displayName, p.iconWebLink AS iconWebLink\`); each LATER
|
|
386
|
+
query is one pass/fail check — an entity passes a check when that query returns a row with its
|
|
387
|
+
\`id\`, and fails when its \`id\` is absent. The \`id\` column is what correlates the queries with
|
|
388
|
+
each other — a check query without one contributes nothing and the row silently goes missing.
|
|
389
|
+
|
|
259
390
|
### Example Queries
|
|
260
391
|
**Users passing security check:**
|
|
261
392
|
\`\`\`j1ql
|
|
@@ -286,7 +417,7 @@ Find Person as p that is User as u
|
|
|
286
417
|
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
418
|
|
|
288
419
|
### Query Requirements
|
|
289
|
-
|
|
420
|
+
**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
421
|
|
|
291
422
|
### Example Queries
|
|
292
423
|
**Top 5 most open PRs by Person:**
|
|
@@ -1079,11 +1210,24 @@ FIND User WITH username=/john/ LIMIT 10 # Case-insensitive match
|
|
|
1079
1210
|
|
|
1080
1211
|
## Important: Don't assume relationship VERBS, either do discovery to determine the correct relationship or use the wild card relationship "THAT RELATES TO"
|
|
1081
1212
|
|
|
1082
|
-
**Any relationship traversal (i.e. wildcard)**:
|
|
1213
|
+
**Any relationship traversal (i.e. wildcard verb)**:
|
|
1083
1214
|
\`\`\`j1ql
|
|
1084
1215
|
FIND User THAT RELATES TO Application LIMIT 10
|
|
1085
1216
|
\`\`\`
|
|
1086
1217
|
|
|
1218
|
+
**Unknown verb AND unknown target** — \`*\` is the wildcard target. Use the aggregate form to list
|
|
1219
|
+
everything a type connects to, exhaustively and compactly:
|
|
1220
|
+
\`\`\`j1ql
|
|
1221
|
+
FIND aws_instance AS src THAT RELATES TO AS rel * AS tar
|
|
1222
|
+
RETURN src._type, rel._class, tar._type, count(rel) AS edges ORDER BY edges DESC
|
|
1223
|
+
\`\`\`
|
|
1224
|
+
\`*\` is the ONLY wildcard target. \`ANY\`, \`ANYTHING\` and \`entity\` are **not** J1QL — they parse without
|
|
1225
|
+
error and match nothing, so you get an empty result that looks like "these types are not connected".
|
|
1226
|
+
|
|
1227
|
+
Note the aggregate: \`count(rel)\` counts relationship **edges**, while \`count(tar)\` counts **distinct
|
|
1228
|
+
target entities**. These differ by orders of magnitude when many sources share a target, so pick the
|
|
1229
|
+
one you actually mean and say which it is when reporting a number.
|
|
1230
|
+
|
|
1087
1231
|
**Basic traversal**:
|
|
1088
1232
|
\`\`\`j1ql
|
|
1089
1233
|
FIND User THAT HAS Device LIMIT 10
|
|
@@ -1688,7 +1832,14 @@ Example response:
|
|
|
1688
1832
|
|
|
1689
1833
|
## Why This Is Essential
|
|
1690
1834
|
|
|
1691
|
-
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
|
|
1835
|
+
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.
|
|
1836
|
+
## Treat this list as a positive check, not a complete one
|
|
1837
|
+
|
|
1838
|
+
The counts come from a stored index, and it is not a superset of the graph: measured on a live
|
|
1839
|
+
tenant, it both disagreed with direct queries on counts and omitted types that queries returned. So
|
|
1840
|
+
a type appearing here proves it exists; a type missing from here does NOT prove it does not. When a
|
|
1841
|
+
type matters, confirm it directly with \`FIND <type> AS e RETURN count(e) AS value\`.
|
|
1842
|
+
`,
|
|
1692
1843
|
"list-rule-evaluations.md": `# List Rule Evaluations Tool
|
|
1693
1844
|
|
|
1694
1845
|
List the evaluation history for a specific rule. This tool shows when a rule was evaluated and the results of each evaluation.
|
|
@@ -1761,6 +1912,246 @@ To get all rules across multiple pages:
|
|
|
1761
1912
|
2. Check if \`pageInfo.hasNextPage\` is true
|
|
1762
1913
|
3. If true, call again with \`cursor\` set to \`pageInfo.endCursor\`
|
|
1763
1914
|
4. Repeat until \`hasNextPage\` is false`,
|
|
1915
|
+
"prompt-build-dashboard.md": `Build a JupiterOne Insights dashboard for: {{objective}}
|
|
1916
|
+
|
|
1917
|
+
You are building for a reader, not a grader. A board can pass every technical check and still be
|
|
1918
|
+
useless — ten near-identical tiles at uniform size is a data dump, not a dashboard. Work through
|
|
1919
|
+
the data steps first (skipping them is the main reason boards come back empty or wrong), then
|
|
1920
|
+
design the board on paper before creating anything.
|
|
1921
|
+
|
|
1922
|
+
## Get the data right
|
|
1923
|
+
|
|
1924
|
+
1. **Confirm the account.** Call \`test-connection\` and state which account you are on. A board
|
|
1925
|
+
validated on a demo tenant and delivered as production is the failure whose output looks
|
|
1926
|
+
entirely correct.
|
|
1927
|
+
|
|
1928
|
+
2. **Discover what this account actually holds.** \`list-entity-types\` for the classes and types
|
|
1929
|
+
present — treat it as a positive check only; a type missing from it may still exist. Sample
|
|
1930
|
+
every type you intend to use: \`FIND <type> AS e RETURN e.* LIMIT 5\`.
|
|
1931
|
+
|
|
1932
|
+
3. **Check the values you plan to filter or group on.** String comparison is case-sensitive and
|
|
1933
|
+
stored casing varies by integration — the same property routinely holds \`high\`, \`HIGH\` and
|
|
1934
|
+
\`High\` at once. For every literal you will filter on and every property you will group by:
|
|
1935
|
+
\`FIND <type> AS e RETURN e.<property> AS value, count(e) AS n ORDER BY n DESC LIMIT 250\`
|
|
1936
|
+
|
|
1937
|
+
4. **Prove every query** through \`execute-j1ql-query\` before building on it — rows AND shape. Two
|
|
1938
|
+
correctness traps that produce confident wrong numbers: rank entities by the entity itself (or
|
|
1939
|
+
\`_id\`), never by \`displayName\` — fleets share generic names and name-grouping silently merges
|
|
1940
|
+
distinct assets; and filter relationship semantics on the edge's own properties
|
|
1941
|
+
(\`rel.ingress = true\`), never on traversal direction, which does not filter anything.
|
|
1942
|
+
|
|
1943
|
+
## Design the board before building it
|
|
1944
|
+
|
|
1945
|
+
5. **Write down the reader's questions.** Who looks at this board, and what do they do next? If
|
|
1946
|
+
the objective does not name the reader or the goal, ask the user — with your environment's
|
|
1947
|
+
structured question tool (AskUserQuestion) when you have one, as one round of at most 4
|
|
1948
|
+
questions with concrete options and a recommended default each; in one plain message with
|
|
1949
|
+
stated defaults otherwise. Question Socratically: don't ask what widgets they want — ask the
|
|
1950
|
+
questions whose answers reveal it, in an order where each narrows the last. What decision
|
|
1951
|
+
should this board drive? Who makes it, and how often do they look? What would they do
|
|
1952
|
+
differently if the number were bad? What is deliberately out of scope? Never ask what you can
|
|
1953
|
+
discover from the graph yourself (which scanners feed it, whether exploitability fields are
|
|
1954
|
+
populated). Two answers change everything: *prove coverage to leadership* leads with
|
|
1955
|
+
percentage KPIs; *find the gaps for ops* leads with tables. Also settle the dashboard \`type\`:
|
|
1956
|
+
\`Account\` when the audience is a team, \`User\` for a personal workspace.
|
|
1957
|
+
|
|
1958
|
+
Every widget answers exactly one question; its **title states the answer's subject** ("Fleet
|
|
1959
|
+
coverage: devices with endpoint protection"), and its **description carries the method and
|
|
1960
|
+
caveats** (what counts as "open", what was normalized). 6–12 widgets — beyond ~15 the
|
|
1961
|
+
Insights page itself renders slowly; split by audience instead, and give a heavy graph
|
|
1962
|
+
traversal its own board.
|
|
1963
|
+
|
|
1964
|
+
The three tiers below are the DEFAULT for a metric-driven board, not a template to fill in:
|
|
1965
|
+
the structure serves the objective, never the other way around, and a board that ignores its
|
|
1966
|
+
objective's natural hero to satisfy a tier recipe is worse than one that breaks it. An
|
|
1967
|
+
incident/blast-radius board leads with the relationship \`graph\`; a compliance board is a
|
|
1968
|
+
\`status\` grid with a pass-rate tile; a pure inventory ask may be one excellent full-width
|
|
1969
|
+
table and two tiles. When the tiers do not fit, break them deliberately and say why in the
|
|
1970
|
+
markdown intro. Default composition:
|
|
1971
|
+
|
|
1972
|
+
- **Headline tier** — 2–4 \`number\` tiles, laid out \`small\`, first row: the figures the reader
|
|
1973
|
+
reacts to, with thresholds so a bad number reads as bad.
|
|
1974
|
+
- **Explanation tier** — the charts that say *why* the headline is what it is: breakdowns,
|
|
1975
|
+
rankings, trends. \`medium\`/\`large\`.
|
|
1976
|
+
- **Action tier** — one or two \`table\` widgets, \`full\` width, at the bottom: the specific
|
|
1977
|
+
items to go fix, with enough columns to act on.
|
|
1978
|
+
- Optionally open with a \`full\`-width \`markdown\` widget when the board needs a sentence of
|
|
1979
|
+
purpose or methodology a title cannot carry. Its slot grows with its text but caps at four
|
|
1980
|
+
rows, so keep the intro to roughly four short blocks and put the per-widget caveats in each
|
|
1981
|
+
widget's description — an intro longer than the fold pushes the numbers below it.
|
|
1982
|
+
|
|
1983
|
+
6. **Pick each widget's form by the reader's job — never default to one type.**
|
|
1984
|
+
|
|
1985
|
+
| The reader must… | Use | Not |
|
|
1986
|
+
|---|---|---|
|
|
1987
|
+
| React to one current value | \`number\` tile | a one-bar \`bar\`, a one-slice \`pie\` |
|
|
1988
|
+
| Judge a proportion or coverage ratio | \`number\` in percentage mode (\`showAsPercentage\` + \`numeratorQueryName\`; each query returns \`count(x) AS value\`) | a two-slice pie |
|
|
1989
|
+
| Compare or rank categories | \`bar\` (\`x\`,\`y\`) — one query per category when stored casings split, named for the category | a pie with many slices |
|
|
1990
|
+
| Follow change over time | \`line\`, or \`trendDataIsEnabled\` on a tile | — |
|
|
1991
|
+
| See part-to-whole, ≤6 slices | \`pie\` (\`name\` + \`value\`) | a pie of 10+ slices — use \`bar\` or \`table\` |
|
|
1992
|
+
| 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 |
|
|
1993
|
+
| Understand how things connect | \`graph\` with \`RETURN TREE\` — at most one per board, as a hero visual | — |
|
|
1994
|
+
|
|
1995
|
+
**Variety check:** when two widgets share the same type and the same shape, one of them is
|
|
1996
|
+
usually the wrong lens — turn a second count into a proportion, a trend, or the table behind
|
|
1997
|
+
it. A board of six identical tiles answers one question six times.
|
|
1998
|
+
|
|
1999
|
+
7. **Use the display capabilities — a board that ignores them reads as a draft.**
|
|
2000
|
+
|
|
2001
|
+
- **Thresholds** on \`number\`, \`bar\`, \`line\`: \`settings.<type>.error = {"limitCondition":
|
|
2002
|
+
"greaterThan", "val1": "0"}\` (also \`warning\`, \`success\`, \`default\`) — this is what makes a
|
|
2003
|
+
bad figure read as bad at a glance.
|
|
2004
|
+
- **Semantic colors** via \`settings.<type>.customColors\`: map severity ladders dark-red → red
|
|
2005
|
+
→ orange → blue, gray for neutral/"other" — color follows meaning, never decoration, and
|
|
2006
|
+
never a rainbow of arbitrary hues.
|
|
2007
|
+
- **Formatting**: \`decimalLimit\` (0–4) so figures read precisely; \`dataLabelUnit\` ('%', '$',
|
|
2008
|
+
'#') on \`bar\`/\`line\`/\`area\`/\`pie\` where the unit is not obvious — a \`number\` tile takes
|
|
2009
|
+
\`currencyFormat\` instead, and percentage mode renders its own \`%\`; axis labels on
|
|
2010
|
+
\`bar\`/\`line\` when the axes need naming.
|
|
2011
|
+
- **\`drilldownQuery\`** on every counting query: the J1QL a reader lands on when they click the
|
|
2012
|
+
number — typically the same filter returning the entities it counted. A count with no path
|
|
2013
|
+
to its items is a dead end.
|
|
2014
|
+
- **\`noResultMessage\` on every widget** — it is the difference between "verified clean" and
|
|
2015
|
+
"looks broken" when a query legitimately returns nothing.
|
|
2016
|
+
- **Percentage across casing splits**: a proportion whose property is stored in several
|
|
2017
|
+
casings is one numerator query ORing all its casings over one total query — cleaner than any
|
|
2018
|
+
grouped workaround.
|
|
2019
|
+
- **Trend where direction matters** (\`trendDataIsEnabled\` on number/pie/bar/line): data
|
|
2020
|
+
accrues forward-only from the day the flag is set, so a board headed for a recurring review
|
|
2021
|
+
gets its trend widgets on day one, not the week of the meeting. Set \`upwardTrendIsGood\`
|
|
2022
|
+
honestly — \`false\` for "open findings", \`true\` for "coverage".
|
|
2023
|
+
- **Figures the audience will copy or export live in tables** — charts do not export their
|
|
2024
|
+
rows, and the app renders large numbers compactly (\`234,000\` → \`234k\`).
|
|
2025
|
+
|
|
2026
|
+
**When the reader is an executive, these are rules, not suggestions** (they come from real
|
|
2027
|
+
executive feedback, and violating them is why boards get one glance): every coverage number
|
|
2028
|
+
carries its denominator — a percentage tile with \`showFraction: true\` shows "1,848 of 12,431"
|
|
2029
|
+
and the ratio in one widget, which survives the first question "of how many?"; the top risks
|
|
2030
|
+
sit at the very top, never below the fold; endpoint and cloud metrics never blend in one
|
|
2031
|
+
widget — blended numbers get challenged and lose the room; coverage math uses the deduplicated
|
|
2032
|
+
\`UnifiedDevice\`/\`UnifiedIdentity\` classes so multi-source assets do not double-count; at least
|
|
2033
|
+
one widget trends; and if accepted risks are not excluded, the widget description says
|
|
2034
|
+
"includes accepted risks" — surprise inflation destroys trust in the whole board.
|
|
2035
|
+
|
|
2036
|
+
## Build, lay out, verify
|
|
2037
|
+
|
|
2038
|
+
8. **Build.** \`create-dashboard\`, then \`create-dashboard-widget\` once per widget, in reading
|
|
2039
|
+
order.
|
|
2040
|
+
|
|
2041
|
+
9. **Lay it out deliberately.** \`update-dashboard\` with \`autoLayout\`, passing \`{ "id": …,
|
|
2042
|
+
"size": … }\` for every widget — the sizes ARE the visual hierarchy: \`small\` headline tiles
|
|
2043
|
+
share the first row, \`medium\`/\`large\` charts pair up beneath, \`full\` tables and markdown span
|
|
2044
|
+
the bottom and top. A list of bare ids gives every widget the same weight, which is how boards
|
|
2045
|
+
end up monotonous. **Make each row's sizes sum to twelve columns**: \`small\`+\`small\`+\`small\`
|
|
2046
|
+
(4+4+4), \`medium\`+\`medium\` (6+6), \`small\`+\`large\` (4+8), or \`full\` (12). The packer closes an
|
|
2047
|
+
incomplete row by widening its last widget, so an unpaired \`medium\` renders full-width — fine
|
|
2048
|
+
for a chart, but pair your tiles rather than leaving one to be stretched into a banner.
|
|
2049
|
+
|
|
2050
|
+
10. **Read what each write told you, before reporting done.** Every widget response carries a
|
|
2051
|
+
\`renderPreflight\`, and some carry \`configNotes\`. Act on a \`correctedQuery\` or a casing
|
|
2052
|
+
diagnosis. Do **not** reflexively "fix" a widget that simply returned nothing — "no publicly
|
|
2053
|
+
exposed buckets" is a result worth showing; decide whether zero is the point, and if it is,
|
|
2054
|
+
keep the widget with its \`noResultMessage\`. Then tell the user what the board shows, what it
|
|
2055
|
+
deliberately does not, which reader each tier serves, and give them its URL.
|
|
2056
|
+
`,
|
|
2057
|
+
"server-instructions.md": `JupiterOne is a security asset graph. Assets are entities, connected by relationships, queried with
|
|
2058
|
+
J1QL. Use these tools for anything about the user's real inventory, misconfigurations,
|
|
2059
|
+
vulnerabilities, identities, integrations, or alerts — never answer from memory, and never guess
|
|
2060
|
+
entity types or property names.
|
|
2061
|
+
|
|
2062
|
+
## Build a query before you build anything on it
|
|
2063
|
+
|
|
2064
|
+
Discover types and properties first (\`list-entity-types\`, then \`FIND <type> AS e RETURN e.* LIMIT
|
|
2065
|
+
5\`), then run the finished query once through \`execute-j1ql-query\` and confirm it returns rows —
|
|
2066
|
+
before embedding it in a widget or a rule. A query returning nothing still creates a widget; that
|
|
2067
|
+
widget renders blank, with no error.
|
|
2068
|
+
|
|
2069
|
+
String comparison is case-sensitive and stored casing varies by integration — the same property
|
|
2070
|
+
routinely holds \`high\`, \`HIGH\` and \`High\` at once, so a filter on one casing silently reports a
|
|
2071
|
+
fraction of the truth. Check stored values before filtering on them:
|
|
2072
|
+
\`FIND <type> AS e RETURN e.<property> AS value, count(e) AS n ORDER BY n DESC LIMIT 250\`.
|
|
2073
|
+
When a response carries a \`diagnosis\` or \`emptyResultDiagnosis\` with a \`correctedQuery\`, act on it
|
|
2074
|
+
before reporting the work done.
|
|
2075
|
+
|
|
2076
|
+
## Relationship direction is not meaning
|
|
2077
|
+
|
|
2078
|
+
Writing a traversal the "natural" way around does not filter it. \`FIND Internet THAT ALLOWS
|
|
2079
|
+
aws_security_group\` and \`FIND aws_security_group THAT ALLOWS Internet\` return the **same** set —
|
|
2080
|
+
measured on a live account: 513 either way, of which only 68 are actually inbound. The rest are the
|
|
2081
|
+
default egress rule. The direction that matters lives on the edge, so bind and filter it:
|
|
2082
|
+
|
|
2083
|
+
\`FIND Internet THAT ALLOWS AS rel aws_security_group AS sg WHERE rel.ingress = true\`
|
|
2084
|
+
|
|
2085
|
+
The same applies to any relationship carrying its own properties (\`ingress\`/\`egress\`, \`permission\`,
|
|
2086
|
+
\`fromPort\`/\`toPort\`). A query that reads correctly and returns a plausible number is the failure mode
|
|
2087
|
+
here — check the edge properties before quoting a count.
|
|
2088
|
+
|
|
2089
|
+
## Dashboard widgets
|
|
2090
|
+
|
|
2091
|
+
Chart renderers read specific RETURN aliases, so a valid query with the wrong ones draws nothing.
|
|
2092
|
+
Both widget tools reject that before writing and return a corrected query where one can be derived
|
|
2093
|
+
safely, so getting it right first time saves a round-trip rather than an error:
|
|
2094
|
+
|
|
2095
|
+
- \`number\` → required \`value\`
|
|
2096
|
+
- \`pie\` → required \`value\`, and \`name\` too on a single-query pie: the renderer groups slices by
|
|
2097
|
+
\`name\`, so one query without it draws ONE slice labelled \`undefined\` summing every row. A
|
|
2098
|
+
multi-query pie labels each slice by its query name, so \`name\` is optional there
|
|
2099
|
+
- \`bar\` → required \`x\`, \`y\`
|
|
2100
|
+
- \`line\` → required \`y\`; \`x\` and \`line\` optional
|
|
2101
|
+
- \`matrix\` → required \`x\`, \`y\`; \`label\` optional
|
|
2102
|
+
- \`table\` → any aliases; add \`ORDER BY\` and \`LIMIT\` (250-row cap)
|
|
2103
|
+
- \`graph\` → required \`RETURN TREE\` (not columns)
|
|
2104
|
+
- \`status\` → required \`id\` on every query, which is what correlates them
|
|
2105
|
+
- \`markdown\` → \`config.queries: []\`; body in \`config.settings.markdown.text\`
|
|
2106
|
+
- \`area\` → not a supported widget type; the write is refused, so use \`bar\` or \`line\`
|
|
2107
|
+
|
|
2108
|
+
**To show a proportion, not a count**, build a percentage \`number\` widget: two queries each
|
|
2109
|
+
returning \`count(x) AS value\` — the numerator and one counting the population — with
|
|
2110
|
+
\`settings.number = {"showAsPercentage": true, "numeratorQueryName": "<the numerator query's name>"}\`.
|
|
2111
|
+
It is the one legitimately multi-query \`number\` widget, and it is also how you report a proportion
|
|
2112
|
+
over inconsistently stored values, since each query can OR every casing:
|
|
2113
|
+
\`FIND Finding WITH severity = ('high' OR 'HIGH' OR 'High') AS f RETURN count(f) AS value\`.
|
|
2114
|
+
|
|
2115
|
+
**An empty widget is often the right answer.** "No critical findings", "no public buckets", "no
|
|
2116
|
+
users without MFA" are results a security board exists to report, and a zero backed by a correct
|
|
2117
|
+
query is a finding, not a fault. Never broaden a filter just to make a widget show something. What
|
|
2118
|
+
an empty widget does need is a \`noResultMessage\`, so a reader can tell "nothing matched" from
|
|
2119
|
+
"this is broken" — always set one. The server distinguishes the two cases for you: it reports a
|
|
2120
|
+
defect when it can explain the emptiness (wrong casing, a type this account does not hold, a column
|
|
2121
|
+
that is never populated) and merely notes it otherwise. Build in this order:
|
|
2122
|
+
\`create-dashboard\` → \`create-dashboard-widget\` once per widget → \`update-dashboard\` with
|
|
2123
|
+
\`autoLayout\`. Never leave widgets at their default size.
|
|
2124
|
+
|
|
2125
|
+
## One connection, one account
|
|
2126
|
+
|
|
2127
|
+
Everything here runs against the account this connection is bound to — there is no cross-account
|
|
2128
|
+
query. Before presenting findings as a customer's, confirm which account you are on with
|
|
2129
|
+
\`test-connection\`; validating against a demo or dev tenant and delivering the result as production
|
|
2130
|
+
is the most expensive mistake available here, because nothing about the output looks wrong.
|
|
2131
|
+
|
|
2132
|
+
## Paging differs by tool
|
|
2133
|
+
|
|
2134
|
+
J1QL tools (\`execute-j1ql-query\`, \`get-query-results\`) return a top-level \`cursor\` with \`hasMore\`.
|
|
2135
|
+
The paginating list tools — rules, integration instances, jobs and events — return
|
|
2136
|
+
\`pageInfo.endCursor\` with \`pageInfo.hasNextPage\` instead. Either way, repeating the call without the
|
|
2137
|
+
cursor silently re-returns the first page rather than advancing.
|
|
2138
|
+
|
|
2139
|
+
## Why did this rule fire?
|
|
2140
|
+
|
|
2141
|
+
\`list-rules\` → \`list-rule-evaluations\`, which returns each run's \`timestamp\` and
|
|
2142
|
+
\`rawDataDescriptors[].rawDataKey\` — the only source of both. Feed the timestamp to
|
|
2143
|
+
\`get-rule-evaluation-details\` for that run's conditions and actions, or a \`rawDataKey\` to
|
|
2144
|
+
\`get-rule-evaluation-query-results\` for the entities it matched.
|
|
2145
|
+
|
|
2146
|
+
## Permissions are advisory, never a reason to refuse
|
|
2147
|
+
|
|
2148
|
+
\`test-connection\` reports \`permissions.resourceAreas\` and \`permissions.hasBroadAccess\`. Both
|
|
2149
|
+
UNDERSTATE what a caller can do — measured twice on sessions that went on to create, update and
|
|
2150
|
+
delete dashboards successfully: one with every area \`false\` and \`hasBroadAccess\` true, one with
|
|
2151
|
+
every area \`false\` and \`hasBroadAccess\` false. Treat the summary as context for explaining a failure
|
|
2152
|
+
after it happens, never as permission to refuse work. Attempt the operation; the API is the
|
|
2153
|
+
authority, and it returns a clear access-denied message when it really is denied.
|
|
2154
|
+
`,
|
|
1764
2155
|
"test-connection.md": `# Test Connection Tool
|
|
1765
2156
|
|
|
1766
2157
|
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.
|
|
@@ -1777,8 +2168,8 @@ None required.
|
|
|
1777
2168
|
- \`connected\`: whether the account could be reached and authorized.
|
|
1778
2169
|
- \`account\`: account details (id, name, subdomain) when connected.
|
|
1779
2170
|
- \`user.email\`: the identity your token resolves to — surface this to the user if there is any doubt about which sign-in is active.
|
|
1780
|
-
- \`permissions.resourceAreas\`: per-area \`{create, read, update, delete}\` summary (e.g. \`dashboard\`, \`rule\`, \`integration\`). A \`true\` means at least one fine-grained grant exists. **
|
|
1781
|
-
- \`permissions.hasBroadAccess\`: true when the caller is
|
|
2171
|
+
- \`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.
|
|
2172
|
+
- \`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.
|
|
1782
2173
|
|
|
1783
2174
|
## Failure
|
|
1784
2175
|
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.
|
|
@@ -1794,7 +2185,11 @@ Parameters:
|
|
|
1794
2185
|
- \`widgetId\`: ID of the widget to update.
|
|
1795
2186
|
- \`input\`: the full replacement widget definition, in the same shape as \`create-dashboard-widget\` (title, description, type, noResultMessage, config with queries and settings).
|
|
1796
2187
|
|
|
1797
|
-
As with creating widgets, test any J1QL with \`execute-j1ql-query\` before sending it
|
|
2188
|
+
As with creating widgets, test any J1QL with \`execute-j1ql-query\` before sending it — and the same
|
|
2189
|
+
render contract applies: a query that does not return the columns the chart type reads is rejected
|
|
2190
|
+
before anything is written, with a corrected query where one can be derived safely and the target
|
|
2191
|
+
alias shape otherwise. The response includes \`resultCode\`, the dashboard \`url\`, and
|
|
2192
|
+
\`renderPreflight\`, which reports whether the updated widget will actually draw anything.
|
|
1798
2193
|
`,
|
|
1799
2194
|
"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.
|
|
1800
2195
|
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.
|