@jupiterone/jupiterone-mcp 2.6.2 → 2.8.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 +124 -72
- package/dist/client/graphql/mutations.d.ts +17 -0
- package/dist/client/graphql/mutations.d.ts.map +1 -1
- package/dist/client/graphql/mutations.js +143 -1
- package/dist/client/graphql/mutations.js.map +1 -1
- package/dist/client/graphql/queries.d.ts +28 -3
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +104 -4
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +31 -0
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +63 -0
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/compliance-service.d.ts +48 -1
- package/dist/client/services/compliance-service.d.ts.map +1 -1
- package/dist/client/services/compliance-service.js +292 -0
- package/dist/client/services/compliance-service.js.map +1 -1
- package/dist/client/services/j1ql-service.d.ts +10 -2
- package/dist/client/services/j1ql-service.d.ts.map +1 -1
- package/dist/client/services/j1ql-service.js +11 -3
- package/dist/client/services/j1ql-service.js.map +1 -1
- package/dist/client/services/rule-service.d.ts +14 -2
- package/dist/client/services/rule-service.d.ts.map +1 -1
- package/dist/client/services/rule-service.js +24 -5
- package/dist/client/services/rule-service.js.map +1 -1
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +843 -49
- 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 +39 -2
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/skills.d.ts +25 -0
- package/dist/server/skills.d.ts.map +1 -0
- package/dist/server/skills.js +115 -0
- package/dist/server/skills.js.map +1 -0
- package/dist/server/tools/compliance/attestations.d.ts.map +1 -1
- package/dist/server/tools/compliance/attestations.js +20 -37
- package/dist/server/tools/compliance/attestations.js.map +1 -1
- package/dist/server/tools/compliance/authoring.d.ts +3 -0
- package/dist/server/tools/compliance/authoring.d.ts.map +1 -0
- package/dist/server/tools/compliance/authoring.js +773 -0
- package/dist/server/tools/compliance/authoring.js.map +1 -0
- package/dist/server/tools/compliance/controls.d.ts.map +1 -1
- package/dist/server/tools/compliance/controls.js +193 -19
- package/dist/server/tools/compliance/controls.js.map +1 -1
- package/dist/server/tools/compliance/exemptions.d.ts +3 -0
- package/dist/server/tools/compliance/exemptions.d.ts.map +1 -0
- package/dist/server/tools/compliance/exemptions.js +287 -0
- package/dist/server/tools/compliance/exemptions.js.map +1 -0
- package/dist/server/tools/compliance/framework.d.ts +3 -0
- package/dist/server/tools/compliance/framework.d.ts.map +1 -0
- package/dist/server/tools/compliance/framework.js +445 -0
- package/dist/server/tools/compliance/framework.js.map +1 -0
- package/dist/server/tools/compliance/graph.d.ts +56 -0
- package/dist/server/tools/compliance/graph.d.ts.map +1 -0
- package/dist/server/tools/compliance/graph.js +115 -0
- package/dist/server/tools/compliance/graph.js.map +1 -0
- package/dist/server/tools/compliance/index.d.ts +2 -16
- package/dist/server/tools/compliance/index.d.ts.map +1 -1
- package/dist/server/tools/compliance/index.js +45 -15
- package/dist/server/tools/compliance/index.js.map +1 -1
- package/dist/server/tools/compliance/requirements.d.ts +3 -0
- package/dist/server/tools/compliance/requirements.d.ts.map +1 -0
- package/dist/server/tools/compliance/requirements.js +243 -0
- package/dist/server/tools/compliance/requirements.js.map +1 -0
- package/dist/server/tools/compliance/schemas.d.ts +409 -8
- package/dist/server/tools/compliance/schemas.d.ts.map +1 -1
- package/dist/server/tools/compliance/schemas.js +337 -7
- package/dist/server/tools/compliance/schemas.js.map +1 -1
- package/dist/server/tools/compliance/shared.d.ts +103 -1
- package/dist/server/tools/compliance/shared.d.ts.map +1 -1
- package/dist/server/tools/compliance/shared.js +235 -1
- package/dist/server/tools/compliance/shared.js.map +1 -1
- package/dist/server/tools/compliance/summary.d.ts +2 -8
- package/dist/server/tools/compliance/summary.d.ts.map +1 -1
- package/dist/server/tools/compliance/summary.js +149 -87
- package/dist/server/tools/compliance/summary.js.map +1 -1
- package/dist/server/tools/compliance/tests.d.ts +3 -0
- package/dist/server/tools/compliance/tests.d.ts.map +1 -0
- package/dist/server/tools/compliance/tests.js +463 -0
- package/dist/server/tools/compliance/tests.js.map +1 -0
- package/dist/server/tools/compliance/transitions.d.ts +6 -0
- package/dist/server/tools/compliance/transitions.d.ts.map +1 -0
- package/dist/server/tools/compliance/transitions.js +659 -0
- package/dist/server/tools/compliance/transitions.js.map +1 -0
- package/dist/server/tools/integrations.d.ts.map +1 -1
- package/dist/server/tools/integrations.js +43 -49
- package/dist/server/tools/integrations.js.map +1 -1
- package/dist/server/tools/reference.d.ts +1 -1
- package/dist/server/tools/reference.d.ts.map +1 -1
- package/dist/server/tools/reference.js +2 -0
- package/dist/server/tools/reference.js.map +1 -1
- package/dist/server/tools/result.d.ts +3 -2
- package/dist/server/tools/result.d.ts.map +1 -1
- package/dist/server/tools/result.js +3 -2
- package/dist/server/tools/result.js.map +1 -1
- package/dist/server/tools/rule-preview-checks.d.ts +95 -0
- package/dist/server/tools/rule-preview-checks.d.ts.map +1 -0
- package/dist/server/tools/rule-preview-checks.js +380 -0
- package/dist/server/tools/rule-preview-checks.js.map +1 -0
- package/dist/server/tools/rule-preview.d.ts +105 -0
- package/dist/server/tools/rule-preview.d.ts.map +1 -0
- package/dist/server/tools/rule-preview.js +507 -0
- package/dist/server/tools/rule-preview.js.map +1 -0
- package/dist/server/tools/rules.d.ts +1 -1
- package/dist/server/tools/rules.d.ts.map +1 -1
- package/dist/server/tools/rules.js +264 -51
- package/dist/server/tools/rules.js.map +1 -1
- package/dist/server/tools/types.d.ts +2 -0
- package/dist/server/tools/types.d.ts.map +1 -1
- package/dist/server/tools/types.js.map +1 -1
- package/dist/server/tools/usage.d.ts +7 -8
- package/dist/server/tools/usage.d.ts.map +1 -1
- package/dist/server/tools/usage.js +239 -5
- package/dist/server/tools/usage.js.map +1 -1
- package/dist/server/tools/value-probe.d.ts.map +1 -1
- package/dist/server/tools/value-probe.js +33 -9
- package/dist/server/tools/value-probe.js.map +1 -1
- package/dist/types/jupiterone.d.ts +213 -5
- package/dist/types/jupiterone.d.ts.map +1 -1
- package/dist/utils/j1ql-validator.d.ts.map +1 -1
- package/dist/utils/j1ql-validator.js +129 -1
- package/dist/utils/j1ql-validator.js.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ Then add this configuration to your Claude Desktop config file:
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
**Note**: You may need to adjust the paths in Option 2 based on your Node.js installation:
|
|
65
|
+
|
|
65
66
|
- For Homebrew Node.js: `/usr/local/bin/node` and `/usr/local/bin/jupiterone-mcp`
|
|
66
67
|
- For nvm: `~/.nvm/versions/node/v[version]/bin/node` and `~/.nvm/versions/node/v[version]/bin/jupiterone-mcp`
|
|
67
68
|
|
|
@@ -85,35 +86,40 @@ Replace the placeholder values with your actual JupiterOne credentials:
|
|
|
85
86
|
### Getting Your JupiterOne Credentials
|
|
86
87
|
|
|
87
88
|
1. **API Key**:
|
|
89
|
+
|
|
88
90
|
- Log into your JupiterOne account
|
|
89
91
|
- Go to Settings → API Keys
|
|
90
92
|
- Create a new API key or use an existing one
|
|
91
93
|
|
|
92
94
|
2. **Account ID**:
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
- This can be retrieved by either of the following:
|
|
96
|
+
- Navigating to `https://j1dev.apps.us.jupiterone.io/settings/account-management`
|
|
97
|
+
- Run the following query in your JupiterOne account: `find jupiterone_account as x return x.accountId`
|
|
96
98
|
|
|
97
99
|
## Features
|
|
98
100
|
|
|
99
101
|
### Rules Management
|
|
102
|
+
|
|
100
103
|
- **list-rules** - List all rules with optional limit parameter
|
|
101
104
|
- **get-rule-details** - Get detailed information about a specific rule by ID
|
|
102
105
|
- **create-inline-question-rule** - Create new inline question-based rules with operations and actions
|
|
103
106
|
- **update-inline-question-rule** - Update existing inline question rule instances
|
|
107
|
+
- **preview-rule-actions** - Render what a saved or draft rule's actions would send (Slack message with its envelope, Jira ticket, email, webhook body) against a sample of its current query results or fixture rows, and flag what would fail or mislead: the Slack body cap, a missing description, reads that found nothing, malformed recipients. Sends and saves nothing
|
|
104
108
|
- **evaluate-rule** - Trigger on-demand evaluation of a specific rule
|
|
105
109
|
- **delete-rule** - Delete a rule (destructive; does not dismiss alerts it already raised)
|
|
106
110
|
|
|
107
111
|
### Rule Evaluations
|
|
112
|
+
|
|
108
113
|
- **list-rule-evaluations** - Get historical evaluation data for a rule with optional time filtering
|
|
109
114
|
- **get-rule-evaluation-details** - Get detailed evaluation information including query, condition, and action results
|
|
110
|
-
- **get-
|
|
111
|
-
- **get-rule-evaluation-query-results** - Get the actual query results from a rule evaluation
|
|
115
|
+
- **get-rule-evaluation-query-results** - The entities a rule evaluation matched, or (`format: "downloadUrl"`) a signed link to download the whole set
|
|
112
116
|
|
|
113
117
|
### Alert Monitoring
|
|
118
|
+
|
|
114
119
|
- **get-active-alerts** - Get all currently active alerts with optional limit parameter
|
|
115
120
|
|
|
116
121
|
### Dashboard Management
|
|
122
|
+
|
|
117
123
|
- **get-dashboards** - List all dashboards in your account
|
|
118
124
|
- **create-dashboard** - Create new dashboards
|
|
119
125
|
- **get-dashboard-details** - Get detailed dashboard information including widgets and layouts
|
|
@@ -124,25 +130,29 @@ Replace the placeholder values with your actual JupiterOne credentials:
|
|
|
124
130
|
- **delete-dashboard** - Delete a dashboard
|
|
125
131
|
|
|
126
132
|
### Integration Management
|
|
133
|
+
|
|
127
134
|
- **get-integration-definitions** - List available integration definitions with optional configuration details
|
|
128
135
|
- **get-integration-instances** - Get integration instances with optional filtering by definition ID
|
|
129
|
-
- **get-integration-jobs** - List integration jobs with optional filtering by status, instance, or definition
|
|
130
|
-
- **get-integration-job** - Get details for a specific integration job
|
|
136
|
+
- **get-integration-jobs** - List integration jobs with optional filtering by status, instance, or definition, or read one job by its id
|
|
131
137
|
- **get-integration-events** - Get events for a specific integration job with pagination support
|
|
132
138
|
|
|
133
139
|
### Account Management
|
|
140
|
+
|
|
134
141
|
- **test-connection** - Test connection to JupiterOne API and get account information
|
|
135
142
|
- **list-accounts** - The accounts the caller can access (multi-tenant connections only)
|
|
136
143
|
|
|
137
144
|
### Query Execution
|
|
145
|
+
|
|
138
146
|
- **execute-j1ql-query** - Execute a J1QL query, paged by cursor; long queries return a handle
|
|
139
147
|
- **get-query-results** - Collect a query still running from its handle
|
|
140
148
|
- **list-entity-types** - The entity classes and types the account holds, with counts
|
|
141
149
|
|
|
142
150
|
### Reference
|
|
143
|
-
|
|
151
|
+
|
|
152
|
+
- **get-reference** - One reference manual on demand: `j1ql-language`, `j1ql-discovery`, `widget-types`, `widget-settings`, `dashboard-layout`, `rule-authoring`, `rule-templates`, `compliance-model`, `compliance-fields`, `framework-authoring`. Tool descriptions carry only each tool's contract and point here for the rest.
|
|
144
153
|
|
|
145
154
|
### Threat Intelligence (Emerging Exposures)
|
|
155
|
+
|
|
146
156
|
- **get-threat** - Decision-grade threat brief for a CVE (compact by default; full with `detail: true`)
|
|
147
157
|
- **get-threat-trending** - The trending/recently-escalated threats region (cached)
|
|
148
158
|
- **check-threat-exposure** - Whether this account's own graph is exposed to given CVEs (scanner-confirmed match)
|
|
@@ -150,99 +160,141 @@ Replace the placeholder values with your actual JupiterOne credentials:
|
|
|
150
160
|
These tools require the account's **VulnerabilityManagement** entitlement and vulnerability **read** permission. One guided prompt is also exposed: **Check trending threats** (`check-trending-threats`).
|
|
151
161
|
|
|
152
162
|
### Compliance (CCM)
|
|
153
|
-
|
|
154
|
-
- **
|
|
155
|
-
- **
|
|
163
|
+
|
|
164
|
+
- **get-compliance-summary** - Framework scorecards (health percentage, passing and failing requirements and controls), a chosen set of frameworks (`frameworkIds`), one framework's sections, failing requirements and full requirement list (`includeRequirements`), imports in flight, and attestations about to expire
|
|
165
|
+
- **list-controls** - Controls filtered by status, state, framework, organizational unit (id or name), owner, attestation and more, with test counts, why each failing control fails, framework names, and the controls whose test names match a search
|
|
166
|
+
- **get-control** - One control by id, identifier or name: why it passes or fails, its tests with their latest evaluation (and, on a draft, how many ran and failed), and its requirements and attestations
|
|
156
167
|
- **create-attestation** - Attest a LIVE control with a subject and expiry (returns the existing attestation rather than a duplicate)
|
|
157
168
|
- **update-attestation** - Change or renew an attestation
|
|
158
169
|
- **revoke-attestation** - Revoke an attestation (permanent)
|
|
159
170
|
|
|
160
|
-
|
|
171
|
+
Framework authoring (2.7.0): an agent builds a customer's compliance program incrementally, everything landing DRAFT for review, and promotes it explicitly.
|
|
172
|
+
|
|
173
|
+
- **check-compliance-coverage** - Whether a standard is loaded, importable from JupiterOne's library or absent, and which existing controls already address a topic
|
|
174
|
+
- **import-framework** - Queue a prebuilt library framework (CIS, SOC 2, ISO 27001, NIST, PCI DSS, DORA) by `source` and `sourceId`
|
|
175
|
+
- **create-framework** - An empty framework for the customer's own program
|
|
176
|
+
- **create-requirements** - A batch of requirements (1–50) under a framework, deduped against the ones it has
|
|
177
|
+
- **create-controls** - A batch of controls (1–25) under a requirement, in the customer's words, deduped by name
|
|
178
|
+
- **link-controls** - Attach existing controls (JupiterOne-managed or the customer's) to a requirement instead of duplicating them
|
|
179
|
+
- **update-control** - Change a control's fields and the requirements it serves (`requirementIds` set, add or remove)
|
|
180
|
+
- **create-control-test** / **update-control-test** / **delete-control-test** - One J1QL test per call, parsed and run before it is saved, with `resultsAre` `GOOD` or `BAD`
|
|
181
|
+
- **transition-controls** - Move controls between DRAFT, REVIEW, LIVE and RETIRED in a batch, by id or for a whole framework, with every hop explained
|
|
182
|
+
- **evaluate-controls** - Run controls' tests now (how a draft proves its tests before promotion)
|
|
183
|
+
- **delete-control** - Delete a control created by mistake while authoring
|
|
184
|
+
- **create-exemptions** / **revoke-exemptions** - Exempt specific assets from a control test with a justification and optional expiry, and withdraw exemptions by decision or entity
|
|
185
|
+
|
|
186
|
+
Two guided prompts walk through the flow: **Author a compliance framework** (`author-compliance-framework`) and **Promote a compliance framework** (`promote-compliance-framework`); the same text is served as Skills over MCP to clients that support them.
|
|
187
|
+
|
|
188
|
+
These tools require the account's **Compliance (CCM)** entitlement and control **read** permission. Writes need **edit** permission on the control's resource group (framework creates need framework create permission), and listing attestations account-wide needs CCM **read-admin**.
|
|
161
189
|
|
|
162
190
|
## Available Tools
|
|
163
191
|
|
|
164
192
|
### Rules Management
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
|
168
|
-
| `
|
|
169
|
-
| `
|
|
170
|
-
| `
|
|
171
|
-
| `
|
|
172
|
-
| `
|
|
193
|
+
|
|
194
|
+
| Tool | Description | Parameters |
|
|
195
|
+
| ----------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
196
|
+
| `list-rules` | List all rules in the account | `limit` (optional): Number of rules to return (1-1000) |
|
|
197
|
+
| `get-rule-details` | Get detailed rule information | `ruleId`: ID of the rule |
|
|
198
|
+
| `create-inline-question-rule` | Create new inline question rule | `name`, `description`, `pollingInterval`, `outputs`, `specVersion` (use 1), `question` (`queries[]`), `operations`, `labels`; optional `notifyOnFailure`, `triggerActionsOnNewEntitiesOnly`, `ignorePreviousResults`, `templates`, `tags` (legacy) |
|
|
199
|
+
| `update-inline-question-rule` | Update existing rule | `id`, `name`, `description`, `notifyOnFailure`, `triggerActionsOnNewEntitiesOnly`, `ignorePreviousResults`, `pollingInterval`, `outputs`, `specVersion`, `version`, `tags`, `templates`, `labels`, `resourceGroupId`, `remediationSteps`, `question`, `operations` |
|
|
200
|
+
| `evaluate-rule` | Trigger rule evaluation | `ruleId`: ID of the rule to evaluate |
|
|
201
|
+
| `preview-rule-actions` | Render actions, sending nothing | `ruleId` for a saved rule, or `question`, `operations` and optional `templates` for a draft |
|
|
202
|
+
| `delete-rule` | Delete a rule permanently | `ruleId`: ID of the rule to delete |
|
|
173
203
|
|
|
174
204
|
### Rule Evaluations
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
|
178
|
-
| `
|
|
179
|
-
| `get-
|
|
180
|
-
| `get-rule-evaluation-query-results` |
|
|
205
|
+
|
|
206
|
+
| Tool | Description | Parameters |
|
|
207
|
+
| ----------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
208
|
+
| `list-rule-evaluations` | Get rule evaluation history | `ruleId`, `beginTimestamp` (optional), `endTimestamp` (optional), `limit` (optional), `tag` (optional) |
|
|
209
|
+
| `get-rule-evaluation-details` | Get detailed evaluation results | `ruleId`, `timestamp` |
|
|
210
|
+
| `get-rule-evaluation-query-results` | Query results from an evaluation, or a download link for the whole set | `rawDataKey`, `limit` (optional, 1–250), `format` (optional: `rows`, `downloadUrl`) |
|
|
181
211
|
|
|
182
212
|
### Alert Monitoring
|
|
183
|
-
|
|
184
|
-
|
|
213
|
+
|
|
214
|
+
| Tool | Description | Parameters |
|
|
215
|
+
| ------------------- | ------------------ | ------------------------------------------------------- |
|
|
185
216
|
| `get-active-alerts` | List active alerts | `limit` (optional): Number of alerts to return (1-1000) |
|
|
186
217
|
|
|
187
218
|
### Dashboard Management
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
|
191
|
-
| `
|
|
192
|
-
| `
|
|
193
|
-
| `
|
|
194
|
-
| `
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `delete-dashboard` |
|
|
219
|
+
|
|
220
|
+
| Tool | Description | Parameters |
|
|
221
|
+
| ------------------------- | ------------------------------ | ----------------------------------------------------- |
|
|
222
|
+
| `get-dashboards` | List all dashboards | None |
|
|
223
|
+
| `create-dashboard` | Create new dashboard | `name`, `type` |
|
|
224
|
+
| `get-dashboard-details` | Get dashboard details | `dashboardId` |
|
|
225
|
+
| `update-dashboard` | Arrange a dashboard's widgets | `dashboardId`; exactly one of `autoLayout`, `layouts` |
|
|
226
|
+
| `create-dashboard-widget` | Create a widget on a dashboard | `dashboardId`, `input` |
|
|
227
|
+
| `update-dashboard-widget` | Replace a widget's definition | `dashboardId`, `widgetId`, `input` |
|
|
228
|
+
| `delete-dashboard-widget` | Remove one widget | `dashboardId`, `widgetId` |
|
|
229
|
+
| `delete-dashboard` | Delete a dashboard | `dashboardId` |
|
|
198
230
|
|
|
199
231
|
### Integration Management
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
|
203
|
-
| `get-integration-
|
|
204
|
-
| `get-integration-
|
|
205
|
-
| `get-integration-
|
|
206
|
-
| `get-integration-events`
|
|
232
|
+
|
|
233
|
+
| Tool | Description | Parameters |
|
|
234
|
+
| ----------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
235
|
+
| `get-integration-definitions` | List integration definitions | `includeConfig` (optional): Include configuration fields |
|
|
236
|
+
| `get-integration-instances` | Get integration instances | `definitionId` (optional), `limit` (optional) |
|
|
237
|
+
| `get-integration-jobs` | List integration jobs, or read one by id | `integrationJobId` (optional, with `integrationInstanceId`), `status` (optional), `integrationInstanceId` (optional), `integrationDefinitionId` (optional), `integrationInstanceIds` (optional), `size` (optional), `cursor` (optional) |
|
|
238
|
+
| `get-integration-events` | Get events for a specific integration job | `jobId`, `integrationInstanceId`, `cursor` (optional), `size` (optional) |
|
|
207
239
|
|
|
208
240
|
### Account Management
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
| `
|
|
241
|
+
|
|
242
|
+
| Tool | Description | Parameters |
|
|
243
|
+
| ----------------- | ------------------------------------------------------------------ | ---------- |
|
|
244
|
+
| `test-connection` | Test connection to JupiterOne API and get account information | None |
|
|
245
|
+
| `list-accounts` | The accounts the caller can access (multi-tenant connections only) | None |
|
|
213
246
|
|
|
214
247
|
### Query Execution
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
| `
|
|
219
|
-
| `
|
|
248
|
+
|
|
249
|
+
| Tool | Description | Parameters |
|
|
250
|
+
| -------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
251
|
+
| `execute-j1ql-query` | Execute a J1QL query | `query`, `variables` (optional), `cursor` (optional), `includeDeleted` (optional), `flags` (optional), `scopeFilters` (optional) |
|
|
252
|
+
| `get-query-results` | Collect a query still running from its handle | `resultsUrl`, `waitSeconds` (optional) |
|
|
253
|
+
| `list-entity-types` | Entity classes and types with counts | None |
|
|
220
254
|
|
|
221
255
|
### Reference
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
|
256
|
+
|
|
257
|
+
| Tool | Description | Parameters |
|
|
258
|
+
| --------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| `get-reference` | One reference manual on demand | `topic`: `j1ql-language`, `j1ql-discovery`, `widget-types`, `widget-settings`, `dashboard-layout`, `rule-authoring`, `rule-templates`, `compliance-model`, `compliance-fields`, `framework-authoring` |
|
|
225
260
|
|
|
226
261
|
### Threat Intelligence (Emerging Exposures)
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
|
230
|
-
| `get-threat
|
|
231
|
-
| `
|
|
262
|
+
|
|
263
|
+
| Tool | Description | Parameters |
|
|
264
|
+
| ----------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
265
|
+
| `get-threat` | Decision-grade threat brief for a CVE | `cveId`; `assetExposure` (optional: `public`/`internal`); `detail` (optional: full brief) |
|
|
266
|
+
| `get-threat-trending` | Trending/recently-escalated threats (cached ~30 min) | `limit` (optional) |
|
|
267
|
+
| `check-threat-exposure` | This account's own exposure per CVE (scanner-confirmed) | `cveIds` (1–25) |
|
|
232
268
|
|
|
233
269
|
Requires the account's VulnerabilityManagement entitlement and vulnerability read permission. `check-threat-exposure` returning `scannerConfirmedAssetCount: 0` means "none found," not "not affected."
|
|
234
270
|
|
|
235
271
|
### Compliance (CCM)
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
|
239
|
-
| `
|
|
240
|
-
| `
|
|
241
|
-
| `
|
|
242
|
-
| `
|
|
243
|
-
| `
|
|
244
|
-
|
|
245
|
-
|
|
272
|
+
|
|
273
|
+
| Tool | Description | Parameters |
|
|
274
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
|
+
| `get-compliance-summary` | Framework scorecards, one framework's failing requirements and requirement list, imports in flight, expiring attestations | At most one of `frameworkId`, `frameworkName`, `frameworkIds` (1–25); `includeRequirements` (optional, with a drill); `attestationsExpiringWithinDays` (optional, 1–365, default 30) |
|
|
276
|
+
| `list-controls` | Filtered, paginated list of controls, with `failReason` per failing row and `testNameMatches` for a search | All optional: `search`, `status`, `states`, `effectiveness`, `hasValidAttestation`, `owner`, `frameworkId`, `catalogs`, `mitreTechniques`, `source`, `orgUnit`, `sort`, `limit`, `cursor`, `includeDeleted` |
|
|
277
|
+
| `get-control` | One control with its status explanation, tests, latest evaluations, requirements and attestations | One of `controlId`, `identifier`, `controlName`; `includeDeleted` (optional) |
|
|
278
|
+
| `create-attestation` | Attest a LIVE control | `controlId`, `subject`, `expiresOn` (ISO 8601 or epoch ms); `description`, `owner`, `documentLink` (optional) |
|
|
279
|
+
| `update-attestation` | Change or renew an attestation | `attestationId`; at least one of `subject`, `expiresOn`, `description`, `owner`, `documentLink` |
|
|
280
|
+
| `revoke-attestation` | Revoke an attestation (permanent) | `attestationId` |
|
|
281
|
+
| `check-compliance-coverage` | Is a standard loaded, importable or absent; which controls already cover a topic | At least one of `framework`, `topic` |
|
|
282
|
+
| `import-framework` | Queue a prebuilt library framework import | `source` (`J1`, `UCF`), `sourceId`; `resourceGroupId` (optional) |
|
|
283
|
+
| `create-framework` | Create an empty framework | `title`, `description`; `owner`, `resourceGroupId` (optional) |
|
|
284
|
+
| `create-requirements` | Add requirements to a framework in a batch | `frameworkId`, `requirements[]` (1–50: `title`; `description`, `identifier`, `section`, `priority` optional) |
|
|
285
|
+
| `create-controls` | Create controls under a requirement in a batch | `requirementId`, `controls[]` (1–25: `name`; `description`, `identifier`, `owner`, `remediation`, `exceptionProcess`, `mitreTechnique`, `catalog`, `resourceGroupId` optional) |
|
|
286
|
+
| `link-controls` | Attach existing controls to a requirement | `requirementId`, `controlIds[]` (1–25) |
|
|
287
|
+
| `update-control` | Change a control's fields or the requirements it serves | `controlId`; at least one of `controlName`, `description`, `identifier`, `catalog`, `owner`, `remediation`, `exceptionProcess`, `mitreTechnique`, `resourceGroupId`, `requirementIds` (`set`, `add` or `remove`) |
|
|
288
|
+
| `create-control-test` | Add one J1QL test to a control, parsed and run first | `controlId`, `testName`, `query`, `resultsAre` (`GOOD`, `BAD`); `description` (optional) |
|
|
289
|
+
| `update-control-test` | Change a test's query, verdict, name or description | `controlTestId`; at least one of `testName`, `query`, `resultsAre`, `description` |
|
|
290
|
+
| `delete-control-test` | Remove a test from a control | `controlTestId` |
|
|
291
|
+
| `transition-controls` | Move controls between lifecycle states in a batch | Exactly one of `controlIds[]` (1–25), `frameworkId` (with `fromStates`, default DRAFT and REVIEW); `targetState`; `note` (optional) |
|
|
292
|
+
| `evaluate-controls` | Run controls' tests now | `controlIds[]` (1–25) |
|
|
293
|
+
| `delete-control` | Delete a control created by mistake | `controlId` |
|
|
294
|
+
| `create-exemptions` | Exempt assets from a control test | `controlTestId`, `entities[]` (1–50), `exemptionReason`, `justification`; `expiresOn` (optional) |
|
|
295
|
+
| `revoke-exemptions` | Withdraw exemptions on a control test | `controlTestId`; at least one of `groupId`, `entityIds[]` (1–50) |
|
|
296
|
+
|
|
297
|
+
Requires the account's Compliance (CCM) entitlement and control read permission; writes need edit permission on the control's resource group, and framework creates need framework create permission. `expiringAttestations: 'unavailable'` means the caller cannot list attestations account-wide (CCM read-admin), not that none are expiring.
|
|
246
298
|
|
|
247
299
|
## Deployment
|
|
248
300
|
|
|
@@ -2,6 +2,7 @@ export declare const CREATE_INLINE_QUESTION_RULE = "\n mutation createInlineQue
|
|
|
2
2
|
export declare const UPDATE_INLINE_QUESTION_RULE = "\n mutation UpdateInlineQuestionRuleInstance(\n $instance: UpdateInlineQuestionRuleInstanceInput!\n ) {\n updateInlineQuestionRuleInstance(instance: $instance) {\n id\n resourceGroupId\n accountId\n name\n description\n version\n lastEvaluationStartOn\n lastEvaluationEndOn\n evaluationStep\n specVersion\n notifyOnFailure\n triggerActionsOnNewEntitiesOnly\n ignorePreviousResults\n pollingInterval\n templates\n outputs\n labels {\n labelName\n labelValue\n __typename\n }\n question {\n queries {\n query\n name\n includeDeleted\n __typename\n }\n __typename\n }\n questionId\n latest\n deleted\n type\n operations {\n when\n actions\n __typename\n }\n latestAlertId\n latestAlertIsActive\n state {\n actions\n __typename\n }\n tags\n remediationSteps\n __typename\n }\n }\n";
|
|
3
3
|
export declare const EVALUATE_RULE = "\n mutation evaluateRuleInstance($id: ID!) {\n evaluateRuleInstance(id: $id) {\n id\n __typename\n }\n }\n";
|
|
4
4
|
export declare const DELETE_RULE = "\n mutation DeleteRuleInstance($id: ID!) {\n deleteRuleInstance(id: $id) {\n id\n __typename\n }\n }\n";
|
|
5
|
+
export declare const RENDER_RULE_ACTION = "\n mutation ExperimentalRuleActionRender(\n $action: JSON!\n $queryData: JSON!\n $templates: JSON!\n ) {\n experimentalRuleActionRender(action: $action, queryData: $queryData, templates: $templates) {\n action\n messages\n }\n }\n";
|
|
5
6
|
export declare const CREATE_DASHBOARD = "\n mutation CreateDashboard($input: CreateInsightsDashboardInput!) {\n createDashboard(input: $input) {\n id\n __typename\n }\n }\n";
|
|
6
7
|
export declare const CREATE_DASHBOARD_WIDGET = "\n mutation CreateWidget($dashboardId: String!, $input: CreateInsightsWidgetInput!) {\n createWidget(dashboardId: $dashboardId, input: $input) {\n ...InsightsWidget\n __typename\n }\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";
|
|
7
8
|
export declare const DELETE_DASHBOARD_WIDGET = "\n mutation DeleteWidget($dashboardId: String!, $widgetId: String!) {\n deleteWidget(dashboardId: $dashboardId, widgetId: $widgetId) {\n success\n }\n }\n";
|
|
@@ -11,4 +12,20 @@ export declare const PATCH_DASHBOARD = "\n mutation PatchDashboard($input: Patc
|
|
|
11
12
|
export declare const CREATE_ATTESTATION = "\n mutation CreateAttestation($input: CreateAttestationInput!) {\n createAttestation(input: $input) { \n id\n subject\n description\n expiresOn\n owner\n author\n documentLink\n revoked\n createdOn\n controlId\n state\n }\n }\n";
|
|
12
13
|
export declare const UPDATE_ATTESTATION = "\n mutation UpdateAttestation($input: UpdateAttestationInput!) {\n updateAttestation(input: $input) { \n id\n subject\n description\n expiresOn\n owner\n author\n documentLink\n revoked\n createdOn\n controlId\n state\n }\n }\n";
|
|
13
14
|
export declare const REVOKE_ATTESTATION = "\n mutation RevokeAttestation($input: RevokeAttestationInput!) {\n revokeAttestation(input: $input) { \n id\n subject\n description\n expiresOn\n owner\n author\n documentLink\n revoked\n createdOn\n controlId\n state\n }\n }\n";
|
|
15
|
+
/** Fire-and-forget: the backend runs the import as a job (`inProgressImportJobs`). */
|
|
16
|
+
export declare const IMPORT_FRAMEWORK = "\n mutation ImportFramework($input: ImportFrameworkInput!) {\n importFramework(input: $input) { success }\n }\n";
|
|
17
|
+
export declare const CREATE_FRAMEWORK = "\n mutation CreateFramework($input: CreateFrameworkInput!) {\n createFramework(input: $input) {\n id\n name\n source\n sourceId\n owner\n description\n createdOn\n }\n }\n";
|
|
18
|
+
export declare const CREATE_REQUIREMENT = "\n mutation CreateRequirement($input: CreateRequirementInput!) {\n createRequirement(input: $input) {\n id\n identifier\n title\n section\n priority\n frameworkIds\n }\n }\n";
|
|
19
|
+
export declare const CREATE_CONTROL = "\n mutation CreateControl($input: CreateControlInput!) {\n createControl(input: $input) { \n id\n name\n state\n status\n identifier\n catalog\n owner\n frameworkIds\n resourceGroupId\n lastEvaluatedOn\n deleted\n }\n }\n";
|
|
20
|
+
export declare const UPDATE_CONTROL = "\n mutation UpdateControl($input: UpdateControlInput!) {\n updateControl(input: $input) { \n id\n name\n state\n status\n identifier\n catalog\n owner\n frameworkIds\n resourceGroupId\n lastEvaluatedOn\n deleted\n }\n }\n";
|
|
21
|
+
export declare const TRANSITION_CONTROL_STATE = "\n mutation TransitionControlState($input: TransitionControlStateInput!) {\n transitionControlState(input: $input) { \n id\n name\n state\n status\n identifier\n catalog\n owner\n frameworkIds\n resourceGroupId\n lastEvaluatedOn\n deleted\n }\n }\n";
|
|
22
|
+
export declare const CREATE_CONTROL_TEST = "\n mutation CreateControlTest($input: CreateControlTestInput!) {\n createControlTest(input: $input) { \n id\n name\n description\n controlId\n status\n deleted\n referencedRuleId\n lastEvaluatedOn\n queries { name query resultsAre recordCount status effective }\n }\n }\n";
|
|
23
|
+
export declare const UPDATE_CONTROL_TEST = "\n mutation UpdateControlTest($input: UpdateControlTestInput!) {\n updateControlTest(input: $input) { \n id\n name\n description\n controlId\n status\n deleted\n referencedRuleId\n lastEvaluatedOn\n queries { name query resultsAre recordCount status effective }\n }\n }\n";
|
|
24
|
+
export declare const DELETE_CONTROL_TEST = "\n mutation DeleteControlTest($id: ID!) {\n deleteControlTest(id: $id) { success }\n }\n";
|
|
25
|
+
export declare const DELETE_CONTROL = "\n mutation DeleteControl($input: DeleteControlInput!) {\n deleteControl(input: $input) { success }\n }\n";
|
|
26
|
+
/** Runs every test's rule now, whatever the control's state; a non-LIVE control stays unscored. */
|
|
27
|
+
export declare const EVALUATE_CONTROL = "\n mutation EvaluateControl($id: ID!) {\n evaluateControl(id: $id) { success }\n }\n";
|
|
28
|
+
export declare const CREATE_CONTROL_TEST_EXEMPTIONS = "\n mutation CreateControlTestExemptions($input: CreateControlTestExemptionsInput!) {\n createControlTestExemptions(input: $input) {\n groupId\n exemptions { entityId }\n }\n }\n";
|
|
29
|
+
/** At least one selector; the API refuses revoking a test's whole set. */
|
|
30
|
+
export declare const REVOKE_CONTROL_TEST_EXEMPTIONS = "\n mutation RevokeControlTestExemptions($controlTestId: ID!, $groupId: ID, $entityIds: [ID!]) {\n revokeControlTestExemptions(\n controlTestId: $controlTestId\n groupId: $groupId\n entityIds: $entityIds\n ) {\n revokedCount\n }\n }\n";
|
|
14
31
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/mutations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,ojCA0DvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+iCAuDvC,CAAC;AAEF,eAAO,MAAM,aAAa,iIAOzB,CAAC;AAIF,eAAO,MAAM,WAAW,6HAOvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,0JAO5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,skBA8BnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,4KAMnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,kNAMnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,yIAM5B,CAAC;AAEF,eAAO,MAAM,eAAe,6vDAyG3B,CAAC;AAGF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC;AAGF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/mutations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,ojCA0DvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+iCAuDvC,CAAC;AAEF,eAAO,MAAM,aAAa,iIAOzB,CAAC;AAIF,eAAO,MAAM,WAAW,6HAOvB,CAAC;AAOF,eAAO,MAAM,kBAAkB,uQAW9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,0JAO5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,skBA8BnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,4KAMnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,kNAMnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,yIAM5B,CAAC;AAEF,eAAO,MAAM,eAAe,6vDAyG3B,CAAC;AAGF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC;AAGF,eAAO,MAAM,kBAAkB,wPAI9B,CAAC;AAiCF,sFAAsF;AACtF,eAAO,MAAM,gBAAgB,yHAI5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,2NAY5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,wNAW9B,CAAC;AAEF,eAAO,MAAM,cAAc,kPAI1B,CAAC;AAEF,eAAO,MAAM,cAAc,kPAI1B,CAAC;AAIF,eAAO,MAAM,wBAAwB,6QAIpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kSAI/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,kSAI/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,kGAI/B,CAAC;AAIF,eAAO,MAAM,cAAc,mHAI1B,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,8FAI5B,CAAC;AAEF,eAAO,MAAM,8BAA8B,wMAO1C,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B,6QAU1C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REVOKE_ATTESTATION = exports.UPDATE_ATTESTATION = exports.CREATE_ATTESTATION = exports.PATCH_DASHBOARD = exports.DELETE_DASHBOARD = exports.UPDATE_DASHBOARD_WIDGET = exports.DELETE_DASHBOARD_WIDGET = exports.CREATE_DASHBOARD_WIDGET = exports.CREATE_DASHBOARD = exports.DELETE_RULE = exports.EVALUATE_RULE = exports.UPDATE_INLINE_QUESTION_RULE = exports.CREATE_INLINE_QUESTION_RULE = void 0;
|
|
3
|
+
exports.REVOKE_CONTROL_TEST_EXEMPTIONS = exports.CREATE_CONTROL_TEST_EXEMPTIONS = exports.EVALUATE_CONTROL = exports.DELETE_CONTROL = exports.DELETE_CONTROL_TEST = exports.UPDATE_CONTROL_TEST = exports.CREATE_CONTROL_TEST = exports.TRANSITION_CONTROL_STATE = exports.UPDATE_CONTROL = exports.CREATE_CONTROL = exports.CREATE_REQUIREMENT = exports.CREATE_FRAMEWORK = exports.IMPORT_FRAMEWORK = exports.REVOKE_ATTESTATION = exports.UPDATE_ATTESTATION = exports.CREATE_ATTESTATION = exports.PATCH_DASHBOARD = exports.DELETE_DASHBOARD = exports.UPDATE_DASHBOARD_WIDGET = exports.DELETE_DASHBOARD_WIDGET = exports.CREATE_DASHBOARD_WIDGET = exports.CREATE_DASHBOARD = exports.RENDER_RULE_ACTION = exports.DELETE_RULE = exports.EVALUATE_RULE = exports.UPDATE_INLINE_QUESTION_RULE = exports.CREATE_INLINE_QUESTION_RULE = void 0;
|
|
4
4
|
const queries_js_1 = require("./queries.js");
|
|
5
5
|
exports.CREATE_INLINE_QUESTION_RULE = `
|
|
6
6
|
mutation createInlineQuestionRuleInstance($instance: CreateInlineQuestionRuleInstanceInput!) {
|
|
@@ -135,6 +135,23 @@ exports.DELETE_RULE = `
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
`;
|
|
138
|
+
// Renders one action's `{{...}}` templates against query data the caller supplies and returns the
|
|
139
|
+
// action as it would be sent. No side effects: nothing is posted, filed or tagged, and `param.*`
|
|
140
|
+
// values come back as `[REDACTED PARAMETER]`. The rules editor's action preview (CS-422) uses it.
|
|
141
|
+
// rule-service refuses FOR_EACH_ITEM and JUPITERONE_QUERY with a bare Error, which the gateway
|
|
142
|
+
// masks as "Internal server error" (j1dev, 2026-10-30), so callers send leaf actions only.
|
|
143
|
+
exports.RENDER_RULE_ACTION = `
|
|
144
|
+
mutation ExperimentalRuleActionRender(
|
|
145
|
+
$action: JSON!
|
|
146
|
+
$queryData: JSON!
|
|
147
|
+
$templates: JSON!
|
|
148
|
+
) {
|
|
149
|
+
experimentalRuleActionRender(action: $action, queryData: $queryData, templates: $templates) {
|
|
150
|
+
action
|
|
151
|
+
messages
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`;
|
|
138
155
|
exports.CREATE_DASHBOARD = `
|
|
139
156
|
mutation CreateDashboard($input: CreateInsightsDashboardInput!) {
|
|
140
157
|
createDashboard(input: $input) {
|
|
@@ -319,4 +336,129 @@ exports.REVOKE_ATTESTATION = `
|
|
|
319
336
|
revokeAttestation(input: $input) { ${queries_js_1.ATTESTATION_FIELDS} }
|
|
320
337
|
}
|
|
321
338
|
`;
|
|
339
|
+
// ---------------------------------------------------------------------------------------------
|
|
340
|
+
// CCM authoring writes (core 2.7.0). Every control write returns the same scalars; a control
|
|
341
|
+
// test write returns the test with its one persisted query.
|
|
342
|
+
// ---------------------------------------------------------------------------------------------
|
|
343
|
+
const CONTROL_WRITE_FIELDS = `
|
|
344
|
+
id
|
|
345
|
+
name
|
|
346
|
+
state
|
|
347
|
+
status
|
|
348
|
+
identifier
|
|
349
|
+
catalog
|
|
350
|
+
owner
|
|
351
|
+
frameworkIds
|
|
352
|
+
resourceGroupId
|
|
353
|
+
lastEvaluatedOn
|
|
354
|
+
deleted
|
|
355
|
+
`;
|
|
356
|
+
const CONTROL_TEST_WRITE_FIELDS = `
|
|
357
|
+
id
|
|
358
|
+
name
|
|
359
|
+
description
|
|
360
|
+
controlId
|
|
361
|
+
status
|
|
362
|
+
deleted
|
|
363
|
+
referencedRuleId
|
|
364
|
+
lastEvaluatedOn
|
|
365
|
+
queries { name query resultsAre recordCount status effective }
|
|
366
|
+
`;
|
|
367
|
+
/** Fire-and-forget: the backend runs the import as a job (`inProgressImportJobs`). */
|
|
368
|
+
exports.IMPORT_FRAMEWORK = `
|
|
369
|
+
mutation ImportFramework($input: ImportFrameworkInput!) {
|
|
370
|
+
importFramework(input: $input) { success }
|
|
371
|
+
}
|
|
372
|
+
`;
|
|
373
|
+
exports.CREATE_FRAMEWORK = `
|
|
374
|
+
mutation CreateFramework($input: CreateFrameworkInput!) {
|
|
375
|
+
createFramework(input: $input) {
|
|
376
|
+
id
|
|
377
|
+
name
|
|
378
|
+
source
|
|
379
|
+
sourceId
|
|
380
|
+
owner
|
|
381
|
+
description
|
|
382
|
+
createdOn
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
`;
|
|
386
|
+
exports.CREATE_REQUIREMENT = `
|
|
387
|
+
mutation CreateRequirement($input: CreateRequirementInput!) {
|
|
388
|
+
createRequirement(input: $input) {
|
|
389
|
+
id
|
|
390
|
+
identifier
|
|
391
|
+
title
|
|
392
|
+
section
|
|
393
|
+
priority
|
|
394
|
+
frameworkIds
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
`;
|
|
398
|
+
exports.CREATE_CONTROL = `
|
|
399
|
+
mutation CreateControl($input: CreateControlInput!) {
|
|
400
|
+
createControl(input: $input) { ${CONTROL_WRITE_FIELDS} }
|
|
401
|
+
}
|
|
402
|
+
`;
|
|
403
|
+
exports.UPDATE_CONTROL = `
|
|
404
|
+
mutation UpdateControl($input: UpdateControlInput!) {
|
|
405
|
+
updateControl(input: $input) { ${CONTROL_WRITE_FIELDS} }
|
|
406
|
+
}
|
|
407
|
+
`;
|
|
408
|
+
// The API enforces the lifecycle: DRAFT->LIVE is refused ("Valid transitions from DRAFT: REVIEW",
|
|
409
|
+
// verified on j1dev 2026-10-28), so a two-hop move is two calls.
|
|
410
|
+
exports.TRANSITION_CONTROL_STATE = `
|
|
411
|
+
mutation TransitionControlState($input: TransitionControlStateInput!) {
|
|
412
|
+
transitionControlState(input: $input) { ${CONTROL_WRITE_FIELDS} }
|
|
413
|
+
}
|
|
414
|
+
`;
|
|
415
|
+
exports.CREATE_CONTROL_TEST = `
|
|
416
|
+
mutation CreateControlTest($input: CreateControlTestInput!) {
|
|
417
|
+
createControlTest(input: $input) { ${CONTROL_TEST_WRITE_FIELDS} }
|
|
418
|
+
}
|
|
419
|
+
`;
|
|
420
|
+
exports.UPDATE_CONTROL_TEST = `
|
|
421
|
+
mutation UpdateControlTest($input: UpdateControlTestInput!) {
|
|
422
|
+
updateControlTest(input: $input) { ${CONTROL_TEST_WRITE_FIELDS} }
|
|
423
|
+
}
|
|
424
|
+
`;
|
|
425
|
+
// Soft: the test's rule is set DISABLED and `restoreControlTest` exists on the API.
|
|
426
|
+
exports.DELETE_CONTROL_TEST = `
|
|
427
|
+
mutation DeleteControlTest($id: ID!) {
|
|
428
|
+
deleteControlTest(id: $id) { success }
|
|
429
|
+
}
|
|
430
|
+
`;
|
|
431
|
+
// Hard: the control entity is deleted, its tests soft-deleted and its attestations purged
|
|
432
|
+
// (apps `deleteControl.ts`, CCMR-516). The tool gates it to DRAFT controls that were never LIVE.
|
|
433
|
+
exports.DELETE_CONTROL = `
|
|
434
|
+
mutation DeleteControl($input: DeleteControlInput!) {
|
|
435
|
+
deleteControl(input: $input) { success }
|
|
436
|
+
}
|
|
437
|
+
`;
|
|
438
|
+
/** Runs every test's rule now, whatever the control's state; a non-LIVE control stays unscored. */
|
|
439
|
+
exports.EVALUATE_CONTROL = `
|
|
440
|
+
mutation EvaluateControl($id: ID!) {
|
|
441
|
+
evaluateControl(id: $id) { success }
|
|
442
|
+
}
|
|
443
|
+
`;
|
|
444
|
+
exports.CREATE_CONTROL_TEST_EXEMPTIONS = `
|
|
445
|
+
mutation CreateControlTestExemptions($input: CreateControlTestExemptionsInput!) {
|
|
446
|
+
createControlTestExemptions(input: $input) {
|
|
447
|
+
groupId
|
|
448
|
+
exemptions { entityId }
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
`;
|
|
452
|
+
/** At least one selector; the API refuses revoking a test's whole set. */
|
|
453
|
+
exports.REVOKE_CONTROL_TEST_EXEMPTIONS = `
|
|
454
|
+
mutation RevokeControlTestExemptions($controlTestId: ID!, $groupId: ID, $entityIds: [ID!]) {
|
|
455
|
+
revokeControlTestExemptions(
|
|
456
|
+
controlTestId: $controlTestId
|
|
457
|
+
groupId: $groupId
|
|
458
|
+
entityIds: $entityIds
|
|
459
|
+
) {
|
|
460
|
+
revokedCount
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
`;
|
|
322
464
|
//# sourceMappingURL=mutations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/client/graphql/mutations.ts"],"names":[],"mappings":";;;AAAA,6CAAkD;AAErC,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D1C,CAAC;AAEW,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD1C,CAAC;AAEW,QAAA,aAAa,GAAG;;;;;;;CAO5B,CAAC;AAEF,iGAAiG;AACjG,iFAAiF;AACpE,QAAA,WAAW,GAAG;;;;;;;CAO1B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;CAO/B,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtC,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;CAMtC,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;CAMtC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;CAM/B,CAAC;AAEW,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyG9B,CAAC;AACF,oGAAoG;AACpG,iGAAiG;AACpF,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC;AAEW,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC;AAEF,iFAAiF;AACpE,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC"}
|
|
1
|
+
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/client/graphql/mutations.ts"],"names":[],"mappings":";;;AAAA,6CAAkD;AAErC,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D1C,CAAC;AAEW,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD1C,CAAC;AAEW,QAAA,aAAa,GAAG;;;;;;;CAO5B,CAAC;AAEF,iGAAiG;AACjG,iFAAiF;AACpE,QAAA,WAAW,GAAG;;;;;;;CAO1B,CAAC;AAEF,kGAAkG;AAClG,iGAAiG;AACjG,kGAAkG;AAClG,+FAA+F;AAC/F,2FAA2F;AAC9E,QAAA,kBAAkB,GAAG;;;;;;;;;;;CAWjC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;CAO/B,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtC,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;CAMtC,CAAC;AAEW,QAAA,uBAAuB,GAAG;;;;;;CAMtC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;CAM/B,CAAC;AAEW,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyG9B,CAAC;AACF,oGAAoG;AACpG,iGAAiG;AACpF,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC;AAEW,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC;AAEF,iFAAiF;AACpE,QAAA,kBAAkB,GAAG;;yCAEO,+BAAkB;;CAE1D,CAAC;AAEF,gGAAgG;AAChG,6FAA6F;AAC7F,4DAA4D;AAC5D,gGAAgG;AAEhG,MAAM,oBAAoB,GAAG;;;;;;;;;;;;CAY5B,CAAC;AAEF,MAAM,yBAAyB,GAAG;;;;;;;;;;CAUjC,CAAC;AAEF,sFAAsF;AACzE,QAAA,gBAAgB,GAAG;;;;CAI/B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;CAY/B,CAAC;AAEW,QAAA,kBAAkB,GAAG;;;;;;;;;;;CAWjC,CAAC;AAEW,QAAA,cAAc,GAAG;;qCAEO,oBAAoB;;CAExD,CAAC;AAEW,QAAA,cAAc,GAAG;;qCAEO,oBAAoB;;CAExD,CAAC;AAEF,kGAAkG;AAClG,iEAAiE;AACpD,QAAA,wBAAwB,GAAG;;8CAEM,oBAAoB;;CAEjE,CAAC;AAEW,QAAA,mBAAmB,GAAG;;yCAEM,yBAAyB;;CAEjE,CAAC;AAEW,QAAA,mBAAmB,GAAG;;yCAEM,yBAAyB;;CAEjE,CAAC;AAEF,oFAAoF;AACvE,QAAA,mBAAmB,GAAG;;;;CAIlC,CAAC;AAEF,0FAA0F;AAC1F,iGAAiG;AACpF,QAAA,cAAc,GAAG;;;;CAI7B,CAAC;AAEF,mGAAmG;AACtF,QAAA,gBAAgB,GAAG;;;;CAI/B,CAAC;AAEW,QAAA,8BAA8B,GAAG;;;;;;;CAO7C,CAAC;AAEF,0EAA0E;AAC7D,QAAA,8BAA8B,GAAG;;;;;;;;;;CAU7C,CAAC"}
|