@jupiterone/jupiterone-mcp 0.0.4 → 0.0.7
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 +2 -2
- package/dist/client/graphql/mutations.js +13 -10
- package/dist/client/graphql/mutations.js.map +1 -1
- package/dist/client/graphql/queries.js +17 -14
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +6 -3
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +35 -20
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/account-service.d.ts +1 -0
- package/dist/client/services/account-service.d.ts.map +1 -1
- package/dist/client/services/account-service.js +9 -4
- package/dist/client/services/account-service.js.map +1 -1
- package/dist/client/services/alert-service.js +7 -3
- package/dist/client/services/alert-service.js.map +1 -1
- package/dist/client/services/dashboard-service.d.ts +4 -0
- package/dist/client/services/dashboard-service.d.ts.map +1 -1
- package/dist/client/services/dashboard-service.js +21 -8
- package/dist/client/services/dashboard-service.js.map +1 -1
- package/dist/client/services/integration-service.js +11 -7
- package/dist/client/services/integration-service.js.map +1 -1
- package/dist/client/services/j1ql-service.js +9 -5
- package/dist/client/services/j1ql-service.js.map +1 -1
- package/dist/client/services/rule-service.d.ts +4 -0
- package/dist/client/services/rule-service.d.ts.map +1 -1
- package/dist/client/services/rule-service.js +26 -13
- package/dist/client/services/rule-service.js.map +1 -1
- package/dist/generated/description-map.d.ts +2 -0
- package/dist/generated/description-map.d.ts.map +1 -0
- package/dist/generated/description-map.js +2300 -0
- package/dist/generated/description-map.js.map +1 -0
- package/dist/index.js +11 -12
- package/dist/index.js.map +1 -1
- package/dist/server/mcp-server.d.ts +4 -1
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +1535 -1366
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/types/jupiterone.d.ts +3 -2
- package/dist/types/jupiterone.d.ts.map +1 -1
- package/dist/types/jupiterone.js +2 -1
- package/dist/utils/description-loader.js +8 -5
- package/dist/utils/description-loader.js.map +1 -1
- package/dist/utils/getEnv.d.ts +2 -0
- package/dist/utils/getEnv.d.ts.map +1 -0
- package/dist/utils/getEnv.js +16 -0
- package/dist/utils/getEnv.js.map +1 -0
- package/dist/utils/j1ql-validator.js +5 -1
- package/dist/utils/j1ql-validator.js.map +1 -1
- package/dist/utils/load-description.d.ts.map +1 -1
- package/dist/utils/load-description.js +7 -7
- package/dist/utils/load-description.js.map +1 -1
- package/package.json +5 -5
- package/dist/descriptions/create-dashboard-widget.md +0 -325
- package/dist/descriptions/create-dashboard.md +0 -12
- package/dist/descriptions/create-inline-question-rule.md +0 -374
- package/dist/descriptions/create-j1ql-from-natural-language.md +0 -7
- package/dist/descriptions/execute-j1ql-query.md +0 -379
- package/dist/descriptions/get-integration-definitions.md +0 -27
- package/dist/descriptions/get-integration-instances.md +0 -35
- package/dist/descriptions/list-alerts.md +0 -14
- package/dist/descriptions/list-rules.md +0 -53
- package/dist/descriptions/update-dashboard.md +0 -467
- package/dist/descriptions/update-inline-question-rule.md +0 -363
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# JupiterOne Natural Language to J1QL Converter
|
|
2
|
-
|
|
3
|
-
**Purpose**: Converts natural language queries into JupiterOne Query Language (J1QL) syntax using AI-powered translation.
|
|
4
|
-
Unless the user gives a specific query to run, this should always be used for determing a query to use for any (but not exclusively) of the following:
|
|
5
|
-
- Queries for rules
|
|
6
|
-
- Queries for widgets
|
|
7
|
-
- Queries to answer a user's question regarding their data in jupiterone
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
# JupiterOne J1QL Query Executor
|
|
2
|
-
|
|
3
|
-
**Purpose**: Executes JupiterOne Query Language (J1QL) queries against your JupiterOne data and returns the results. This tool is used to directly run J1QL queries that have been created, either manually or through the natural language converter.
|
|
4
|
-
|
|
5
|
-
This tool should be used when:
|
|
6
|
-
- You need to validate the data of a query
|
|
7
|
-
- You need to get results from a previously generated query
|
|
8
|
-
- You want to test a query before using it in a rule or widget
|
|
9
|
-
- You need to analyze data directly using J1QL
|
|
10
|
-
|
|
11
|
-
The tool supports various query parameters including:
|
|
12
|
-
- Including/excluding deleted entities
|
|
13
|
-
- Returning row metadata
|
|
14
|
-
- Returning computed properties
|
|
15
|
-
- Applying scope filters
|
|
16
|
-
- Pagination using cursors
|
|
17
|
-
|
|
18
|
-
### JupiterOne Query Language (J1QL) Quick Reference
|
|
19
|
-
|
|
20
|
-
> **IMPORTANT:** Always validate queries using this tool before creating rules or widgets. Start with discovery queries if unsure about data structure.
|
|
21
|
-
|
|
22
|
-
#### Core Concepts
|
|
23
|
-
|
|
24
|
-
**Entity and Relationship Structure**
|
|
25
|
-
- **Entities**: Assets in your environment with specific classes and types
|
|
26
|
-
- **Entity Class**: Always `TitleCase` (e.g., `User`, `Host`, `Application`)
|
|
27
|
-
- **Entity Type**: Always `snake_case` (e.g., `aws_iam_user`, `github_user`)
|
|
28
|
-
- **Relationships**: Connections between entities
|
|
29
|
-
- **Relationship Class**: Always `ALLCAPS` (e.g., `HAS`, `USES`, `PROTECTS`)
|
|
30
|
-
- **Default Returns**: Queries return the first entity after FIND unless explicitly modified with RETURN
|
|
31
|
-
- **Unified Entities**: Deduplicated repersentation of assets seen in JupiterOne have a `_type: unified_entity`
|
|
32
|
-
|
|
33
|
-
#### Unified Entities
|
|
34
|
-
|
|
35
|
-
Unified entities are the deduplicated "real-world" repersentation of data seen by JupiterOne. All Unified entities have a `_type = unified_entity`, and this is often the entity the user wants referenced.
|
|
36
|
-
|
|
37
|
-
Unified Entities currently supported:
|
|
38
|
-
- **UnifiedDevice**: Deduplicated representation of devices in the inventory
|
|
39
|
-
- **UnifiedIdentity**: Deduplicated representation of identities in the inventory
|
|
40
|
-
- **UnifiedVulnerability**: Deduplicated representation of vulnerabilities in the inventory
|
|
41
|
-
|
|
42
|
-
Unified entities typically also have additional enrichment making them valuable assets to search off of or reference back to. Unified entities only have relationships to the entities that they deduplicate, and you need to query off of their source components to get more context - for example a list of all devices related to users would look like:
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
FIND UnifiedIdentity AS identity
|
|
46
|
-
THAT IS << User
|
|
47
|
-
THAT RELATES TO AS rel (Device|Host)
|
|
48
|
-
THAT IS >> UnifiedDevice AS device
|
|
49
|
-
RETURN identity.displayName, rel._class, device.displayName
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**IMPORTANT**: Whenever answering questions about entities that have a unified entity representation, answer the question in terms of unified entities.
|
|
53
|
-
|
|
54
|
-
#### MANDATORY Query Structure
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
FIND <entity> [WITH <property_filter>] [AS <alias>]
|
|
58
|
-
[THAT <relationship> [<direction>] <entity> [WITH <property_filter>] [AS <alias>]]
|
|
59
|
-
[WHERE <condition>]
|
|
60
|
-
[RETURN <field_selection>]
|
|
61
|
-
[ORDER BY <field>]
|
|
62
|
-
[SKIP <number>]
|
|
63
|
-
[LIMIT <number>]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### ⚠️ CRITICAL SYNTAX RULES ⚠️ ALL QUERIES MUST ADHERE TO THESE RULES
|
|
67
|
-
|
|
68
|
-
1. **Alias Placement**: Aliases MUST follow the WITH statement when filtering
|
|
69
|
-
✅ `FIND Device WITH name~='TEST' AS dev`
|
|
70
|
-
❌ `FIND Device AS dev WITH name~='TEST'`
|
|
71
|
-
|
|
72
|
-
2. **String Values**: ALWAYS use single quotes for strings, NEVER double quotes
|
|
73
|
-
✅ `name ~= 'john'`
|
|
74
|
-
❌ `name ~= "john"`
|
|
75
|
-
|
|
76
|
-
3. **WITH vs WHERE**: Use WITH for entity properties, WHERE only for relationship properties or cross-entity comparisons
|
|
77
|
-
✅ `FIND User WITH active = true`
|
|
78
|
-
✅ `FIND User AS u THAT HAS Device AS d WHERE u.active = true AND d.platform = 'darwin'`
|
|
79
|
-
❌ `FIND User WHERE active = true`
|
|
80
|
-
|
|
81
|
-
4. **LIMIT Usage**: ALWAYS include LIMIT (5-100) or use COUNT for discovery
|
|
82
|
-
✅ `FIND User LIMIT 50`
|
|
83
|
-
✅ `FIND User AS u RETURN u._type, count(u)`
|
|
84
|
-
❌ `FIND User` (no limit specified)
|
|
85
|
-
|
|
86
|
-
5. **Relationship Direction**: Direction arrows MUST follow the relationship verb
|
|
87
|
-
✅ `FIND User THAT HAS >> Device`
|
|
88
|
-
❌ `FIND User THAT >> HAS Device`
|
|
89
|
-
|
|
90
|
-
6. **Optional Traversals**: Use parentheses and question mark
|
|
91
|
-
✅ `FIND User AS u (THAT IS Person AS p)?`
|
|
92
|
-
❌ `FIND User AS u THAT IS? Person AS p`
|
|
93
|
-
|
|
94
|
-
7. **Using Aggregates For Discovery**: Alias COUNT and use ORDER BY
|
|
95
|
-
✅ `FIND * AS ent RETURN ent._class, COUNT(ent) AS cnt ORDER BY cnt DESC LIMIT 50`
|
|
96
|
-
❌ `FIND * AS ent RETURN ent._class, COUNT(ent) LIMIT 50`
|
|
97
|
-
|
|
98
|
-
#### Entity Selection
|
|
99
|
-
|
|
100
|
-
**Finding by class or type**:
|
|
101
|
-
```j1ql
|
|
102
|
-
FIND User LIMIT 10 # Find entities with _class = 'User'
|
|
103
|
-
FIND aws_iam_user LIMIT 10 # Find entities with _type = 'aws_iam_user'
|
|
104
|
-
FIND * WITH _type='aws_instance' LIMIT 10 # Filter any entity by type
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Finding multiple entity types**:
|
|
108
|
-
```j1ql
|
|
109
|
-
FIND (User | Host) LIMIT 10 # Find entities with _class = 'User' OR _class = 'Host'
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
#### Property Filtering (WITH)
|
|
113
|
-
|
|
114
|
-
**Basic property filtering**:
|
|
115
|
-
```j1ql
|
|
116
|
-
FIND User WITH active = true LIMIT 10
|
|
117
|
-
FIND DataStore WITH encrypted = false LIMIT 10
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**WITH filtering with alias** (CORRECT ORDER):
|
|
121
|
-
```j1ql
|
|
122
|
-
FIND User WITH active = true AS u LIMIT 10
|
|
123
|
-
FIND DataStore WITH encrypted = false AS ds LIMIT 10
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**WITH filtering with alias AND Advanced fiiltering** (CORRECT ORDER):
|
|
127
|
-
```j1ql
|
|
128
|
-
FIND User WITH accountCount > 0 AS u RETURN u.displayName
|
|
129
|
-
FIND DataStore WITH name~='ROOT' OR name=/iam/i AS ds RETURN ds.name, ds.encrypted LIMIT 10
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Multiple property filters**:
|
|
133
|
-
```j1ql
|
|
134
|
-
FIND User WITH active = true AND mfaEnabled = false LIMIT 10
|
|
135
|
-
FIND Host WITH platform = 'darwin' OR platform = 'linux' LIMIT 10
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**Multiple value matching**:
|
|
139
|
-
```j1ql
|
|
140
|
-
FIND Host WITH platform = ('darwin' OR 'linux') LIMIT 10
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**Property existence check**:
|
|
144
|
-
```j1ql
|
|
145
|
-
FIND DataStore WITH encrypted = undefined LIMIT 10
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Special character property names**:
|
|
149
|
-
```j1ql
|
|
150
|
-
FIND Host WITH [tag.special-name] = 'value' LIMIT 10
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
#### String Comparisons
|
|
154
|
-
|
|
155
|
-
J1QL comparison operators:
|
|
156
|
-
- `=` : equals (exact match)
|
|
157
|
-
- `!=` : not equals
|
|
158
|
-
- `~=` : contains
|
|
159
|
-
- `^=` : starts with
|
|
160
|
-
- `$=` : ends with
|
|
161
|
-
- `!~=` : does not contain
|
|
162
|
-
- `!^=` : does not start with
|
|
163
|
-
- `!$=` : does not end with
|
|
164
|
-
|
|
165
|
-
```j1ql
|
|
166
|
-
FIND User WITH username ~= 'john' LIMIT 10
|
|
167
|
-
FIND Host WITH name ^= 'web' LIMIT 10
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
#### Case-Insensitive Matching (Regex)
|
|
171
|
-
|
|
172
|
-
```j1ql
|
|
173
|
-
FIND User WITH username=/john/ LIMIT 10 # Case-insensitive match
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
#### Traversing Relationships (THAT)
|
|
177
|
-
|
|
178
|
-
## Important: Don't assume relationship VERBS, either do discovery to determine the correct relationship or use the wild card relationship "THAT RELATES TO"
|
|
179
|
-
|
|
180
|
-
**Any relationship traversal (i.e. wildcard)**:
|
|
181
|
-
```j1ql
|
|
182
|
-
FIND User THAT RELATES TO Application LIMIT 10
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Basic traversal**:
|
|
186
|
-
```j1ql
|
|
187
|
-
FIND User THAT HAS Device LIMIT 10
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**Multiple traversal steps**:
|
|
191
|
-
```j1ql
|
|
192
|
-
FIND User THAT HAS Device THAT INSTALLED Application LIMIT 10
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Multi-step traversal with filtering**:
|
|
196
|
-
```j1ql
|
|
197
|
-
FIND User WITH active = true THAT HAS Device THAT INSTALLED Application WITH vendor = 'Microsoft' LIMIT 10
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**Multiple relationship types**:
|
|
201
|
-
```j1ql
|
|
202
|
-
FIND HostAgent THAT (MONITORS|PROTECTS) Host LIMIT 10
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Negating relationships**:
|
|
206
|
-
```j1ql
|
|
207
|
-
FIND User THAT !HAS Device LIMIT 10 # Find users that don't have devices
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
**Relationship direction** (arrows MUST follow relationship):
|
|
211
|
-
```j1ql
|
|
212
|
-
FIND User THAT HAS >> Device LIMIT 10 # Direction from User to Device
|
|
213
|
-
FIND Device THAT HAS << User LIMIT 10 # Direction from User to Device
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
#### Using Aliases (AS) - ALWAYS AFTER WITH CLAUSE
|
|
217
|
-
|
|
218
|
-
```j1ql
|
|
219
|
-
FIND User WITH active = true AS u
|
|
220
|
-
THAT HAS AS relationship Device WITH platform = 'darwin' AS d
|
|
221
|
-
RETURN u._type, relationship._class, d._type, COUNT(relationship)
|
|
222
|
-
LIMIT 10
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### Post-Traversal Filtering (WHERE) - ONLY FOR RELATIONSHIPS OR CROSS-ENTITY COMPARISON
|
|
226
|
-
|
|
227
|
-
**Example of filtering on relationship properties**
|
|
228
|
-
```j1ql
|
|
229
|
-
FIND Firewall AS fw
|
|
230
|
-
THAT ALLOWS AS rule * AS n
|
|
231
|
-
WHERE rule.ingress = true
|
|
232
|
-
LIMIT 10
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
```j1ql
|
|
236
|
-
FIND User AS u
|
|
237
|
-
THAT HAS Device AS d
|
|
238
|
-
WHERE u.active = true AND d.platform = 'darwin'
|
|
239
|
-
LIMIT 10
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
#### Selecting Return Values (RETURN)
|
|
243
|
-
|
|
244
|
-
```j1ql
|
|
245
|
-
FIND User AS u
|
|
246
|
-
THAT HAS Device AS d
|
|
247
|
-
RETURN u.username, d.name
|
|
248
|
-
LIMIT 10
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Return all properties:
|
|
252
|
-
```j1ql
|
|
253
|
-
FIND User AS u RETURN u.* LIMIT 10
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
#### Aggregation Functions (USE FOR DISCOVERY)
|
|
257
|
-
|
|
258
|
-
Available aggregations:
|
|
259
|
-
- `count(selector)`
|
|
260
|
-
- `min(selector.field)`
|
|
261
|
-
- `max(selector.field)`
|
|
262
|
-
- `avg(selector.field)`
|
|
263
|
-
- `sum(selector.field)`
|
|
264
|
-
|
|
265
|
-
```j1ql
|
|
266
|
-
# Basic count
|
|
267
|
-
FIND User AS u RETURN count(u)
|
|
268
|
-
|
|
269
|
-
# Group by with count
|
|
270
|
-
FIND User AS u RETURN u._type, count(u)
|
|
271
|
-
|
|
272
|
-
# Multiple aggregations
|
|
273
|
-
FIND Account AS acct THAT HAS User AS user
|
|
274
|
-
RETURN acct.name, count(user), avg(user.lastLoginOn)
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
#### Date Comparisons
|
|
278
|
-
|
|
279
|
-
```j1ql
|
|
280
|
-
FIND User WITH createdOn > date.now - 7 days LIMIT 10
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Supported units: `hour(s)`, `day(s)`, `month(s)`, `year(s)`
|
|
284
|
-
|
|
285
|
-
#### Math Operations
|
|
286
|
-
|
|
287
|
-
```j1ql
|
|
288
|
-
FIND aws_instance AS i
|
|
289
|
-
RETURN i.name, i.memorySize * 0.001 AS memoryGB
|
|
290
|
-
LIMIT 10
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
#### Sorting and Pagination
|
|
294
|
-
|
|
295
|
-
```j1ql
|
|
296
|
-
FIND User AS u
|
|
297
|
-
ORDER BY u.username
|
|
298
|
-
SKIP 10
|
|
299
|
-
LIMIT 5
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
#### Optional Traversals (PROPER SYNTAX)
|
|
303
|
-
|
|
304
|
-
```j1ql
|
|
305
|
-
FIND User AS u
|
|
306
|
-
(THAT IS Person AS p)?
|
|
307
|
-
THAT HAS Device AS d
|
|
308
|
-
LIMIT 10
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
Optional traversal with property access:
|
|
312
|
-
```j1ql
|
|
313
|
-
FIND User AS u
|
|
314
|
-
(THAT IS Person AS p)?
|
|
315
|
-
THAT HAS Device AS d
|
|
316
|
-
RETURN u.username, p.email, d.name
|
|
317
|
-
LIMIT 10
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
#### Discovery Queries - ALWAYS START HERE
|
|
321
|
-
|
|
322
|
-
1. **Find all entity classes**: `FIND * AS e RETURN e._class, COUNT(e)`
|
|
323
|
-
2. **Explore entity properties**: `FIND EntityClass AS e RETURN e.* LIMIT 10`
|
|
324
|
-
3. **Discover relationships**: `FIND Entity1 THAT RELATES TO AS rel Entity2 RETURN rel._class`
|
|
325
|
-
4. **Check property values**: `FIND Entity AS e RETURN e.property, COUNT(e)`
|
|
326
|
-
|
|
327
|
-
#### ⚠️ QUERY VALIDATION CHECKLIST ⚠️
|
|
328
|
-
|
|
329
|
-
Before running any J1QL query, verify:
|
|
330
|
-
|
|
331
|
-
1. ✓ FIND statement specifies entity class or type
|
|
332
|
-
2. ✓ All string values use single quotes, not double quotes
|
|
333
|
-
3. ✓ Aliases are placed AFTER the WITH statement
|
|
334
|
-
4. ✓ All queries include either LIMIT or use COUNT aggregation
|
|
335
|
-
5. ✓ WITH is used for entity properties, WHERE only for relationship properties or cross-entity comparisons
|
|
336
|
-
6. ✓ Direction arrows (>> or <<) are placed after relationship verbs
|
|
337
|
-
7. ✓ Optional traversals use proper parentheses and question mark syntax
|
|
338
|
-
8. ✓ All aliases referenced in RETURN or WHERE are properly defined earlier
|
|
339
|
-
|
|
340
|
-
#### Most Common Errors (Quick Reference)
|
|
341
|
-
|
|
342
|
-
1. **Missing quotes**: `name = john` → `name = 'john'`
|
|
343
|
-
2. **Wrong quotes**: `name = "john"` → `name = 'john'`
|
|
344
|
-
3. **Alias placement**: `AS u WITH active = true` → `WITH active = true AS u`
|
|
345
|
-
4. **WHERE needs alias**: `WHERE active = true` → `AS u WHERE u.active = true`
|
|
346
|
-
5. **Undefined alias**: `FIND User RETURN u.name` → `FIND User AS u RETURN u.name`
|
|
347
|
-
6. **No LIMIT**: Add `LIMIT 100` or use `COUNT()` to prevent timeouts
|
|
348
|
-
|
|
349
|
-
#### Common Patterns & Examples
|
|
350
|
-
|
|
351
|
-
**Security Queries**:
|
|
352
|
-
- Unencrypted data: `FIND DataStore WITH encrypted = false`
|
|
353
|
-
- Users without MFA: `FIND User WITH mfaEnabled != true`
|
|
354
|
-
- Critical findings: `FIND Finding WITH severity = "critical"`
|
|
355
|
-
|
|
356
|
-
**Dashboard Queries**:
|
|
357
|
-
- Pie chart: Return `name` and `value` pairs
|
|
358
|
-
- Number chart: Return single `value`
|
|
359
|
-
- Bar chart: Return `x` and `y` values
|
|
360
|
-
- Table: Return named columns
|
|
361
|
-
|
|
362
|
-
**Rule Queries**:
|
|
363
|
-
- New entities: Add time filter `WITH _createdOn > date.now - 1 day`
|
|
364
|
-
- Always test with `execute-j1ql-query` first
|
|
365
|
-
- Use condition: `["AND", ["queries.query0.total", ">", 0]]`
|
|
366
|
-
|
|
367
|
-
#### Best Practices
|
|
368
|
-
|
|
369
|
-
1. **Always start with discovery** - Don't assume entity names or properties
|
|
370
|
-
2. **Test incrementally** - Build complex queries step by step
|
|
371
|
-
3. **Use this tool to validate** - Test every query before using in rules/widgets
|
|
372
|
-
4. **Check error suggestions** - The tool provides specific fixes for common issues
|
|
373
|
-
5. **Use proper syntax**:
|
|
374
|
-
- Single quotes for strings
|
|
375
|
-
- Alias AFTER WITH clause
|
|
376
|
-
- LIMIT to prevent timeouts
|
|
377
|
-
- Proper capitalization for classes
|
|
378
|
-
|
|
379
|
-
**Remember**: The execute-j1ql-query tool now provides enhanced error messages with specific suggestions. Always test queries here first!
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Get Integration Definitions Tool
|
|
2
|
-
|
|
3
|
-
Get all available integration definitions in your JupiterOne account. This tool returns a list of integration definitions that can be used to create integration instances. Integration definitions define the types of integrations available (like AWS, Azure, GitHub, etc.) and their configuration requirements. If a user is needing a specific integration instance id for something such as a rule action, you will want to start here and then use the `get-integration-instances` tool. Each integration definition will have a Name and a Title field, you should use this to identify which definition is correct for what the user is looking for. As an example, if the user wants to send a slack notification as a part of a rule action, you would want to pull all of the integration definitions and find any that have Slack in the name and/or title. If there are multiple, then clarify the differences to the user and allow them to guide you on which one is correct.
|
|
4
|
-
|
|
5
|
-
## Parameters
|
|
6
|
-
- `cursor` (optional): Pagination cursor to get the next page of results. Use the `endCursor` from a previous response's `pageInfo`. When you are needing to find a specific type of integration, you will want to query all of the available pages until there are no more left to query so you can select from the entire list.
|
|
7
|
-
- `includeConfig` (optional): Whether to include configuration fields in the response. When true, returns detailed configuration schemas for each integration type. Typically this should be false or omitted entirely.
|
|
8
|
-
|
|
9
|
-
## Example Usage
|
|
10
|
-
Get all integration definitions without configuration details:
|
|
11
|
-
```json
|
|
12
|
-
{}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Get all integration definitions with configuration fields:
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"includeConfig": true
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Get the next page of integration definitions using a cursor:
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"cursor": "cursor_here"
|
|
26
|
-
}
|
|
27
|
-
```
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Get Integration Instances Tool
|
|
2
|
-
|
|
3
|
-
Get all integration instances in your JupiterOne account. This tool returns a list of configured integration instances, including their configuration, status, and recent job information. Integration instances are the actual configured connections to external services like AWS accounts, GitHub repositories, etc. Unless you have an integration definition id, you typically will not want to query this yet. To get an integration definition id, use the `get-integration-definitions` tool. If you need an integration instance id for another task (such as creating a rule action), ask the user which of the possible integrations they want you to use.
|
|
4
|
-
|
|
5
|
-
## Parameters
|
|
6
|
-
- `definitionId` (optional): Filter instances by a specific integration definition ID. Use this to get only instances of a particular integration type.
|
|
7
|
-
- `limit` (optional): Maximum number of instances to return (between 1 and 1000).
|
|
8
|
-
|
|
9
|
-
## Example Usage
|
|
10
|
-
Get all integration instances:
|
|
11
|
-
```json
|
|
12
|
-
{}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Get the first 10 integration instances:
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"limit": 10
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Get all instances of a specific integration type:
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"definitionId": "integration-definition-id-here"
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Get the first 5 instances of a specific integration type:
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"definitionId": "integration-definition-id-here",
|
|
33
|
-
"limit": 5
|
|
34
|
-
}
|
|
35
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# List Alerts Tool
|
|
2
|
-
|
|
3
|
-
List all currently active alerts in your JupiterOne account. This tool returns a list of active alert instances, including their IDs, names, descriptions, levels, statuses, timestamps, and related rule information. You can optionally specify a limit to restrict the number of alerts returned. If a user is looking for configuration behind an alert, then list out the rules or get the details of the rule associated with an alert. If they are looking for alert data or then use this tool rather than listing rules.
|
|
4
|
-
|
|
5
|
-
## Parameters
|
|
6
|
-
- `limit` (optional): Maximum number of alerts to return (between 1 and 1000).
|
|
7
|
-
|
|
8
|
-
## Example Usage
|
|
9
|
-
Request the first 5 active alerts:
|
|
10
|
-
```json
|
|
11
|
-
{
|
|
12
|
-
"limit": 5
|
|
13
|
-
}
|
|
14
|
-
```
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# List Rules Tool
|
|
2
|
-
|
|
3
|
-
List rules in your JupiterOne account using cursor pagination. This tool returns a page of rule instances, including their IDs, names, descriptions, versions, polling intervals, and other metadata. Use the cursor parameter to navigate through pages of results. This does not get alerts, but rather the configuration behind what may generate an alert, or other workflow action.
|
|
4
|
-
|
|
5
|
-
## Parameters
|
|
6
|
-
- `limit` (optional): Maximum number of rules to return per page (between 1 and 1000). Defaults to 100 if not specified.
|
|
7
|
-
- `cursor` (optional): Pagination cursor to get the next page of results. Use the `endCursor` from a previous response's `pageInfo`. Omit this parameter to get the first page.
|
|
8
|
-
|
|
9
|
-
## Example Usage
|
|
10
|
-
Get the first page of rules (default page size):
|
|
11
|
-
```json
|
|
12
|
-
{}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Get the first page with specific limit:
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"limit": 50
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Get the next page using a cursor:
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"limit": 50,
|
|
26
|
-
"cursor": "cursor_value_from_previous_response"
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Response Format
|
|
31
|
-
All responses include pagination information:
|
|
32
|
-
```json
|
|
33
|
-
{
|
|
34
|
-
"returned": 50,
|
|
35
|
-
"rules": [...],
|
|
36
|
-
"pageInfo": {
|
|
37
|
-
"hasNextPage": true,
|
|
38
|
-
"endCursor": "cursor_for_next_page"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
- `returned`: Number of rules in this page
|
|
44
|
-
- `rules`: Array of rule objects
|
|
45
|
-
- `pageInfo.hasNextPage`: Whether there are more pages available
|
|
46
|
-
- `pageInfo.endCursor`: Cursor to use for the next page (if `hasNextPage` is true)
|
|
47
|
-
|
|
48
|
-
## Pagination Pattern
|
|
49
|
-
To get all rules across multiple pages:
|
|
50
|
-
1. Call with no cursor to get the first page
|
|
51
|
-
2. Check if `pageInfo.hasNextPage` is true
|
|
52
|
-
3. If true, call again with `cursor` set to `pageInfo.endCursor`
|
|
53
|
-
4. Repeat until `hasNextPage` is false
|