@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.
Files changed (125) hide show
  1. package/README.md +124 -72
  2. package/dist/client/graphql/mutations.d.ts +17 -0
  3. package/dist/client/graphql/mutations.d.ts.map +1 -1
  4. package/dist/client/graphql/mutations.js +143 -1
  5. package/dist/client/graphql/mutations.js.map +1 -1
  6. package/dist/client/graphql/queries.d.ts +28 -3
  7. package/dist/client/graphql/queries.d.ts.map +1 -1
  8. package/dist/client/graphql/queries.js +104 -4
  9. package/dist/client/graphql/queries.js.map +1 -1
  10. package/dist/client/jupiterone-client.d.ts +31 -0
  11. package/dist/client/jupiterone-client.d.ts.map +1 -1
  12. package/dist/client/jupiterone-client.js +63 -0
  13. package/dist/client/jupiterone-client.js.map +1 -1
  14. package/dist/client/services/compliance-service.d.ts +48 -1
  15. package/dist/client/services/compliance-service.d.ts.map +1 -1
  16. package/dist/client/services/compliance-service.js +292 -0
  17. package/dist/client/services/compliance-service.js.map +1 -1
  18. package/dist/client/services/j1ql-service.d.ts +10 -2
  19. package/dist/client/services/j1ql-service.d.ts.map +1 -1
  20. package/dist/client/services/j1ql-service.js +11 -3
  21. package/dist/client/services/j1ql-service.js.map +1 -1
  22. package/dist/client/services/rule-service.d.ts +14 -2
  23. package/dist/client/services/rule-service.d.ts.map +1 -1
  24. package/dist/client/services/rule-service.js +24 -5
  25. package/dist/client/services/rule-service.js.map +1 -1
  26. package/dist/generated/description-map.d.ts.map +1 -1
  27. package/dist/generated/description-map.js +843 -49
  28. package/dist/generated/description-map.js.map +1 -1
  29. package/dist/server/mcp-server.d.ts.map +1 -1
  30. package/dist/server/mcp-server.js +39 -2
  31. package/dist/server/mcp-server.js.map +1 -1
  32. package/dist/server/skills.d.ts +25 -0
  33. package/dist/server/skills.d.ts.map +1 -0
  34. package/dist/server/skills.js +115 -0
  35. package/dist/server/skills.js.map +1 -0
  36. package/dist/server/tools/compliance/attestations.d.ts.map +1 -1
  37. package/dist/server/tools/compliance/attestations.js +20 -37
  38. package/dist/server/tools/compliance/attestations.js.map +1 -1
  39. package/dist/server/tools/compliance/authoring.d.ts +3 -0
  40. package/dist/server/tools/compliance/authoring.d.ts.map +1 -0
  41. package/dist/server/tools/compliance/authoring.js +773 -0
  42. package/dist/server/tools/compliance/authoring.js.map +1 -0
  43. package/dist/server/tools/compliance/controls.d.ts.map +1 -1
  44. package/dist/server/tools/compliance/controls.js +193 -19
  45. package/dist/server/tools/compliance/controls.js.map +1 -1
  46. package/dist/server/tools/compliance/exemptions.d.ts +3 -0
  47. package/dist/server/tools/compliance/exemptions.d.ts.map +1 -0
  48. package/dist/server/tools/compliance/exemptions.js +287 -0
  49. package/dist/server/tools/compliance/exemptions.js.map +1 -0
  50. package/dist/server/tools/compliance/framework.d.ts +3 -0
  51. package/dist/server/tools/compliance/framework.d.ts.map +1 -0
  52. package/dist/server/tools/compliance/framework.js +445 -0
  53. package/dist/server/tools/compliance/framework.js.map +1 -0
  54. package/dist/server/tools/compliance/graph.d.ts +56 -0
  55. package/dist/server/tools/compliance/graph.d.ts.map +1 -0
  56. package/dist/server/tools/compliance/graph.js +115 -0
  57. package/dist/server/tools/compliance/graph.js.map +1 -0
  58. package/dist/server/tools/compliance/index.d.ts +2 -16
  59. package/dist/server/tools/compliance/index.d.ts.map +1 -1
  60. package/dist/server/tools/compliance/index.js +45 -15
  61. package/dist/server/tools/compliance/index.js.map +1 -1
  62. package/dist/server/tools/compliance/requirements.d.ts +3 -0
  63. package/dist/server/tools/compliance/requirements.d.ts.map +1 -0
  64. package/dist/server/tools/compliance/requirements.js +243 -0
  65. package/dist/server/tools/compliance/requirements.js.map +1 -0
  66. package/dist/server/tools/compliance/schemas.d.ts +409 -8
  67. package/dist/server/tools/compliance/schemas.d.ts.map +1 -1
  68. package/dist/server/tools/compliance/schemas.js +337 -7
  69. package/dist/server/tools/compliance/schemas.js.map +1 -1
  70. package/dist/server/tools/compliance/shared.d.ts +103 -1
  71. package/dist/server/tools/compliance/shared.d.ts.map +1 -1
  72. package/dist/server/tools/compliance/shared.js +235 -1
  73. package/dist/server/tools/compliance/shared.js.map +1 -1
  74. package/dist/server/tools/compliance/summary.d.ts +2 -8
  75. package/dist/server/tools/compliance/summary.d.ts.map +1 -1
  76. package/dist/server/tools/compliance/summary.js +149 -87
  77. package/dist/server/tools/compliance/summary.js.map +1 -1
  78. package/dist/server/tools/compliance/tests.d.ts +3 -0
  79. package/dist/server/tools/compliance/tests.d.ts.map +1 -0
  80. package/dist/server/tools/compliance/tests.js +463 -0
  81. package/dist/server/tools/compliance/tests.js.map +1 -0
  82. package/dist/server/tools/compliance/transitions.d.ts +6 -0
  83. package/dist/server/tools/compliance/transitions.d.ts.map +1 -0
  84. package/dist/server/tools/compliance/transitions.js +659 -0
  85. package/dist/server/tools/compliance/transitions.js.map +1 -0
  86. package/dist/server/tools/integrations.d.ts.map +1 -1
  87. package/dist/server/tools/integrations.js +43 -49
  88. package/dist/server/tools/integrations.js.map +1 -1
  89. package/dist/server/tools/reference.d.ts +1 -1
  90. package/dist/server/tools/reference.d.ts.map +1 -1
  91. package/dist/server/tools/reference.js +2 -0
  92. package/dist/server/tools/reference.js.map +1 -1
  93. package/dist/server/tools/result.d.ts +3 -2
  94. package/dist/server/tools/result.d.ts.map +1 -1
  95. package/dist/server/tools/result.js +3 -2
  96. package/dist/server/tools/result.js.map +1 -1
  97. package/dist/server/tools/rule-preview-checks.d.ts +95 -0
  98. package/dist/server/tools/rule-preview-checks.d.ts.map +1 -0
  99. package/dist/server/tools/rule-preview-checks.js +380 -0
  100. package/dist/server/tools/rule-preview-checks.js.map +1 -0
  101. package/dist/server/tools/rule-preview.d.ts +105 -0
  102. package/dist/server/tools/rule-preview.d.ts.map +1 -0
  103. package/dist/server/tools/rule-preview.js +507 -0
  104. package/dist/server/tools/rule-preview.js.map +1 -0
  105. package/dist/server/tools/rules.d.ts +1 -1
  106. package/dist/server/tools/rules.d.ts.map +1 -1
  107. package/dist/server/tools/rules.js +264 -51
  108. package/dist/server/tools/rules.js.map +1 -1
  109. package/dist/server/tools/types.d.ts +2 -0
  110. package/dist/server/tools/types.d.ts.map +1 -1
  111. package/dist/server/tools/types.js.map +1 -1
  112. package/dist/server/tools/usage.d.ts +7 -8
  113. package/dist/server/tools/usage.d.ts.map +1 -1
  114. package/dist/server/tools/usage.js +239 -5
  115. package/dist/server/tools/usage.js.map +1 -1
  116. package/dist/server/tools/value-probe.d.ts.map +1 -1
  117. package/dist/server/tools/value-probe.js +33 -9
  118. package/dist/server/tools/value-probe.js.map +1 -1
  119. package/dist/types/jupiterone.d.ts +213 -5
  120. package/dist/types/jupiterone.d.ts.map +1 -1
  121. package/dist/utils/j1ql-validator.d.ts.map +1 -1
  122. package/dist/utils/j1ql-validator.js +129 -1
  123. package/dist/utils/j1ql-validator.js.map +1 -1
  124. package/node_modules/dtrace-provider/build/Makefile +1 -1
  125. package/package.json +3 -3
@@ -3,6 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.descriptionMap = void 0;
4
4
  /* AUTO-GENERATED — DO NOT EDIT MANUALLY */
5
5
  exports.descriptionMap = {
6
+ "check-compliance-coverage.md": `Check whether a standard, framework or control topic is already covered in JupiterOne Compliance (CCM) before assessing it by hand or creating anything: is the framework loaded, importable from JupiterOne's library, or absent, and which existing controls already address a topic and can be reused. Call it when a question names a standard, benchmark or named control (SOC 2, ISO 27001, CIS, PCI DSS, NIST, HIPAA, "our MFA control"). Siblings: \`get-compliance-summary\` for posture, \`list-controls\` for the full list. Vocabulary: coverage, covered, framework, standard, benchmark, library, reuse, gap.
7
+
8
+ ## Parameters
9
+
10
+ At least one of \`framework\` (a standard's name or a fragment: "CIS AWS", "SOC 2", "PCI DSS 4") and \`topic\` (a control subject: "MFA for console users", "S3 encryption"). Both together answer both questions in one call.
11
+
12
+ ## Outcomes
13
+
14
+ - \`verdict\`: \`covered\` (LIVE controls with tests exist for it), \`partial\` (controls exist but are DRAFT, REVIEW or without tests; \`draftCount\` says how many are drafts, which is why a framework can read "0 passing, 0 failing"), \`importable\` (not loaded, but JupiterOne's library has it: \`importable[]\` carries \`source\` and \`sourceId\` for \`import-framework\`), \`not_covered\`.
15
+ - \`frameworks[]\`: the loaded frameworks that matched, with \`id\`, \`name\`, \`source\`, \`url\`.
16
+ - \`controls[]\`: up to 25 existing controls matching the topic, with \`id\`, \`name\`, \`identifier\`, \`state\`, \`status\`, \`testCount\`, \`frameworkNames\`, \`url\`. These are reuse candidates for \`link-controls\`; a control can serve several requirements and frameworks.
17
+ - \`nextStep\`: the call that acts on the verdict, ready to run.
18
+ - Error \`read_failed:\` the loaded framework list could not be read in time, so there is no verdict. Call again.
19
+
20
+ An empty \`controls[]\` with \`not_covered\` means nothing matched the words given, not that no related control exists; try another phrasing before creating. The legacy Compliance app is never consulted.
21
+
22
+ ## Access
23
+
24
+ Needs the Compliance (CCM) entitlement and control read permission; an access-denied error names the missing one. The library search needs no permission beyond the entitlement.
25
+
26
+ ## Example
27
+
28
+ \`{ "framework": "CIS AWS Foundations", "topic": "root account MFA" }\`
29
+
30
+ Full reference: get-reference topic framework-authoring
31
+ `,
6
32
  "check-threat-exposure.md": `Answer, from this account's own graph, whether it is exposed to up to 25 CVEs: how many devices a vulnerability scanner has confirmed carry each one, a handle to drill into the affected assets, and whether any matched device is internet-facing. This is the direct, strict match on the unified vulnerability's \`cveId\`, so it sees only what a scanner has already fingerprinted for that CVE; \`get-threat\` briefs the CVE itself and \`get-threat-trending\` lists what is escalating. Vocabulary: exposure, exposed, affected, CVE, scanner, findings, KEV, internet-facing.
7
33
 
8
34
  ## Reading the result
@@ -38,7 +64,7 @@ Needs the account's VulnerabilityManagement entitlement and vulnerability read p
38
64
  - \`blocked\` — a failing test or an expired, unrevoked attestation keeps the control failing whatever is attested (\`blockers\` lists each). Do not call the control covered: fix the test, or renew or revoke the expired attestation.
39
65
  - \`passes_by_attestation\` — no test has a status and nothing blocks; the control passes once CCM re-scores it.
40
66
  - \`already_passing\` — a passing test already passes the control; the attestation changes nothing.
41
- - Refusals are errors starting with the outcome, \`structuredContent.controlId\` names the control, and nothing was created: \`not_found\`; \`not_live\` (no tool here changes a control's state, so tell the user rather than retrying); \`invalid_input\` (\`expiresOn\` fails the rules above); \`interrupted\` (the write was cut off at the 55-second limit and may have landed; the error says how to confirm before creating again).
67
+ - Refusals are errors starting with the outcome, \`structuredContent.controlId\` names the control, and nothing was created: \`not_found\`; \`not_live\` (promote the control with \`transition-controls\`, then attest); \`invalid_input\` (\`expiresOn\` fails the rules above); \`interrupted\` (the write was cut off at the 55-second limit and may have landed; the error says how to confirm before creating again).
42
68
 
43
69
  ## Read-back
44
70
 
@@ -53,6 +79,58 @@ Needs the Compliance (CCM) entitlement and edit permission on the control's reso
53
79
  \`{ "controlId": "<id>", "subject": "Log Management Policy v3", "expiresOn": "2027-06-30" }\`
54
80
 
55
81
  Full reference: get-reference topic compliance-model
82
+ `,
83
+ "create-control-test.md": `Add one test to a JupiterOne Compliance (CCM) control: a J1QL query plus whether its rows are \`GOOD\` (compliant assets; the test never fails, and zero rows is a pass on no data) or \`BAD\` (violations; any row fails the test). The query is parsed and run before it is saved and its rows are reported, so prove the query with \`execute-j1ql-query\` first and create the test once the rows are the evidence an auditor would accept. One query per test. On a DRAFT control the test runs only when \`evaluate-controls\` asks. Vocabulary: control test, add test, evidence query, automated check, GOOD, BAD, J1QL.
84
+
85
+ ## Parameters
86
+
87
+ \`controlId\` (exact id), \`testName\` (what the auditor would call the check), \`query\` (one J1QL query; a control that needs two checks gets two tests), \`resultsAre\` (\`GOOD\` or \`BAD\`), \`description\` (optional).
88
+
89
+ ## Preflight
90
+
91
+ The query is parsed locally: a syntax error, or an alias returned from a negated (\`THAT !\`) step, returns \`invalid_input:\` with a hint, nothing is saved, and \`structuredContent.suggestion\` carries the fix, a ready-to-run query when one is known. A query that parses is then run once (up to 10 seconds, within the call's budget): \`rows\` is what it returned now, \`noDatapoints\` is true when it returned nothing, \`queryRun\` is \`ran\`, \`skipped_deadline\` or \`error\` (with the hint). A run the engine rejects outright is refused the same way. Nothing else blocks the create: a query that failed for another reason is saved, checks nothing until it runs, and \`nextStep\` says how to fix it; a GOOD test with zero rows proves nothing, and a BAD test with rows will fail the control once it is LIVE. Report all three to the user.
92
+
93
+ ## Outcomes
94
+
95
+ - \`created\`: \`test\` with \`id\`, \`name\`, \`referencedRuleId\`, \`effective\` and \`url\`, the control's \`state\`, and \`nextStep\`. \`effective: false\` means the query names an entity type this account does not hold (\`unknownEntityType: true\`): the test will pass on no data until the data exists.
96
+ - \`already_exists\`: a non-deleted test on this control with this name (ignoring case); \`test\` carries it and nothing was created. Safe on replay; use \`update-control-test\` to change it.
97
+ - Errors: \`control_not_found:\`; \`invalid_input:\` (see Preflight; also an empty testName); \`read_failed:\` (the control could not be read in time; nothing was created; call again); \`interrupted:\` (cut off at the 55-second limit and may have landed: read the control's tests with \`get-control\` before creating again).
98
+
99
+ ## Access
100
+
101
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
102
+
103
+ ## Example
104
+
105
+ \`{ "controlId": "ccm_c_…", "testName": "Okta users without MFA", "query": "FIND okta_user WITH status = 'ACTIVE' AND mfaEnabled != true AS u RETURN u.displayName, u.email", "resultsAre": "BAD" }\`
106
+
107
+ Full reference: get-reference topic framework-authoring
108
+ `,
109
+ "create-controls.md": `Create JupiterOne Compliance (CCM) controls under one requirement in a batch, in the customer's own words and identifiers. Controls land DRAFT for the user to review; promotion is a separate \`transition-controls\` call. Before creating, look for a control the account already holds (\`check-compliance-coverage\` with a \`topic\`, or \`list-controls\` with \`search\`) and attach it with \`link-controls\`: one control can serve many requirements. Tests come afterwards with \`create-control-test\`. Vocabulary: create control, new control, add controls, custom control, control register, author.
110
+
111
+ ## Parameters
112
+
113
+ \`requirementId\` (from \`create-requirements\` or \`get-compliance-summary\` with \`includeRequirements\`) and \`controls[]\` (1 to 25). Each item: \`name\` (required), \`description\` (what the organisation does, naming the tool or process; specific enough to write a test from), \`identifier\` (the customer's id, kept verbatim), \`catalog\`, \`owner\` (an email), \`remediation\` and \`exceptionProcess\` (markdown), \`mitreTechnique\` (\`T1078\` or \`T1059.001\`), \`state\` (\`DRAFT\`, the default, or \`LIVE\`, which counts against the live-controls limit at once). Optional strings are omitted when absent.
114
+
115
+ ## Outcomes
116
+
117
+ Always \`ok\` with one \`items[]\` entry per input, in order: \`created\` (with \`id\`, \`name\`, \`identifier\`, \`state\`, \`url\`), \`already_exists\` (a non-deleted control with this name, ignoring case, exists anywhere in the account; \`control\` carries its \`id\`, \`state\` and \`frameworkNames\`, nothing was created, and the way to use it for this requirement is \`link-controls\`), or \`refused\` (\`reason\` carries the backend's text). \`createdCount\`, \`existingCount\`, \`refusedCount\` summarise. A \`live_limit\` refusal on a LIVE item carries the backend's numbers verbatim and stops the rest of the batch; items after it are \`not_attempted\`.
118
+
119
+ \`nextStep\` names \`create-control-test\` for the automated controls and says to confirm the list with the user; attestation-only controls need no test and are attested once LIVE.
120
+
121
+ **Unfinished batches.** \`remaining\` counts items \`not_attempted\` (the call's budget ran out) and \`interrupted\` (cut off mid-create; it may have landed). \`nextInputs\` holds only the not-attempted items: call again with it, never with the whole batch. The duplicate check reads the graph, which lags a create by up to a minute, so resending items created moments ago makes second copies. Look \`interrupted\` items up with \`list-controls\` \`search\` after a minute before creating them again, and do the same after a call that returned no response at all. A single create took 41 s on a slow backend, so keep batches small when calls run long.
122
+
123
+ Errors: \`requirement_not_found:\`; \`invalid_input:\` (empty batch, item without a name, malformed owner or MITRE id); \`read_failed:\` (the requirement or the account's existing controls could not be read, or more existing controls match the names than one call reads; use more distinctive names). Nothing was created.
124
+
125
+ ## Access
126
+
127
+ Needs the Compliance (CCM) entitlement and control create permission in the resource group; an access-denied error names the missing one.
128
+
129
+ ## Example
130
+
131
+ \`{ "requirementId": "<id>", "controls": [{ "name": "MFA enforced for all Okta users", "identifier": "6.1.2", "description": "MFA is enforced through Okta sign-on policies for every active user." }] }\`
132
+
133
+ Full reference: get-reference topic framework-authoring
56
134
  `,
57
135
  "create-dashboard-widget.md": `Add one widget to an existing dashboard: J1QL queries drawn as a chart. The render contract is
58
136
  enforced: a query whose RETURN aliases are not the ones the chart type reads is rejected before
@@ -115,7 +193,53 @@ user, so it can only create \`Account\` dashboards; a \`User\` request is refuse
115
193
 
116
194
  \`id\` is the \`dashboardId\` every later call takes; \`url\` opens the board, give it to the user.
117
195
  `,
118
- "create-inline-question-rule.md": `Create an alert rule from an inline J1QL question: the query runs on a schedule and, when its condition holds, the actions fire (alert, email, Slack, Jira ticket, tag, webhook, S3). Test the query with \`execute-j1ql-query\` first; the rule stores it as written. Siblings: \`update-inline-question-rule\` replaces an existing rule, \`get-rule-details\` reads one, \`list-rules\` finds them, \`evaluate-rule\` runs one now. Vocabulary: rule, alert, monitor, notify, schedule, polling interval, condition, actions, labels.
196
+ "create-exemptions.md": `Exempt specific assets from a JupiterOne Compliance (CCM) control test so they stop failing it: a risk the organisation accepts, an asset the test does not apply to, a false positive, or one covered by a compensating control, with a justification and an optional expiry. One call records one decision for many entities, taken from the test's latest evaluation rows. An attestation covers a whole control; an exemption covers assets within one test. Vocabulary: exempt, exception, risk accepted, not applicable, false positive, compensating control, exclude asset, waiver.
197
+
198
+ ## Parameters
199
+
200
+ \`controlTestId\`; \`entities[]\` (1 to 50) of \`entityId\` (the graph \`_id\`) with optional \`entityKey\`, \`entityScope\`, \`entityType\`, \`entityDisplayName\` as the evaluation rows carry them (\`get-control\` gives the test's \`latestEvaluation.rawDataKey\`; \`get-rule-evaluation-query-results\` gives the rows: a \`list\` row is the entity, and a \`table\` row carries it under \`_meta.byAlias.<alias>.entity\` with \`_id\`, \`_key\`, \`_scope\`, \`_type\`); \`exemptionReason\` (\`RISK_ACCEPTED\`, \`NOT_APPLICABLE\`, \`FALSE_POSITIVE\`, \`COMPENSATING_CONTROL\`); \`justification\` (required; what an auditor should read); \`expiresOn\` (optional; a date, the end of that day UTC, or a date-time; omitted means the exemption never expires).
201
+
202
+ ## Outcomes
203
+
204
+ - \`created\`: \`groupId\` (shared by every entity in this decision; \`revoke-exemptions\` takes it), \`count\`, the test's \`name\` and the control's \`id\`, \`name\`, \`url\`, and \`replaced[]\`: earlier active exemptions on the same assets that this filing overwrote (one per asset is kept, whoever filed it; \`replacedComplete: false\` when they could not all be read), and \`note\` that the control's status changes on the test's next evaluation (\`evaluate-controls\` to run it now). Re-exempting an entity replaces its earlier exemption and files it under the new call's \`groupId\`, so after a repeat the earlier \`groupId\` holds none of those entities.
205
+ - \`not_eligible\`: nothing written; \`message\` is the backend's own reason (the test has no stored evaluation, its query changed since that evaluation, or its shape cannot take exemptions). Evaluate the test again and re-read the rows before retrying.
206
+ - Errors: \`test_not_found:\`; \`invalid_input:\` (empty entities, an empty justification, an expiry in the past, an unknown reason); \`read_failed:\` (the test or its latest evaluation could not be read in time; nothing was filed; call again); \`interrupted:\` (cut off at the 55-second limit and may have landed; read the test's \`exemptions\` on \`get-control\` before repeating, since a repeat re-groups the entities).
207
+
208
+ ## Access
209
+
210
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
211
+
212
+ ## Example
213
+
214
+ \`{ "controlTestId": "<id>", "entities": [{ "entityId": "<graph _id>", "entityKey": "arn:aws:s3:::logs-archive-bucket", "entityScope": "<_scope>", "entityType": "aws_s3_bucket", "entityDisplayName": "logs-archive-bucket" }], "exemptionReason": "NOT_APPLICABLE", "justification": "Public by design: it serves the status page.", "expiresOn": "2027-12-31" }\`
215
+
216
+ Full reference: get-reference topic framework-authoring
217
+ `,
218
+ "create-framework.md": `Create an empty JupiterOne Compliance (CCM) framework for a customer's own compliance program, the first step of incremental authoring: framework, then \`create-requirements\`, then \`create-controls\` or \`link-controls\`, then \`create-control-test\`. Everything authored lands DRAFT for the user to review; \`transition-controls\` promotes it later. For a standard JupiterOne already ships, \`import-framework\` loads the prebuilt version instead. Vocabulary: new framework, custom framework, internal policy, control register, compliance program, build, author.
219
+
220
+ ## Parameters
221
+
222
+ \`title\` (the program's name as the customer calls it) and \`description\` are required; \`owner\` (an email) and \`resourceGroupId\` are optional and omitted when absent.
223
+
224
+ ## Outcomes
225
+
226
+ - \`created\`: \`framework\` with \`id\`, \`name\`, \`url\`. \`nextStep\` names \`create-requirements\` and says to show the proposed sections and requirements to the user first.
227
+ - \`already_exists\`: a non-deleted framework with this title (ignoring case) exists; \`framework\` carries it and nothing was created. A normal result, safe on replay; continue with its id, or choose another name if the user wants a second program.
228
+ - Error \`invalid_input:\` an empty name or a malformed owner email; nothing was called.
229
+ - Error \`read_failed:\` the framework list could not be read in time or was cut short, so a framework with this title cannot be ruled out; nothing was created. Call again.
230
+ - Error \`interrupted:\` the call was cut off at the 55-second limit and may have landed. The framework list lags a create by up to a minute: wait a minute, then read \`get-compliance-summary\` (the \`frameworks\` list) before creating again.
231
+
232
+ ## Access
233
+
234
+ Needs the Compliance (CCM) entitlement and framework create permission; an access-denied error names the missing one.
235
+
236
+ ## Example
237
+
238
+ \`{ "title": "ACME Security Policy", "description": "Internal controls for ACME, mapped to SOC 2." }\`
239
+
240
+ Full reference: get-reference topic framework-authoring
241
+ `,
242
+ "create-inline-question-rule.md": `Create an alert rule from an inline J1QL question: the query runs on a schedule and, when its condition holds, the actions fire (alert, email, Slack, Jira ticket, tag, webhook, S3). Test the query with \`execute-j1ql-query\` first; the rule stores it as written. Siblings: \`update-inline-question-rule\` replaces an existing rule, \`get-rule-details\` reads one, \`list-rules\` finds them, \`evaluate-rule\` runs one now, \`preview-rule-actions\` renders what its actions would send without saving. Vocabulary: rule, alert, monitor, notify, schedule, polling interval, condition, actions, labels.
119
243
 
120
244
  ## Payload
121
245
 
@@ -129,13 +253,75 @@ user, so it can only create \`Account\` dashboards; a \`User\` request is refuse
129
253
 
130
254
  ## Actions
131
255
 
132
- Types: \`SET_PROPERTY\`, \`CREATE_ALERT\`, \`SEND_EMAIL\`, \`TAG_ENTITIES\`, \`SEND_SLACK_MESSAGE\`, \`SEND_TO_S3\`, \`CREATE_JIRA_TICKET\`, \`WEBHOOK\` and \`FOR_EACH_ITEM\`, which runs nested actions once per entity. Always include \`CREATE_ALERT\`. \`SET_PROPERTY\` on \`alertLevel\` takes \`LOW\`, \`MEDIUM\`, \`HIGH\`, \`CRITICAL\` or \`INFO\`. Slack, S3 and Jira actions need an \`integrationInstanceId\`: find the definition with \`get-integration-definitions\`, list instances with \`get-integration-instances\`, and ask the user which. Ask for recipients, channels, project and wording before writing an action that notifies someone.
256
+ Types: \`SET_PROPERTY\`, \`CREATE_ALERT\`, \`SEND_EMAIL\`, \`TAG_ENTITIES\`, \`SEND_SLACK_MESSAGE\`, \`SEND_TO_S3\`, \`CREATE_JIRA_TICKET\`, \`WEBHOOK\` and \`FOR_EACH_ITEM\`, which runs nested actions once per entity. Always include \`CREATE_ALERT\`. \`SET_PROPERTY\` on \`alertLevel\` takes \`LOW\`, \`MEDIUM\`, \`HIGH\`, \`CRITICAL\` or \`INFO\`. Slack, S3 and Jira actions need an \`integrationInstanceId\`: find the definition with \`get-integration-definitions\`, list instances with \`get-integration-instances\`, and ask the user which. Ask for recipients, channels, project and wording before writing an action that notifies someone, and show the user what it will send with \`preview-rule-actions\` before creating the rule.
133
257
 
134
258
  ## Refusals and response
135
259
 
136
260
  A \`name\` starting \`CONTROL-TEST:\` is refused with \`lintCode: 'ccm-managed-rule'\` (the prefix marks compliance control tests). A query that fails to parse returns the parser's suggestion and creates nothing. The response carries \`rule.url\`; give it to the user.
137
261
 
138
262
  Full reference: get-reference topic rule-authoring
263
+ `,
264
+ "create-requirements.md": `Add requirements to a JupiterOne Compliance (CCM) framework in one batch: the obligations a standard or an internal program states, each with the standard's own identifier and wording, grouped by \`section\`. One call per section is the natural unit, and the user reviews the list before controls go under it. Framework ids come from \`create-framework\` or \`get-compliance-summary\`. Siblings: \`create-controls\` and \`link-controls\` fill a requirement. Vocabulary: requirements, criteria, obligations, sections, control objectives, CC6.1, A.9.1.1, add requirements.
265
+
266
+ ## Parameters
267
+
268
+ \`frameworkId\` and \`requirements[]\` (1 to 50). Each item: \`title\` (required; the obligation in the standard's words), \`description\`, \`identifier\` (the standard's id, such as \`CC6.1\`), \`section\` (the grouping shown in the app), \`priority\` (\`CRITICAL\`, \`HIGH\`, \`MEDIUM\`, \`LOW\`). Optional strings are omitted when absent, never sent empty.
269
+
270
+ ## Outcomes
271
+
272
+ Always \`ok\` with one \`items[]\` entry per input, in order: \`outcome\` \`created\` (with \`id\`, \`title\`, \`identifier\`, \`section\`), \`already_exists\` (a non-deleted requirement in this framework with the same \`identifier\`, or the same \`title\` when no identifier was given, ignoring case; its \`id\` is returned and nothing was created) or \`refused\` (the backend rejected this item; \`reason\` carries its text). \`createdCount\`, \`existingCount\`, \`refusedCount\` summarise; one refused item never stops the others. \`framework.url\` opens the framework. \`nextStep\` names \`create-controls\` and \`link-controls\` per requirement and says to confirm the structure with the user first.
273
+
274
+ Errors: \`framework_not_found:\` no framework has this id; \`invalid_input:\` an empty batch, an item without a title, or an unknown priority; nothing was called. \`read_failed:\` the framework's existing requirements could not be read, so nothing was created (a create without that read could duplicate); call again. A call cut off at the 55-second limit comes back with items \`interrupted\`, or with no response at all, and some items may have landed. The duplicate check reads the API, so calling again with the same input is safe: landed items come back \`already_exists\`.
275
+
276
+ ## Access
277
+
278
+ Needs the Compliance (CCM) entitlement and framework edit permission; an access-denied error names the missing one.
279
+
280
+ ## Example
281
+
282
+ \`{ "frameworkId": "<id>", "requirements": [{ "title": "Logical access security over protected assets", "identifier": "CC6.1", "section": "Logical and Physical Access" }] }\`
283
+
284
+ Full reference: get-reference topic framework-authoring
285
+ `,
286
+ "delete-control-test.md": `Remove a test from a JupiterOne Compliance (CCM) control, for a test created by mistake or made obsolete by another. The test is soft-deleted (its rule stops running) and the control's status then follows its remaining tests and attestations; to change what a test checks, use \`update-control-test\` instead. Test ids come from \`get-control\` (\`tests[].id\`). Vocabulary: delete test, remove test, drop test, undo test, wrong control.
287
+
288
+ ## Outcomes
289
+
290
+ - \`deleted\`: \`test\` (\`id\`, \`name\`), \`deletedTestStatus\` (its last result), the control's \`id\`, \`name\`, \`state\`, \`url\`, and \`note\` saying what now decides the control's status (remaining tests, attestations, or nothing until a test or attestation exists).
291
+ - \`not_deletable\`: nothing changed; the control is LIVE and this is a failing test (\`reason\` \`failing_test_on_live\`: the control would pass on its next run) or its last test (\`last_test_on_live\`: its status would clear). Fix the query with \`update-control-test\`, exempt assets with \`create-exemptions\`, or move the control to REVIEW with \`transition-controls\` first.
292
+ - \`not_found\`: no non-deleted test has this id, which is also what a repeated delete sees; nothing changed. A normal result.
293
+ - Error \`read_failed:\` the test could not be read in time, so nothing was deleted; call again.
294
+ - Error \`interrupted:\` the call was cut off at the 55-second limit and may have landed; calling again is safe, and \`not_found\` confirms it.
295
+
296
+ ## Access
297
+
298
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
299
+
300
+ ## Example
301
+
302
+ \`{ "controlTestId": "<id from get-control>" }\`
303
+
304
+ Full reference: get-reference topic framework-authoring
305
+ `,
306
+ "delete-control.md": `Delete a JupiterOne Compliance (CCM) control that was created by mistake while authoring. This is a hard delete: the control and its tests are removed and any attestations on it are purged, so it is accepted only for a DRAFT control that was never scored and never attested (revoked attestations count). A LIVE control leaves the program with \`transition-controls\` to RETIRED, which keeps its history. A control under the wrong requirement is moved with \`update-control\` (\`requirementIds\`), not deleted. Vocabulary: delete control, remove control, undo create, discard draft, mistake.
307
+
308
+ ## Outcomes
309
+
310
+ - \`deleted\`: the control's \`id\` and \`name\`, \`testsRemoved\`, and the \`requirements[]\` it was linked to (\`id\`, \`title\`), so a replacement can be created under them.
311
+ - \`not_deletable\`: nothing changed; \`reason\` is \`state\` (not DRAFT), \`was_live\` (it has been scored as a LIVE control) or \`has_attestations\` (revoked ones included). \`nextStep\` fits the state: LIVE → RETIRED with \`transition-controls\`; REVIEW → back to DRAFT, then delete; a DRAFT with history stays a DRAFT (never scored) or is detached with \`update-control\`.
312
+ - \`not_found\`: no control has this id, which is also what a repeated delete sees; nothing changed.
313
+ - Error \`read_failed:\` the control or its attestations could not be read in time, so nothing was deleted; call again.
314
+ - Error \`interrupted:\` the call was cut off at the 55-second limit and may have landed; calling again is safe, and \`not_found\` confirms it.
315
+
316
+ ## Access
317
+
318
+ Needs the Compliance (CCM) entitlement and delete permission on the control's resource group; an access-denied error names the missing one.
319
+
320
+ ## Example
321
+
322
+ \`{ "controlId": "ccm_c_JSON_…" }\`
323
+
324
+ Full reference: get-reference topic framework-authoring
139
325
  `,
140
326
  "delete-dashboard-widget.md": `Delete one widget from a dashboard: the recovery path for a widget created by mistake or no
141
327
  longer wanted. This is destructive and irreversible: confirm the \`widgetId\` with
@@ -161,6 +347,30 @@ JupiterOne Compliance (CCM) runs each control test as a rule named \`CONTROL-TES
161
347
  ## Response
162
348
 
163
349
  \`ruleId\` as passed, \`id\` the backend confirmed deleted, and \`ccmOwnership\`: \`'clear'\` on a delete, \`'managed'\` or \`'unverified'\` on a refusal.
350
+ `,
351
+ "evaluate-controls.md": `Run the tests of JupiterOne Compliance (CCM) controls now, in a batch, instead of waiting for the daily run: the way a DRAFT or REVIEW control proves its tests before promotion, and the way to re-check a LIVE control after a fix. Results take minutes and are read with \`get-control\`. A non-LIVE control's tests gain a status; the control itself stays unscored until it is LIVE. Siblings: \`get-control\` reads the result, \`update-control-test\` fixes a query, \`transition-controls\` promotes. Vocabulary: evaluate, run tests now, re-check, prove draft, trigger evaluation, refresh status.
352
+
353
+ ## Parameters
354
+
355
+ \`controlIds[]\`: 1 to 25 exact control ids.
356
+
357
+ ## Outcomes
358
+
359
+ Always \`ok\` with one \`items[]\` entry per id: \`queued\` (with the control's \`name\`, \`state\`, \`testCount\`), \`no_tests\` (nothing to run; the control passes only by attestation once LIVE), or \`not_found\`. \`queuedCount\` summarises. \`nextStep\` says to wait a few minutes, then \`get-control\` on each: on a LIVE control \`status\` and \`statusExplanation\` follow the tests; on a DRAFT or REVIEW control \`statusExplanation\` stays \`not_live\` and \`testsRan\`, \`testsPassing\`, \`testsFailing\` carry the proof, with each test's \`status\` and \`lastEvaluatedOn\` under \`tests[]\`.
360
+
361
+ Each call queues a fresh run, so repeat it only when a query changed or data moved; the daily run covers LIVE controls on its own.
362
+
363
+ Errors: \`invalid_input:\` (empty list, or an id containing a quote); a call cut off at the 55-second limit comes back with items \`interrupted\`, or with no response; runs already queued complete on their own, so read back with \`get-control\` before queueing again. Items the budget did not reach are not queued; \`nextStep\` names them.
364
+
365
+ ## Access
366
+
367
+ Needs the Compliance (CCM) entitlement and edit permission on each control's resource group; an access-denied error names the missing one.
368
+
369
+ ## Example
370
+
371
+ \`{ "controlIds": ["ccm_c_JSON_…", "ccm_c_JSON_…"] }\`
372
+
373
+ Full reference: get-reference topic framework-authoring
164
374
  `,
165
375
  "evaluate-rule.md": `Run an alert rule now rather than at its next polling interval. The response carries only the evaluation's \`id\`, not its results: read the outcome with \`list-rule-evaluations\` and \`get-rule-evaluation-details\`. Vocabulary: run the rule now, trigger an evaluation, re-check.
166
376
  `,
@@ -224,7 +434,7 @@ Full reference: get-reference topic j1ql-language or j1ql-discovery
224
434
 
225
435
  ## Parameters
226
436
 
227
- \`frameworkId\` drills one framework and reads only its scorecard, faster on an account with many frameworks; \`frameworkName\` does the same by name, and both at once is an \`invalid_input:\` error. The expiry window bounds \`expiringAttestations\` only.
437
+ \`frameworkId\` drills one framework and reads only its scorecard, faster on an account with many frameworks; \`frameworkName\` does the same by name; \`frameworkIds\` scores a chosen set (up to 25) with no drill. More than one of the three is an \`invalid_input:\` error. \`includeRequirements\` with a drill adds the framework's \`requirementList\` (id, identifier, title, section, priority), what \`create-controls\` and \`link-controls\` take requirement ids from; \`requirementListTruncated\` past 1,000, \`requirementListSkipped\` with the reason when not read. The expiry window bounds \`expiringAttestations\` only.
228
438
 
229
439
  ## Outcomes
230
440
 
@@ -232,6 +442,7 @@ Full reference: get-reference topic j1ql-language or j1ql-discovery
232
442
  - \`ambiguous\` — \`frameworkName\` matched several (\`candidates\`, up to 25); ask the user, or call again with that \`id\` as \`frameworkId\`.
233
443
  - \`framework_not_found\` — \`frameworks\` lists every framework without counts; take the id from there.
234
444
  - \`frameworkResolution: "partial"\` is a substring match: confirm the \`name\` with the user. \`frameworksComplete: false\` means the list stopped at its page limit.
445
+ - \`frameworkIdsNotFound\` lists requested ids no framework has; the rest are scored.
235
446
 
236
447
  ## Reading the scorecard
237
448
 
@@ -239,6 +450,7 @@ Full reference: get-reference topic j1ql-language or j1ql-discovery
239
450
  - \`null\` counts mean not read, never zero (\`statsIncomplete\` names them).
240
451
  - \`healthPct\` is passing ÷ (passing + failing) requirements, \`null\` when none is evaluated. It ignores unevaluated requirements, so compare passing + failing with \`requirements.total\` before calling a framework healthy. \`importStatus\` other than \`COMPLETE\` means incomplete counts.
241
452
  - \`controls.passingWithoutData\`: CCM counts tests that saw no data as passing, so a high score can rest on tests that saw nothing.
453
+ - \`importJobs[]\`: framework imports in flight or failed (\`status\`, \`message\`, \`name\`, \`sourceId\`), the ones \`import-framework\` queued; absent when none.
242
454
  - An empty \`failingRequirements\` is real only when \`failingControlsTruncated\` is \`false\` and \`requirementLookupsSkipped\` is \`0\`; otherwise answer from \`failingControls\`.
243
455
 
244
456
  ## Attestations
@@ -274,7 +486,7 @@ Exactly one of \`controlId\`, \`identifier\` or \`controlName\`; none or several
274
486
  - A failing test fails the control; an attestation never masks it.
275
487
  - An attestation passes a control only when no test has a status.
276
488
  - An expired, unrevoked attestation fails the control, whatever the tests say.
277
- - Only LIVE controls are evaluated; a test that saw no data still passes.
489
+ - Only LIVE controls are evaluated; a test that saw no data still passes. A DRAFT or REVIEW control reports \`not_live\` with \`testsRan\`, \`testsPassing\` and \`testsFailing\` from the runs \`evaluate-controls\` queued; the tests have statuses, the control does not.
278
490
 
279
491
  \`statusExplanation\` is one of \`not_live\`, \`failing_test\`, \`failing_expired_attestation\`, \`undetermined\`, \`passing_by_tests\`, \`passing_by_attestation\`, \`no_tests\`, \`no_datapoints\`; \`statusMeaning\` explains it. \`blockers\` lists every cause; clear them all. \`storedStatusStale: true\`: CCM has not re-scored yet, so report \`expectedStatus\`.
280
492
 
@@ -282,6 +494,8 @@ Exactly one of \`controlId\`, \`identifier\` or \`controlName\`; none or several
282
494
 
283
495
  - \`resultsAre: "BAD"\`: any row is a violation and fails the test. \`"GOOD"\`: rows are compliant and the test never fails, so zero rows is a pass on no data. \`effective\` is not a verdict.
284
496
  - What CCM scored: \`get-rule-evaluation-query-results\` with \`latestEvaluation.rawDataKey\`. What is true now: the test's own \`query\` through \`execute-j1ql-query\`, narrowed in its \`WITH\`, never a new query.
497
+ - \`failedEvaluationTests\`: tests whose latest run failed (\`latestEvaluation.tag\` \`EVALUATION_FAILURE\`). They stored no result, and CCM leaves a test with no status out of the control's score, so fix their query.
498
+ - \`exemptions[]\`: the assets exempted from the test (\`create-exemptions\`), each with the \`groupId\` that \`revoke-exemptions\` takes, its \`reason\`, \`status\` and \`expiresOnIso\`; \`exemptionsTruncated\` past 50.
285
499
 
286
500
  ## Attestations and requirements
287
501
 
@@ -316,9 +530,11 @@ When \`pageInfo.hasNextPage\` is true, call again with \`cursor\` set to \`pageI
316
530
 
317
531
  When \`pageInfo.hasNextPage\` is true, call again with \`cursor\` set to \`pageInfo.endCursor\`.
318
532
  `,
319
- "get-integration-job.md": `Return one integration job run: its status, start and end, whether steps were skipped, and the instance and definition it belongs to. Take the job id and its instance id from \`get-integration-jobs\`; \`get-integration-events\` reads the run's logs. Vocabulary: integration job, sync run, job status.
320
- `,
321
- "get-integration-jobs.md": `List integration job runs with their status, timing and results, for one instance, several, a definition or a status. Use it to see whether an integration has synced lately or is failing; \`get-integration-job\` reads one run and \`get-integration-events\` its logs. Vocabulary: integration job, sync, run history, failed sync.
533
+ "get-integration-jobs.md": `List integration job runs with their status, timing and results, for one instance, several, a definition or a status, or read one run by its id. Use it to see whether an integration has synced lately or is failing; \`get-integration-events\` reads a run's logs. Vocabulary: integration job, sync, run history, failed sync, job status.
534
+
535
+ ## One job
536
+
537
+ \`integrationJobId\` with \`integrationInstanceId\` (both from a row of this tool) returns that run alone as a one-row list; the other filters are ignored. Without the instance id the call is an \`invalid_input:\` error and nothing is read.
322
538
 
323
539
  ## Paging
324
540
 
@@ -346,9 +562,7 @@ The handle expires about an hour after the query started. If it expired or was l
346
562
  original query with \`execute-j1ql-query\`; an identical re-run within 5 minutes re-attaches to the
347
563
  same execution. Do not re-issue a query that is still running just to collect it.
348
564
  `,
349
- "get-raw-data-download-url.md": `Return a signed URL for downloading a rule evaluation's raw result set, for a \`rawDataKey\` from \`list-rule-evaluations\`. Use it to hand the user a large result set; to read the rows here, call \`get-rule-evaluation-query-results\` instead. Vocabulary: download, export, raw results.
350
- `,
351
- "get-reference.md": `Return one reference page; read it before writing a query, widget, rule or compliance answer that needs more than a tool description gives. Topics: \`j1ql-language\` (grammar, operators, examples), \`j1ql-discovery\` (finding types, properties, values and verbs), \`widget-types\` (chart types and their RETURN columns), \`widget-settings\` (settings keys by chart type), \`dashboard-layout\` (grid, breakpoints, autoLayout), \`rule-authoring\` (rule payloads, actions, templates), \`compliance-model\` (how CCM scores a control), \`compliance-fields\` (response field glossary). Read-only; needs no account.
565
+ "get-reference.md": `Return one reference page; read it before writing a query, widget, rule or compliance answer beyond what a tool description gives. Topics: \`j1ql-language\` (grammar), \`j1ql-discovery\` (types, properties, values), \`widget-types\` (chart types, RETURN columns), \`widget-settings\` (settings by chart type), \`dashboard-layout\` (grid, autoLayout), \`rule-authoring\` (payloads, actions), \`rule-templates\` (templates, previews), \`compliance-model\` (how CCM scores a control), \`compliance-fields\` (field glossary), \`framework-authoring\` (frameworks, controls, tests, exemptions). Read-only; needs no account.
352
566
  `,
353
567
  "get-rule-details.md": `Read one alert rule in full by its id: queries, condition, actions, schedule, labels, tags, version and remediation steps. Call it before \`update-inline-question-rule\`, which needs every field sent back. Siblings: \`list-rules\` finds the id, \`list-rule-evaluations\` lists the rule's runs. Vocabulary: rule configuration, the query behind an alert, version.
354
568
 
@@ -356,13 +570,17 @@ same execution. Do not re-issue a query that is still running just to collect it
356
570
 
357
571
  \`managedBy\` is \`'ccm'\` for a rule named \`CONTROL-TEST:<test name>\`, otherwise \`null\`. JupiterOne Compliance (CCM) runs each control test as a rule, hidden from this tool and from \`list-rules\`, so a control test's \`referencedRuleId\` from \`get-control\` comes back as not found here. Read that rule's runs with \`list-rule-evaluations\`, and the control and its tests with \`get-control\`. A CCM rule is changed through its control, never with \`update-inline-question-rule\` or \`delete-rule\`, which refuse it.
358
572
  `,
359
- "get-rule-evaluation-details.md": `Read one evaluation run of a rule: each query's status and duration, the condition verdict, and each action's status and logs. \`timestamp\` comes from \`list-rule-evaluations\`. For the entities the run matched, call \`get-rule-evaluation-query-results\` with that run's \`rawDataKey\` instead. Vocabulary: why did the rule fire, did the action run, evaluation log.
573
+ "get-rule-evaluation-details.md": `Read one evaluation run of a rule: each query's status and duration, the condition verdict, and each action's status, logs and \`externalOutputs\` (what it produced outside JupiterOne: a Slack permalink in \`webLink\`, an email's recipients, a ticket). \`timestamp\` comes from \`list-rule-evaluations\`. For the entities the run matched, call \`get-rule-evaluation-query-results\` with that run's \`rawDataKey\` instead. Vocabulary: why did the rule fire, did the action run, evaluation log.
360
574
  `,
361
- "get-rule-evaluation-query-results.md": `Return the entities a rule evaluation matched, from the \`rawDataKey\` in a run's \`rawDataDescriptors\` (\`list-rule-evaluations\`). For a compliance control test's evidence, the key is the \`latestEvaluation.rawDataKey\` that \`get-control\` returns for that test: the assets the test scored on its latest run. Siblings: \`get-rule-evaluation-details\` for the run's conditions and actions, \`get-raw-data-download-url\` for a signed link to the whole set. Vocabulary: matched entities, evidence, affected assets.
575
+ "get-rule-evaluation-query-results.md": `Return the entities a rule evaluation matched, from the \`rawDataKey\` in a run's \`rawDataDescriptors\` (\`list-rule-evaluations\`), or a signed link to download the whole set. For a compliance control test's evidence, the key is the \`latestEvaluation.rawDataKey\` that \`get-control\` returns for that test: the assets the test scored on its latest run. Sibling: \`get-rule-evaluation-details\` for the run's conditions and actions. Vocabulary: matched entities, evidence, affected assets, download, export, raw results.
362
576
 
363
577
  ## Rows
364
578
 
365
- Rows are full entities, so a few dozen can be large; \`limit\` (1–250) cuts them, and a cut result carries \`truncated: true\` and \`total\`, the row count before the cut.
579
+ Rows are full entities, so a few dozen can be large; \`limit\` (1–250) cuts them, and a cut result carries \`truncated: true\` and \`total\`, the row count before the cut. A \`table\` result (a query with RETURN columns) carries each row's entity under \`_meta.byAlias.<alias>.entity\` (\`_id\`, \`_key\`, \`_scope\`, \`_type\`), which is what \`create-exemptions\` takes.
580
+
581
+ ## Download
582
+
583
+ \`format: "downloadUrl"\` returns \`{ rawDataKey, downloadUrl }\` instead of rows: a signed URL for the whole result set, to hand to the user for a large set. \`limit\` does not apply.
366
584
  `,
367
585
  "get-threat-trending.md": `Return the ranked list of trending threats: CVEs that have recently escalated (newly exploited in the wild, weaponized, added to a KEV catalog, or a public PoC appeared), each with its escalation reason, affected vendor and product, commercial-scanner coverage gap and KEV additions. It says what is hot now, not whether this account is affected: pair it with \`check-threat-exposure\` (scanner match) or, for product presence, a J1QL search on the row's \`affectedProduct\`; \`get-threat\` briefs one CVE. Vocabulary: trending, CVE, exploited, KEV, weaponized, PoC, exposure, threat intelligence.
368
586
 
@@ -404,6 +622,53 @@ Needs the account's VulnerabilityManagement entitlement and vulnerability read p
404
622
  ## Example
405
623
 
406
624
  \`{ "cveId": "CVE-2021-44228" }\`
625
+ `,
626
+ "import-framework.md": `Import one of JupiterOne's prebuilt compliance frameworks (CIS benchmarks, SOC 2, ISO 27001, NIST, PCI DSS, DORA) into JupiterOne Compliance (CCM) by its library \`source\` and \`sourceId\`, as \`check-compliance-coverage\` reports them. The backend creates the framework, requirements, controls and tests as a job; imported controls arrive DRAFT, so nothing counts until \`transition-controls\` promotes them. A customer's own program is built with \`create-framework\` and the tools after it. Vocabulary: import, library, prebuilt, template, load framework, CIS, SOC 2, ISO, NIST, PCI.
627
+
628
+ ## Parameters
629
+
630
+ \`source\` is \`J1\` (JupiterOne-authored) or \`UCF\`; \`sourceId\` is the library identifier from \`check-compliance-coverage\` (\`importable[].sourceId\`). \`resourceGroupId\` is optional. The framework's name comes from the library entry.
631
+
632
+ ## Outcomes
633
+
634
+ - \`queued\`: the import job was accepted. \`job\` carries \`status\`, \`initiatedOn\`, \`name\` and \`sourceId\`; the framework may not be listed for a short while. Read progress with \`get-compliance-summary\` (\`importJobs[]\` while it runs, then the framework's \`importStatus\`). A job that ends \`FAILED\` carries the backend's \`message\`; the live-controls limit, if the library content sets controls LIVE, surfaces there and not at this call.
635
+ - \`already_exists\`: a framework with this \`sourceId\` is already loaded; \`framework\` carries its \`id\`, \`name\` and \`url\`, and nothing was started. A normal result, safe on replay.
636
+ - \`import_in_progress\`: an import for this \`sourceId\` is already running; \`job\` says since when.
637
+ - Error \`not_importable:\` no library entry has this \`sourceId\`; \`structuredContent.nearest\` lists the closest library names and ids. Nothing was started.
638
+ - Error \`read_failed:\` the framework list, the library or the import jobs could not be read in time, or the list was cut short; nothing was started. Call again.
639
+ - Error \`interrupted:\` the call was cut off at the 55-second limit and the job may have started; call \`get-compliance-summary\` and read \`importJobs[]\` before importing again.
640
+
641
+ ## Access
642
+
643
+ Needs the Compliance (CCM) entitlement and framework create permission; an access-denied error names the missing one.
644
+
645
+ ## Example
646
+
647
+ \`{ "source": "J1", "sourceId": "cis-aws-foundations-v5" }\`
648
+
649
+ Full reference: get-reference topic framework-authoring
650
+ `,
651
+ "link-controls.md": `Attach existing JupiterOne Compliance (CCM) controls to a requirement so they count toward it, instead of creating duplicates: a control can serve several requirements and frameworks, and a JupiterOne-managed control from a prebuilt framework or the customer's own often already satisfies a new requirement. Find candidates with \`check-compliance-coverage\` (a \`topic\`) or \`list-controls\` (\`search\`); \`create-controls\` is for controls that do not exist yet. Vocabulary: link, map, attach, reuse, existing control, assign control to requirement, shared control.
652
+
653
+ ## Parameters
654
+
655
+ \`requirementId\` and \`controlIds[]\` (1 to 25 exact control ids, \`ccm_c_…\`). Detaching is \`update-control\` with \`requirementIds.remove\`.
656
+
657
+ ## Outcomes
658
+
659
+ Always \`ok\` with one \`items[]\` entry per input id: \`linked\` (with the control's \`name\`, \`state\` and \`url\`), \`already_linked\` (it already served this requirement; nothing changed), \`not_found\` (no non-deleted control has this id; one the graph does not list yet is checked with the API first), \`refused\` (\`reason\`; that check failed) or \`not_attempted\` (the call's budget ran out first). \`linkedCount\`, \`alreadyLinkedCount\`, \`notFoundCount\` summarise; one unknown id never stops the others. A linked control that is DRAFT or REVIEW does not count until promoted, and one with no tests passes only by attestation: \`notes[]\` says which. Safe to repeat: a replay reports \`already_linked\` for everything it linked before.
660
+
661
+ Errors: \`requirement_not_found:\`; \`not_ready:\` (the requirement exists but CCM cannot link to it yet, as happens just after \`create-requirements\`; nothing was written; call again in a minute with the same input); \`invalid_input:\` (empty list, or an id containing a quote); a call cut off at the 55-second limit comes back with items \`interrupted\`, or with no response; calling again with the same input is safe, and linked ones come back \`already_linked\`.
662
+
663
+ ## Access
664
+
665
+ Needs the Compliance (CCM) entitlement and edit permission on each control's resource group; an access-denied error names the missing one.
666
+
667
+ ## Example
668
+
669
+ \`{ "requirementId": "<id>", "controlIds": ["ccm_c_J1_…", "ccm_c_JSON_…"] }\`
670
+
671
+ Full reference: get-reference topic framework-authoring
407
672
  `,
408
673
  "list-accounts.md": `List the JupiterOne accounts the authenticated user can access: each account's \`accountId\`, its
409
674
  \`displayName\` and, when the host can construct one, \`mcpUrl\`, a connector URL pinned to that
@@ -429,11 +694,12 @@ and aggregate the results.
429
694
  `,
430
695
  "list-alerts.md": `List the account's active alerts, each with its level, status, timestamps, the matched record count and the rule that raised it (\`ruleId\`, name, labels). Alerts are what rules produced; for the configuration behind one, call \`get-rule-details\` with its \`ruleId\`, or \`list-rules\`. \`limit\` caps the rows returned and \`total\` is the full active count. Vocabulary: alerts, open alerts, firing, severity, alert level.
431
696
  `,
432
- "list-controls.md": `List JupiterOne Compliance (CCM) controls with the filters CCM's own controls view offers: status, state, framework, organizational unit, owner, attestation, catalog, MITRE technique and text search. Rows are compact (status, state, test counts, framework names) with no descriptions or test queries. Use it to find a control by name or identifier and to list what fails in a framework or org unit. Siblings: \`get-compliance-summary\` for framework numbers, \`get-control\` for one control's detail. Vocabulary: compliance, controls, failing, LIVE, org unit, owner, search, MITRE, audit.
697
+ "list-controls.md": `List JupiterOne Compliance (CCM) controls with the filters CCM's own controls view offers: status, state, framework, org unit, owner, attestation, catalog, MITRE technique and text search (test names too). Rows are compact (status, state, test counts, fail reason, framework names), no descriptions or queries. Use it to find a control by name, identifier or test name, and to list what fails in a framework or org unit. Siblings: \`get-compliance-summary\` for framework numbers, \`get-control\` for one control. Vocabulary: compliance, controls, failing, LIVE, org unit, owner, search, MITRE, audit.
433
698
 
434
699
  ## Filters
435
700
 
436
- - \`status\` on a non-LIVE control is left over from its last evaluation; add \`states: ["LIVE"]\` to list what fails now.
701
+ - \`status\` on a non-LIVE control is left over from its last evaluation; add \`states: ["LIVE"]\` to list what fails now. Drafts count only once \`transition-controls\` promotes them.
702
+ - \`search\` reads control name, description, identifier and id; controls whose test names contain it come back separately in \`testNameMatches\` (control and test, failing tests first, from the graph, first page only, honouring \`states\`, \`status\`, \`frameworkId\` and \`source\`). \`testNameSearch\` says \`ran\`, or why not: \`first_page_only\`, \`unsupported_filters\` (another filter was set), \`time_budget\`, \`read_failed\`.
437
703
  - \`orgUnit\` selects controls whose tests touch an asset in the unit; a row's \`status\` stays the control's overall status. An id (a value with a colon) is used unchecked; a name is searched in up to 10 enabled namespaces.
438
704
  - \`sort\` by \`LAST_EVALUATED_ON\` with \`DESC\` lists never-evaluated controls (\`null\`) first; add \`status: ["PASS", "FAIL"]\` to leave them out.
439
705
  - A cursor works only with the exact filters of the call that returned it; a refused one is an error starting \`cursor_rejected:\` with the API's reason.
@@ -447,7 +713,7 @@ and aggregate the results.
447
713
 
448
714
  ## Rows
449
715
 
450
- \`status\` is \`PASS\`, \`FAIL\` or \`null\` (never evaluated); \`effectiveStatus\` is \`EFFECTIVE\`, \`NO_TESTS\` or \`NO_DATAPOINTS\`; \`failingTests\` counts non-deleted failing tests; \`frameworkNames\` follows \`frameworkIds\`, \`null\` where unresolved.
716
+ \`status\` is \`PASS\`, \`FAIL\` or \`null\` (never evaluated); \`effectiveStatus\` is \`EFFECTIVE\`, \`NO_TESTS\` or \`NO_DATAPOINTS\`; \`failingTests\` counts non-deleted failing tests; \`failReason\` on a FAIL row is \`failing_test\`, \`no_failing_test\` (LIVE with no failing test: an expired attestation, or a status not re-scored since the tests changed; \`get-control\` says which), \`not_live\` (a stale status) or \`tests_unread\`; \`frameworkNames\` follows \`frameworkIds\`, \`null\` where unresolved.
451
717
 
452
718
  ## Access
453
719
 
@@ -491,6 +757,29 @@ Page with \`cursor\` set to \`pageInfo.endCursor\` while \`pageInfo.hasNextPage\
491
757
  ## Why a rule fired
492
758
 
493
759
  \`list-rules\` → \`list-rule-evaluations\` (each run's \`timestamp\` and \`rawDataDescriptors[].rawDataKey\`) → \`get-rule-evaluation-details\` with the timestamp for the run's conditions and actions, or \`get-rule-evaluation-query-results\` with the \`rawDataKey\` for the entities it matched.
760
+ `,
761
+ "preview-rule-actions.md": `Show what a rule's actions would send, without sending anything: renders each action's templates (Slack message, Jira ticket, email, webhook body, tags) against a sample of the rule's current query results, and checks them. Pass \`ruleId\` for a saved rule, or \`question\`, \`operations\`, \`templates\`, \`name\` and \`description\` in the \`create-inline-question-rule\` shape for a draft. Call it before saving a rule that notifies anyone. Vocabulary: dry run, test rule, what would this alert send, render template, action impact.
762
+
763
+ ## What runs
764
+
765
+ Each query runs once; the first 10 rows are kept and \`total\` counts them all. \`fixtures: { <query name>: [rows] }\` renders against those rows instead and does not run that query: use it to reach a branch the data does not. Nothing is created, posted, filed or tagged, and the rule is not saved. Conditions (\`when\`) are not evaluated: every action renders as if its condition held, so compare each condition with the totals before saying an action will fire.
766
+
767
+ ## Reading the result
768
+
769
+ - \`queries[]\`: \`status\` \`ok\` or \`empty\`, \`sampledRows\` of \`total\`; \`estimate: true\` when \`total\` is the query engine's estimate, not a count. Lists such as \`{{queries.query0.data|mapProperty('displayName')|join(', ')}}\` show only the sampled rows; a run holds every row. \`notes\` says so.
770
+ - \`actions[]\`, in rule order, each with its \`path\` (\`operations[0].actions[2]\`) and \`status\`:
771
+ - \`rendered\`: \`rendered\` is the action as sent when its condition holds; \`messages\` are template errors; Slack actions carry \`envelope\`, the whole post (name, description, severity, timestamp, body as truncated).
772
+ - \`render_failed\`: \`error\` says why.
773
+ - \`loop\`: a \`FOR_EACH_ITEM\`; \`iterations\` counts its items when \`items\` is \`{{queries.<name>.data}}\`. Its nested actions follow, rendered for the first sampled row (\`loopRows\` up to 10 for more), each with \`row\` and \`itemBound\`.
774
+ - \`not_run\` (loop with no items), \`skipped\` (\`CREATE_ALERT\` in a loop), \`not_previewable\` (\`JUPITERONE_QUERY\`, a loop in a loop).
775
+ - Fix before saving: \`warnings[]\` (\`{ code, field, message }\`: Slack body over the 1,500-character cap or truncated, missing description, malformed recipient, unknown transform, a named template mapped inside a loop), \`unresolvedPaths\` (fields that rendered \`undefined\`) and \`undefinedReads[]\` (reads that found nothing, with the expression, including ones used as tests, which print nothing).
776
+ - \`{{alertWebLink}}\` renders a sample link and \`param.*\` \`[REDACTED PARAMETER]\`. With \`triggerActionsOnNewEntitiesOnly\`, a run acts only on entities the last run did not see; the preview uses every match.
777
+
778
+ ## Refusals
779
+
780
+ \`query_failed\` (a query failed or was still running; repeating the call re-attaches to a running one), \`render_failed\` (no action rendered), \`invalid_query\` (a draft query does not parse), \`not_found\`, \`read_failed\` (the saved rule could not be read in time; call again), \`no_queries\` (pass the queries as a draft), \`no_actions\`, \`invalid_input\` (neither or both of \`ruleId\` and a draft, a draft without both \`question\` and \`operations\`, or a fixture naming no query). Needs permission to create or update rules.
781
+
782
+ Full reference: get-reference topic rule-templates
494
783
  `,
495
784
  "prompt-build-dashboard.md": `Build a JupiterOne Insights dashboard for: {{objective}}
496
785
 
@@ -702,6 +991,10 @@ Field-by-field glossary of the \`get-compliance-summary\`, \`get-control\` and \
702
991
  framework healthy.
703
992
  - \`importStatus\`: \`COMPLETE\`, \`IN_PROGRESS\`, \`FAILED\` or \`null\`; anything but \`COMPLETE\` means the
704
993
  counts are incomplete.
994
+ - \`frameworkIdsNotFound\` (with \`frameworkIds\`): requested ids no framework has.
995
+ - \`importJobs[]\`: framework imports in flight or failed: \`status\`, \`message\`, \`name\`, \`sourceId\`,
996
+ \`frameworkId\`, \`type\`, \`initiatedOnIso\`, \`completedOnIso\`; absent when none; \`warnings\` says
997
+ when unread.
705
998
  - \`framework\` (with \`frameworkId\`): the scorecard fields, plus:
706
999
  - \`drillSource\`: \`graph\` when \`failingRequirements\`, \`failingControls\` and
707
1000
  \`controls.passingWithoutData\` were read from the JupiterOne graph, which CCM refreshes after
@@ -716,6 +1009,10 @@ Field-by-field glossary of the \`get-compliance-summary\`, \`get-control\` and \
716
1009
  \`states: ["LIVE"]\`.
717
1010
  - \`sections[]\`: per section, \`section\`, \`requirements\`, \`passing\`, \`failing\`; \`null\` when the
718
1011
  framework's counts were not read.
1012
+ - \`requirementList[]\` (with \`includeRequirements\`): every requirement (\`id\`, \`identifier\`,
1013
+ \`title\`, \`section\`, \`priority\`), critical first, then by section and identifier;
1014
+ \`requirementListTruncated\` past 1,000; \`requirementListSkipped\` (\`time_budget\`, \`read_failed\`,
1015
+ \`unsupported_id\`) when not read.
719
1016
  - \`failingRequirements[]\`: every requirement a failing LIVE control satisfies (\`id\`,
720
1017
  \`identifier\`, \`title\`, \`section\`, \`priority\`), critical priority first, then by section and
721
1018
  identifier, each with its \`failingControls[]\` (\`id\`, \`identifier\`, \`name\`). A non-LIVE control
@@ -765,13 +1062,15 @@ Field-by-field glossary of the \`get-compliance-summary\`, \`get-control\` and \
765
1062
  What is not back in time is skipped: \`requirements: []\` with \`requirementsSkipped\` (\`time_budget\`
766
1063
  or \`read_failed\`) and \`requirementsComplete: false\`; \`frameworks: []\` with \`frameworksSkipped\`;
767
1064
  attestations as \`'unavailable'\`.
768
- - \`tests[]\`: each with its \`query\`, \`resultsAre\`, \`effective\`, \`status\`, \`referencedRuleId\` and:
1065
+ - \`tests[]\`: each with its \`query\`, \`resultsAre\`, \`effective\`, \`status\`, \`referencedRuleId\`,
1066
+ \`exemptions[]\` (each exempted asset: \`groupId\`, \`entityId\`, \`entityDisplayName\`, \`reason\`,
1067
+ \`justification\`, \`status\`, \`expiresOnIso\`; \`exemptionsTruncated\` past 50) and:
769
1068
  - \`latestEvaluationStatus\`: \`found\` (\`latestEvaluation\` holds \`rawDataKey\`, \`resultCount\`,
770
1069
  \`evaluatedOn\`, \`timestamp\`, \`tag\`; \`rawDataKey: null\` stored no results and
771
- \`tag: "EVALUATION_FAILURE"\` means the evaluation itself failed); \`none\` (the test is deleted,
772
- has no backing rule, or had no run from 30 days before its \`lastEvaluatedOn\` until now,
773
- \`evaluationsInWindow: 0\`); \`skipped\` (at most 10 rule-backed tests are looked up, failing first
774
- then list order, stopping 20 seconds after the control is read; \`skippedTests\` counts them,
1070
+ \`tag: "EVALUATION_FAILURE"\` is a failed run, counted in \`failedEvaluationTests\`); \`none\` (the
1071
+ test is deleted, has no backing rule, or had no run from 30 days before its \`lastEvaluatedOn\`
1072
+ until now, \`evaluationsInWindow: 0\`); \`skipped\` (at most 10 rule-backed tests are looked up,
1073
+ failing then unscored first, for 20 s after the control is read; \`skippedTests\` counts them,
775
1074
  present only above 0); \`error\` (the lookup failed). For \`skipped\` and \`error\`, read the runs
776
1075
  with \`list-rule-evaluations\` on \`referencedRuleId\`.
777
1076
  - \`evaluationsInWindow\` and \`moreInWindow\` appear when a lookup ran; \`moreInWindow: true\` means
@@ -799,24 +1098,36 @@ Field-by-field glossary of the \`get-compliance-summary\`, \`get-control\` and \
799
1098
  \`FAIL\`, or \`null\` when never evaluated; on a non-LIVE control it is left over from the last
800
1099
  evaluation, not a verdict), \`effectiveStatus\` (\`EFFECTIVE\`, \`NO_TESTS\`, \`NO_DATAPOINTS\`),
801
1100
  \`hasValidAttestation\`, \`owner\`, \`numberOfTests\`, \`failingTests\` (non-deleted failing tests),
802
- \`lastEvaluatedOn\` and \`lastEvaluatedOnIso\` (\`null\` when never evaluated), \`frameworkIds\`,
803
- \`frameworkNames\` (same order, \`null\` where unresolved), \`mitreTechnique\`, \`deleted\`, \`url\`.
1101
+ \`failReason\` (on a FAIL row: \`failing_test\`; \`no_failing_test\` for a LIVE control with no failing
1102
+ test, an expired attestation or a status not re-scored, which \`get-control\` tells apart;
1103
+ \`not_live\`; \`tests_unread\`), \`lastEvaluatedOn\` and \`lastEvaluatedOnIso\` (\`null\` when never
1104
+ evaluated), \`frameworkIds\`, \`frameworkNames\` (same order, \`null\` where unresolved),
1105
+ \`mitreTechnique\`, \`deleted\`, \`url\`.
1106
+ - \`testNameMatches[]\` (with \`search\`): controls whose test names contain the text, from the graph
1107
+ (control and test ids, names, states and statuses, \`url\`), failing tests first, one page
1108
+ (\`testNameMatchesTruncated\` past 250). \`testNameSearch\`: \`ran\`, \`first_page_only\`,
1109
+ \`unsupported_filters\`, \`time_budget\`, \`read_failed\`.
804
1110
  - \`orgUnit\` and \`ouResolution\` (with the \`orgUnit\` filter): \`orgUnit\` is the unit (\`id\`,
805
1111
  \`displayName\`, \`namespace\`, \`resolvedBy\`); \`ouResolution\` is \`id\` or \`name\` when a namespace
806
1112
  search confirmed it, \`id_unverified\` when a value containing a colon was used as an id as given.
807
1113
  A name is searched in up to 10 enabled namespaces: exact id, then exact display name ignoring
808
1114
  case, then a single search hit. The filter selects controls whose tests touch an asset in the
809
1115
  unit; a row's \`status\` stays the control's overall status.
810
- - \`namespacesFailed\` (on \`ambiguous\`): namespaces that could not be searched, so \`candidates\` can
811
- be incomplete.
1116
+ - \`namespacesFailed\` (on \`ambiguous\`): namespaces not searched, so \`candidates\` can be incomplete.
812
1117
  - \`namespaces\`, \`namespacesNotSearched\`, \`units\` (on \`org_unit_not_found\`): the namespaces searched
813
- (\`slug\`, \`name\`, \`failed: true\` where the search failed), how many were disabled or past the
814
- first 10, and up to 10 units per searched namespace (\`id\`, \`displayName\`, \`namespace\`) to choose
815
- from; a namespace that could not list them in time offers none.
1118
+ (\`slug\`, \`name\`, \`failed: true\` where the search failed), how many were not searched, and up to
1119
+ 10 units per searched namespace (\`id\`, \`displayName\`, \`namespace\`) to choose from.
816
1120
  - \`pageInfo.endCursor\` and \`pageInfo.hasNextPage\`: page with them; a cursor works only with the
817
1121
  exact filters of the call that returned it.
818
- - \`timingsMs\`: wall time in milliseconds of each read. "The user aborted a request" is the
819
- 55-second limit: narrow with \`frameworkId\`, \`states: ["LIVE"]\` or a smaller \`limit\`.
1122
+ - \`timingsMs\`: wall time in milliseconds of each read; an aborted request is the 55-second limit:
1123
+ narrow with \`frameworkId\`, \`states: ["LIVE"]\` or a smaller \`limit\`.
1124
+
1125
+ ## Errors
1126
+
1127
+ A call that fails mid-read says which read failed: \`(failed in <phase>)\` after the context, the
1128
+ finished phases and their milliseconds at the end, and \`failedPhase\`, \`runningPhases\`, \`timingsMs\`
1129
+ in \`structuredContent\`. Narrow by that phase: \`stats\` fewer frameworks, \`controls\` a
1130
+ tighter filter, \`attestations\` a \`controlId\`.
820
1131
  `,
821
1132
  "reference/compliance-model.md": `# Compliance model
822
1133
 
@@ -880,8 +1191,9 @@ consults \`effective\`, so a test that saw nothing still passes and counts.
880
1191
  ## LIVE controls only
881
1192
 
882
1193
  Only LIVE controls are evaluated. The status of a DRAFT, REVIEW or RETIRED control is left over
883
- from its last evaluation, not a verdict, and such a control cannot be attested; no tool here
884
- changes a control's state.
1194
+ from its last evaluation, not a verdict, and such a control cannot be attested. \`transition-controls\`
1195
+ changes a control's state, \`evaluate-controls\` runs a draft's tests on demand, and the authoring
1196
+ tools (framework, requirements, controls, tests, exemptions) are in the \`framework-authoring\` manual.
885
1197
 
886
1198
  ## Attestations
887
1199
 
@@ -963,6 +1275,129 @@ and \`moved\` and \`static\` (both \`false\`).
963
1275
  "xl": []
964
1276
  }
965
1277
  \`\`\`
1278
+ `,
1279
+ "reference/framework-authoring.md": `# Framework authoring
1280
+
1281
+ How to build a JupiterOne Compliance (CCM) framework through the authoring tools, from a customer's
1282
+ own compliance material to LIVE controls with tests, and the rules every write tool enforces.
1283
+
1284
+ ## The hierarchy
1285
+
1286
+ \`\`\`
1287
+ Framework create-framework, or import-framework for JupiterOne's library
1288
+ └── Requirement create-requirements (a batch per section)
1289
+ └── Control create-controls (a batch per requirement) or link-controls (reuse)
1290
+ ├── Control test create-control-test (one J1QL query each)
1291
+ └── Attestation create-attestation (evidence no query can read; LIVE controls only)
1292
+ \`\`\`
1293
+
1294
+ A section is a label on a requirement (\`section\`), not an object. A control can serve several
1295
+ requirements and several frameworks; that is what \`link-controls\` is for. Only LIVE controls are
1296
+ evaluated and counted; everything authored here lands DRAFT, and \`transition-controls\` promotes it.
1297
+
1298
+ ## Where each layer comes from
1299
+
1300
+ - **Framework and sections** come from the standard's own structure (SOC 2 criteria groups, ISO
1301
+ domains, PCI requirement families) or, for an internal program, from the customer's control
1302
+ register.
1303
+ - **Requirements** are the obligations the standard states. Keep the standard's identifiers
1304
+ (\`CC6.1\`, \`A.9.1.1\`, \`8.3.1\`) in \`identifier\` and its wording in \`title\`.
1305
+ - **Controls** are what the organisation does to meet a requirement. Keep the customer's own
1306
+ identifiers and names exactly as written; never invent or normalise ids. A requirement often
1307
+ needs several controls (one automated, one attested), and a control the account already holds
1308
+ may satisfy a new requirement: search first with \`check-compliance-coverage\` (a \`topic\`) or
1309
+ \`list-controls\` (\`search\`) and link it, rather than creating a near-duplicate.
1310
+ - **Tests** prove a control from data in the graph. Read all three layers before writing one: the
1311
+ requirement names the domain and how broad it is, the control names the tool or process in use,
1312
+ and the auditor's past evidence requests name the exact data. A control that names no tool or
1313
+ process ("monitoring is in place") cannot be tested yet; ask what enforces it before writing a
1314
+ query.
1315
+
1316
+ ## Tests: GOOD, BAD and zero rows
1317
+
1318
+ Each test runs one J1QL query and declares what its rows mean. \`BAD\`: every row is a violation and
1319
+ the test fails when any row returns; the usual shape for "find what should not exist" (users
1320
+ without MFA, open critical findings). \`GOOD\`: rows are compliant assets and the test never fails;
1321
+ zero rows is a pass on no data, not evidence the control is met, so pair a GOOD test with a BAD
1322
+ one or an attestation. A test is \`effective\` when its query parses and names entity types the
1323
+ account holds; \`effective: false\` after creation means the query names a type this account does
1324
+ not have (a Justworks CrowdStrike test found no data because the integration ingested no alerts).
1325
+
1326
+ Write the query the way the J1QL tools expect: discover the type with \`list-entity-types\`, sample
1327
+ it (\`FIND <type> AS e RETURN e.* LIMIT 5\`), probe stored values before comparing them (casing varies
1328
+ by integration: \`critical\` and \`CRITICAL\` coexist), then run the finished query with
1329
+ \`execute-j1ql-query\` and confirm the rows are the ones the auditor would accept. \`create-control-test\`
1330
+ parses the query and runs it once more before saving, and reports \`rows\` and \`noDatapoints\`. One
1331
+ query per test: a control that needs two checks gets two tests.
1332
+
1333
+ ## Lifecycle: DRAFT, REVIEW, LIVE, RETIRED
1334
+
1335
+ - **DRAFT**: authoring. Excluded from every scorecard and rollup; a framework of drafts reads
1336
+ "0 passing, 0 failing". A draft's tests run only when \`evaluate-controls\` asks; the tests then
1337
+ carry a status, and the control stays unscored until it is LIVE.
1338
+ - **REVIEW**: sign-off before going live. Still excluded.
1339
+ - **LIVE**: evaluated daily, counted in scorecards and against the account's live-controls limit,
1340
+ attestable. Newly LIVE controls read "0 passing, 0 failing" until their first run.
1341
+ - **RETIRED**: excluded; the stored status is cleared on leaving LIVE and re-scored on return.
1342
+
1343
+ Valid moves: DRAFT→REVIEW, REVIEW→DRAFT, REVIEW→LIVE, LIVE→REVIEW, LIVE→RETIRED, RETIRED→LIVE.
1344
+ \`transition-controls\` walks a multi-hop path when asked (DRAFT→LIVE is two moves) and can select a
1345
+ whole framework; moving to RETIRED needs explicit control ids. Whether to pause at REVIEW is the
1346
+ user's choice: say what each state means and ask.
1347
+
1348
+ The proving loop before promotion: \`evaluate-controls\` on the drafts → \`get-control\` (each test's
1349
+ status, \`blockers\`, \`passingWithoutData\`) → fix a query with \`update-control-test\`, add a missing test
1350
+ with \`create-control-test\`, enrich a template control with \`update-control\` → \`transition-controls\`.
1351
+
1352
+ ## The live-controls limit
1353
+
1354
+ Accounts have a ceiling on LIVE controls. Creating a control as LIVE or promoting one past the
1355
+ ceiling is refused with the backend's own text ("Live controls limit reached. Current usage: N,
1356
+ adding: M, limit: L"); the outcome is \`live_limit\`, nothing else in the batch is changed after it,
1357
+ and the way forward is to retire controls or stay in DRAFT. A library import is checked by its job,
1358
+ not at the call: read \`importJobs[]\` on \`get-compliance-summary\` for \`FAILED\` and its message.
1359
+
1360
+ ## What every write tool promises
1361
+
1362
+ - **Plural means batch.** \`create-requirements\`, \`create-controls\`, \`link-controls\`,
1363
+ \`transition-controls\` and \`evaluate-controls\` take arrays and return one outcome per item; one
1364
+ bad item never fails the rest. \`create-control-test\` is single because creating a test runs its
1365
+ query.
1366
+ - **Replays, and when to read back first.** A framework, requirement, control or test that
1367
+ already exists with the same name (controls: anywhere in the account, since one control can
1368
+ serve many requirements) comes back as \`already_exists\` instead of a duplicate; a link,
1369
+ transition or evaluation already done is \`already_linked\`, \`already_in_state\` or a no-op; a
1370
+ delete of something gone is \`not_found\`. Read back with \`get-control\` or
1371
+ \`get-compliance-summary\` before repeating when a call was cut off at the 55-second limit (an
1372
+ \`interrupted:\` error, items \`interrupted\`, or no response), since its writes may have landed.
1373
+ \`create-controls\` and \`create-framework\` find duplicates in reads that lag a create by up to a
1374
+ minute, so resend only what \`nextInputs\` holds, or wait a minute. A repeated \`create-exemptions\`
1375
+ re-files its entities under a new \`groupId\`. After \`transition-controls\`, read a control back
1376
+ before \`update-control\` or \`link-controls\` on it: CCM writes a control back whole from a read
1377
+ that can lag.
1378
+ - **Nothing is irreversible without a separate call.** Creates land DRAFT. \`delete-control-test\`
1379
+ soft-deletes a test. \`delete-control\` is a hard delete that also removes the control's
1380
+ attestations, so it accepts only a DRAFT that was never LIVE and has no attestation; anything
1381
+ else is retired with \`transition-controls\`. Frameworks and requirements are never deleted here.
1382
+ - **Every response says what is next.** \`nextStep\` names the following call and what to confirm
1383
+ with the user before it; \`url\` opens the object in the app.
1384
+
1385
+ ## Exemptions
1386
+
1387
+ A per-asset exception on a control test: \`create-exemptions\` records that specific entities from
1388
+ the test's latest evaluation are \`RISK_ACCEPTED\`, \`NOT_APPLICABLE\`, \`FALSE_POSITIVE\` or covered by a
1389
+ \`COMPENSATING_CONTROL\`, with a justification and an optional expiry, so they stop failing the test
1390
+ on its next run. The entities come from \`get-rule-evaluation-query-results\` on the test's latest
1391
+ \`rawDataKey\`; the test must be eligible (its stored evaluation came from the query it runs now),
1392
+ and re-exempting an entity replaces its earlier exemption. \`revoke-exemptions\` withdraws by
1393
+ decision (\`groupId\`), by entity, or both. An attestation covers a whole control; an exemption
1394
+ covers assets within one test.
1395
+
1396
+ ## Reading a draft
1397
+
1398
+ \`get-control\` on a non-LIVE control reports \`statusExplanation: not_live\` with \`testsRan\`,
1399
+ \`testsPassing\` and \`testsFailing\`: the tests have statuses, the control does not. Report the test
1400
+ results as the proof and the state as the reason there is no score.
966
1401
  `,
967
1402
  "reference/j1ql-discovery.md": `# J1QL discovery
968
1403
 
@@ -1183,6 +1618,14 @@ FIND HostAgent THAT (MONITORS|PROTECTS) Host LIMIT 10
1183
1618
  FIND User THAT !HAS Device LIMIT 10 # users with no device
1184
1619
  \`\`\`
1185
1620
 
1621
+ A negated step matches what is absent, so nothing declared on it or after it can be returned.
1622
+ Alias the entity before the \`!\`; WHERE may still filter the negated edge
1623
+ (\`THAT !ALLOWS AS rule * WHERE rule.ingress = true\`):
1624
+
1625
+ \`\`\`j1ql
1626
+ FIND User AS u THAT !HAS Device RETURN u.email LIMIT 10
1627
+ \`\`\`
1628
+
1186
1629
  Direction arrows follow the verb:
1187
1630
 
1188
1631
  \`\`\`j1ql
@@ -1653,15 +2096,18 @@ type.
1653
2096
  }
1654
2097
  \`\`\`
1655
2098
 
1656
- ## Template variables
2099
+ ## Templates and previewing
1657
2100
 
1658
- - \`{{alertWebLink}}\`: a link to the alert in JupiterOne.
1659
- - \`{{queries.<name>.data}}\`: the entities the query returned; \`{{queries.<name>.total}}\`: their
1660
- count.
1661
- - \`|mapProperty('field')\` picks one field from each entity and \`|join('separator')\` joins the
1662
- list: \`{{queries.query0.data|mapProperty('displayName')|join(', ')}}\` is a comma-separated list
1663
- of names.
1664
- - List shapes: HTML \`join('<br>* ')\`, Markdown \`join('\\n- ')\`, plain text \`join('\\n* ')\`.
2101
+ Action text is built with \`{{ }}\` expressions over the query results:
2102
+ \`{{queries.query0.data|mapProperty('displayName')|join(', ')}}\` is a comma-separated list of names,
2103
+ \`{{queries.query0.total}}\` their count and \`{{alertWebLink}}\` a link to the alert. List shapes: HTML
2104
+ \`join('<br>* ')\`, Markdown \`join('\\n- ')\`, plain text \`join('\\n* ')\`. Topic \`rule-templates\` has
2105
+ the variables, every transform, the patterns, what each action wraps around the text, and how to
2106
+ read a preview.
2107
+
2108
+ Before saving a rule that notifies anyone, render it with \`preview-rule-actions\` (the draft's
2109
+ \`question\`, \`operations\`, \`templates\`, \`name\` and \`description\`, or a saved rule's \`ruleId\`), show
2110
+ the user what it will send, and fix its \`warnings\`, \`unresolvedPaths\` and \`undefinedReads\`.
1665
2111
 
1666
2112
  ## Integration dependencies
1667
2113
 
@@ -1692,6 +2138,116 @@ the integration's definition with \`get-integration-definitions\`, list the acco
1692
2138
  }
1693
2139
  ]
1694
2140
  \`\`\`
2141
+ `,
2142
+ "reference/rule-templates.md": `# Rule templates
2143
+
2144
+ How action text is built from query results, what each action wraps around it, and how to read a
2145
+ \`preview-rule-actions\` result. Payloads and action fields are in topic \`rule-authoring\`.
2146
+
2147
+ ## Expressions
2148
+
2149
+ Any string field of an action can hold \`{{ expression }}\`. Expressions are JEXL: \`a ? b : c\`,
2150
+ \`&&\`, \`||\`, \`!\`, \`==\`, \`!=\`, \`>\`, \`<\`, \`+\` (adds numbers, joins strings), member access
2151
+ (\`queries.query0.data[0].entity.displayName\`), and array and object literals. A field that is one
2152
+ expression and nothing else takes the expression's value (a number, a list); otherwise the result
2153
+ is text.
2154
+
2155
+ There is no function to print a whole object: \`{{queries.query0.data[0].properties}}\` prints
2156
+ \`[object Object]\`, so name each field. \`json\`, \`stringify\`, \`keys\`, \`toJSON\`, \`date\`, \`substring\`
2157
+ and \`split\` do not exist.
2158
+
2159
+ ## Variables
2160
+
2161
+ - \`queries.<name>.data\`: the query's rows; \`queries.<name>.total\`: how many rows it returned.
2162
+ - \`alertWebLink\`: a link to the alert in JupiterOne.
2163
+ - \`evaluationBeginOn\`: when the run started, in epoch milliseconds.
2164
+ - \`param.<name>\`: an account parameter; a preview shows \`[REDACTED PARAMETER]\`.
2165
+ - Inside a named template called by \`mapTemplate\`: \`item\` (the element), \`itemIndex\`, \`itemCount\`.
2166
+ - Inside \`FOR_EACH_ITEM\`: the loop variable named by \`itemRef\` (default \`item\`). \`items\` is
2167
+ \`{{queries.<name>.data}}\` or a literal list; a query name with \`-\` needs brackets,
2168
+ \`{{queries['open-findings'].data}}\`, or JEXL reads it as subtraction. A named template called
2169
+ inside the loop does not see the loop variable, only its own \`item\`.
2170
+
2171
+ Row shapes differ. A query with no RETURN gives \`{ id, entity, properties }\` rows: read
2172
+ \`data[0].entity.displayName\` or \`data[0].properties.<name>\`. A query with RETURN gives flat rows
2173
+ keyed by alias: \`data[0].<alias>\`. \`mapProperty\` and \`mapTemplate\` flatten entity rows, so
2174
+ \`item.displayName\` and \`mapProperty('displayName')\` work on both.
2175
+
2176
+ ## Transforms
2177
+
2178
+ Applied with \`|\`: \`{{queries.query0.data|mapProperty('displayName')|join(', ')}}\`.
2179
+
2180
+ | Transform | Does |
2181
+ | ------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
2182
+ | \`mapProperty('p')\`, \`mapProperty('p', 'q')\` | Each row's \`p\`; with several names, an object per row |
2183
+ | \`join(sep)\` | Joins a list into text |
2184
+ | \`length\` | A list's length; 0 when not a list |
2185
+ | \`capitalize\` | Upper-cases the first letter |
2186
+ | \`mapTemplate('name')\` | Renders the named template once per element (see Variables) |
2187
+ | \`merge(list, ...)\` | Concatenates lists: \`queries.a.data\\|merge(queries.b.data)\` |
2188
+ | \`uniquePropertyValues('p')\` | The distinct, non-empty values of \`p\` |
2189
+ | \`queryDataDifference('name')\` | \`[a, b]\\|queryDataDifference('name')\`: rows of \`b\` not in \`a\`, by \`_id\` or \`_key\`, also stored as \`name\` |
2190
+ | \`dateAdd(amount, unit)\` | Shifts a date; units \`hour\`, \`day\`, \`week\`, \`month\`, \`year\` (plural too); returns ISO 8601 |
2191
+ | \`formatDate(format, timeZone)\` | dayjs format, default \`YYYY-MM-DD\`; IANA zone, default \`UTC\` |
2192
+
2193
+ \`dateAdd\` and \`formatDate\` accept epoch milliseconds, a numeric string or ISO 8601, and give
2194
+ nothing for anything else: \`{{evaluationBeginOn|dateAdd(30, 'days')|formatDate('MMM D, YYYY', 'America/New_York')}}\`.
2195
+
2196
+ ## Missing data
2197
+
2198
+ A read that finds nothing is \`undefined\`. Printed, it renders the text \`undefined\`. Used as a test,
2199
+ it silently takes the false branch: \`{{queries.j1.data[0].mfa ? 'MFA on' : 'MFA off'}}\` says
2200
+ "MFA off" for someone the \`j1\` query does not return. Test for the row first:
2201
+ \`{{queries.j1.total > 0 ? (queries.j1.data[0].mfa ? 'MFA on' : 'MFA off') : 'not in J1'}}\`.
2202
+
2203
+ ## Patterns
2204
+
2205
+ - **Components.** A named template is a reusable block, and a literal list of objects feeds it:
2206
+ \`templates: { "row": "<tr><td>{{item.sys}}</td><td>{{item.ok ? 'yes' : 'no'}}</td></tr>" }\`,
2207
+ body \`{{[{sys: 'GitHub', ok: queries.gh.total > 0}, {sys: 'Okta', ok: queries.okta.total > 0}]|mapTemplate('row')|join('')}}\`.
2208
+ Templates can read \`queries\` and call \`mapTemplate\` on other templates.
2209
+ - **One row per person.** The same person seen by several integrations is several entities. Group
2210
+ with a RETURN to get one row each, with the count as a column:
2211
+ \`FIND User WITH email = 'a@example.com' AS u RETURN u.username AS handle, count(u) AS seenBy\`.
2212
+ - **Lists.** HTML \`join('<br>* ')\`, Slack and Markdown \`join('\\n- ')\`, plain text \`join('\\n* ')\`.
2213
+ - **Several queries, one message.** Name each query and build one body from all of them rather than
2214
+ one action per query.
2215
+
2216
+ ## What each action sends
2217
+
2218
+ - **Slack** (\`SEND_SLACK_MESSAGE\`) posts the text \`*JupiterOne Alert - <rule name>*\` and one
2219
+ attachment: the rule name (linked to the alert when the run raises one), \`*Description*: <rule
2220
+ description>\`, \`*Severity*: <level>\` (the action's \`severity\`, else the raised alert's level;
2221
+ absent with neither), \`*Timestamp*: <run start, UTC>\`, then the body. The colour follows the level:
2222
+ CRITICAL and HIGH \`#AF2418\`, MEDIUM \`#EF9436\`, LOW \`#DFBF40\`, INFO \`#6699ff\`, none \`#000000\`. A
2223
+ rule with no description posts \`*Description*: null\`. The body template may be at most 1,500
2224
+ characters (the save rejects longer), and a rendered body over 1,500 is cut to 1,497 plus \`...\`.
2225
+ Bodies use Slack mrkdwn: \`*bold*\`, \`_italic_\`, \`<url|text>\`.
2226
+ - **Email** (\`SEND_EMAIL\`): the body, HTML allowed, goes inside JupiterOne's alert email. No length
2227
+ cap.
2228
+ - No other action type caps a field's length.
2229
+
2230
+ ## Reading a preview
2231
+
2232
+ \`preview-rule-actions\` renders against a 10-row sample per query and sends nothing.
2233
+
2234
+ - \`envelope\` (Slack): the post as built above. Angle-bracketed values are known only to a live
2235
+ run; pass \`name\` and \`description\` with a draft to fill them.
2236
+ - \`warnings[]\`, each \`{ code, field, message }\`: \`slack-body-over-limit\` (the save will fail),
2237
+ \`slack-body-truncated\` (the post is cut), \`description-missing\`, \`recipient-malformed\`,
2238
+ \`unknown-transform\` (lists the transforms that exist), \`loop-template-preview\` (a named template
2239
+ mapped inside a loop, which the preview cannot render exactly: its renderer lays the loop row
2240
+ over the template's own \`item\`).
2241
+ - \`unresolvedPaths\`: fields that rendered \`undefined\` or nothing.
2242
+ - \`undefinedReads[]\`, each \`{ field, expression, path, query, emptyQuery }\`: reads that found
2243
+ nothing in the sample, including ones used as tests, which render no \`undefined\` at all. A read
2244
+ guarded with \`||\` or a ternary is expected to, but check which branch it took. Reads of \`item\`
2245
+ inside a named template, and of a query a \`JUPITERONE_QUERY\` action adds at run time, are not
2246
+ checked.
2247
+ - \`fixtures: { <query name>: [rows] }\` renders against those rows instead of running the query: use
2248
+ it to reach a branch the data does not, without pulling real people's records.
2249
+ - \`loopRows\` (1–10) renders each \`FOR_EACH_ITEM\` nested action for that many sampled rows; each
2250
+ entry carries its \`row\`.
1695
2251
  `,
1696
2252
  "reference/widget-settings.md": `# Widget settings
1697
2253
 
@@ -2079,6 +2635,27 @@ Needs the Compliance (CCM) entitlement and edit permission on the control's reso
2079
2635
  \`{ "attestationId": "<id from get-control>" }\`
2080
2636
 
2081
2637
  Full reference: get-reference topic compliance-model
2638
+ `,
2639
+ "revoke-exemptions.md": `Withdraw exemptions on a JupiterOne Compliance (CCM) control test, by decision (\`groupId\` from \`create-exemptions\`), by entity, or both (the intersection), so the assets fail the test again on its next run. A revoke is a hard delete, and by \`entityIds\` alone it removes whoever's exemption those assets carry; prefer \`groupId\`. The test's whole set cannot be revoked in one call; name the decision or the entities. Exemptions and their groups are listed on \`get-control\` (\`tests[].exemptions\`). Vocabulary: revoke exemption, remove exception, un-exempt, expire waiver, reinstate.
2640
+
2641
+ ## Parameters
2642
+
2643
+ \`controlTestId\` and at least one of \`groupId\` and \`entityIds[]\` (graph \`_id\`s, 1 to 50).
2644
+
2645
+ ## Outcomes
2646
+
2647
+ - \`revoked\`: \`count\` of exemptions withdrawn, the test's \`name\`, the control's \`id\`, \`name\`, \`url\`, and \`note\` that the status changes on the next evaluation. A \`count\` of 0 means nothing matched the selector and nothing changed. It is not proof the assets are unexempted: a re-file moves them to a new \`groupId\`, so confirm on the test's \`exemptions\` in \`get-control\`.
2648
+ - Errors: \`test_not_found:\`; \`invalid_input:\` (neither selector); \`read_failed:\` (the test could not be read in time; nothing was revoked); \`interrupted:\` (cut off at the 55-second limit and may have landed; read the test's \`exemptions\` on \`get-control\` to see what is still active before calling again).
2649
+
2650
+ ## Access
2651
+
2652
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
2653
+
2654
+ ## Example
2655
+
2656
+ \`{ "controlTestId": "<id>", "groupId": "<groupId from create-exemptions>" }\`
2657
+
2658
+ Full reference: get-reference topic framework-authoring
2082
2659
  `,
2083
2660
  "server-instructions.md": `JupiterOne is the user's security asset graph: cloud, identity, device, code and vulnerability data as
2084
2661
  entities and relationships, queried with J1QL. Use these tools for any question about the user's real
@@ -2109,7 +2686,7 @@ every tool; list-accounts returns the ids.
2109
2686
 
2110
2687
  ## Paging differs by tool
2111
2688
  J1QL tools return a top-level cursor with hasMore; list tools (rules, integrations, jobs, events,
2112
- controls) return pageInfo.endCursor with hasNextPage. A repeat without the cursor re-returns page one.
2689
+ controls) return pageInfo.endCursor with hasNextPage; a repeat without the cursor is page one.
2113
2690
 
2114
2691
  ## Dashboards
2115
2692
  Chart renderers read specific RETURN aliases; the widget tools refuse a query whose aliases cannot
@@ -2127,19 +2704,153 @@ rawDataKey; update-inline-question-rule and delete-rule refuse rules a control t
2127
2704
  ## Threat intelligence vs this environment
2128
2705
  get-threat is intelligence about a CVE; get-threat-trending is what escalated ecosystem-wide; only
2129
2706
  check-threat-exposure reads this account's graph. A trending CVE says nothing about exposure until
2130
- checked. These need the VulnerabilityManagement entitlement; their access-denied is not a revoked
2131
- account.
2707
+ checked. These need the VulnerabilityManagement entitlement; access-denied there is not a revoked account.
2132
2708
 
2133
2709
  ## Compliance (CCM)
2134
- CCM is the source of truth for control status: answer posture with get-compliance-summary,
2135
- list-controls, get-control and the attestation tools, not by re-deriving pass/fail in J1QL. A failing
2136
- test fails its control; an expired, unrevoked attestation fails it; only LIVE controls are evaluated.
2137
- Reads lag writes by up to a minute: re-read, never re-create. Give the url when naming a framework or
2138
- control. Graph recipes: get-reference compliance-model.
2710
+ CCM is the source of truth for control status: use get-compliance-summary, list-controls, get-control
2711
+ and the attestation tools, not J1QL; a standard or named control goes to check-compliance-coverage
2712
+ first. A failing test fails its control; an expired, unrevoked attestation fails it; only LIVE
2713
+ controls count. Authoring lands DRAFT; link an existing control before creating one;
2714
+ transition-controls promotes. Reads lag writes: re-read, never re-create.
2139
2715
 
2140
2716
  ## Permissions are advisory
2141
2717
  test-connection's permissions understate real access (measured); use them to explain a failure, never
2142
2718
  to refuse work. Attempt the call; the API is the authority.
2719
+ `,
2720
+ "skills/author-compliance-framework/SKILL.md": `---
2721
+ name: author-compliance-framework
2722
+ description: Build a JupiterOne Compliance (CCM) framework from a customer's own compliance material (a control register, auditor evidence requests, a standard's text) through the authoring tools, one reviewed layer at a time, landing everything DRAFT with validated tests.
2723
+ ---
2724
+
2725
+ # Author a compliance framework
2726
+
2727
+ You are helping a compliance lead turn their compliance material into a working CCM framework.
2728
+ Work one layer at a time and show each layer before you create the next; the user reviews in the
2729
+ conversation, and nothing you create counts until they promote it. If they have not said which
2730
+ standard it is or what material they have, ask.
2731
+
2732
+ ## 1. Understand before building
2733
+
2734
+ - Ask for, or read from what was shared: the standard they are tracking, their control register
2735
+ (ids, names, descriptions, owners, how each is evidenced today), past audit evidence requests,
2736
+ and the tools in their stack (identity, cloud, endpoint, vulnerability, code, network).
2737
+ - Keep their identifiers and names exactly as written. Do not invent, renumber or "improve" them.
2738
+ - Run \`check-compliance-coverage\` with the standard's name. \`importable\` means JupiterOne ships a
2739
+ prebuilt version: offer \`import-framework\` and then tune it, instead of building from scratch.
2740
+ \`covered\` or \`partial\` means it is already here: work with what exists.
2741
+ - Confirm what is queryable: \`get-integration-instances\` for the connected integrations and
2742
+ \`list-entity-types\` for the data the account holds. A control whose evidence lives in a tool that
2743
+ is not connected can only be attested, not tested.
2744
+
2745
+ ## 2. Structure
2746
+
2747
+ - Propose the sections and requirements (from the standard, or from their register's domains and
2748
+ obligations) and show the list. On their go-ahead, \`create-framework\`, then
2749
+ \`create-requirements\` with one batch per section: \`title\` is the obligation in the standard's
2750
+ words, \`identifier\` is the standard's id, \`section\` groups them, \`priority\` where the standard or
2751
+ the customer ranks them.
2752
+
2753
+ ## 3. Controls: reuse before create
2754
+
2755
+ - For each requirement, look for a control the account already has (\`check-compliance-coverage\`
2756
+ with a \`topic\`, or \`list-controls\` with \`search\`): JupiterOne-managed controls from a prebuilt
2757
+ framework, or the customer's own. Show the matches; on agreement, \`link-controls\` attaches them
2758
+ to the requirement.
2759
+ - Create the rest with \`create-controls\`, one batch per requirement, in their own words: \`name\`,
2760
+ \`identifier\`, \`description\` (what the organisation does, naming the tool or process), \`owner\`,
2761
+ \`remediation\`. Leave \`state\` at DRAFT. A \`already_exists\` item names a control elsewhere in the
2762
+ account: link it rather than creating a second one.
2763
+ - Classify each control: automated (a query can prove it), attestation-only (a policy, a review,
2764
+ a document), or both.
2765
+
2766
+ ## 4. Tests, one at a time
2767
+
2768
+ For each automated control: read the requirement (the domain and how broad it is), the control
2769
+ (the tool or process), and the auditor's evidence request (the exact data). Then:
2770
+
2771
+ 1. Discover the entity type (\`list-entity-types\`), sample it, probe stored values (casing varies).
2772
+ 2. Write the query and run it with \`execute-j1ql-query\`; confirm the rows are what an auditor
2773
+ would accept. Narrow with \`WITH\`, never broaden to make rows appear.
2774
+ 3. Decide \`resultsAre\`: \`BAD\` when rows are violations (the test fails on any row), \`GOOD\` when
2775
+ rows are compliant assets (the test never fails; zero rows proves nothing). Prefer a BAD test;
2776
+ pair a GOOD one with it when "does the data exist at all" matters.
2777
+ 4. \`create-control-test\` with the control id, a name the auditor would recognise, the query and
2778
+ \`resultsAre\`. Read \`rows\`, \`noDatapoints\` and \`effective\` in the response; a test that saw no
2779
+ data or names an unknown type needs a different query or a connected integration, not a pass.
2780
+
2781
+ Show the user each test's rows before moving on. A control that needs two checks gets two tests.
2782
+ Attestation-only controls get no test; note them for \`create-attestation\` once they are LIVE.
2783
+
2784
+ ## 5. Prove and hand over
2785
+
2786
+ - \`evaluate-controls\` on the drafts, then \`get-control\` on each: the tests now carry statuses;
2787
+ the control stays unscored until LIVE. Separate real failures (fix the environment) from
2788
+ environment mismatches (fix the query with \`update-control-test\`) and missing data (connect or
2789
+ enable the integration).
2790
+ - Summarise what was built: the framework \`url\`, requirements, controls created and linked,
2791
+ tests and their results, and the attestation-only controls. Promotion is a separate step with
2792
+ the user's say-so: the \`promote-compliance-framework\` workflow, or \`transition-controls\`.
2793
+
2794
+ Rules that hold throughout: every write lands DRAFT; \`already_exists\` means use what is there;
2795
+ after a call that was cut off (an \`interrupted:\` error, items \`interrupted\`, or no response) read
2796
+ back before repeating, and resend only what \`nextInputs\` holds; the manual \`framework-authoring\`
2797
+ on \`get-reference\` has the details.
2798
+ `,
2799
+ "skills/promote-compliance-framework/SKILL.md": `---
2800
+ name: promote-compliance-framework
2801
+ description: Take a JupiterOne Compliance (CCM) framework whose controls sit in DRAFT or REVIEW through evaluation, review and promotion to LIVE, explaining what each state means and letting the user decide how far to go.
2802
+ ---
2803
+
2804
+ # Promote a compliance framework
2805
+
2806
+ You are helping a compliance lead decide which of a framework's controls should go live, and
2807
+ getting them there. If they have not said which framework, ask.
2808
+
2809
+ ## 1. See what is there
2810
+
2811
+ - \`get-compliance-summary\` with the framework's name or id: a framework whose controls are all
2812
+ DRAFT reads "0 passing, 0 failing" because drafts are excluded from every count, not because
2813
+ nothing has been checked.
2814
+ - \`list-controls\` for the framework with \`states: ["DRAFT", "REVIEW"]\`: which controls are waiting,
2815
+ which have tests (\`numberOfTests\`) and which have none (\`effectiveStatus: NO_TESTS\`).
2816
+
2817
+ ## 2. Prove the drafts
2818
+
2819
+ - \`evaluate-controls\` on the drafts with tests (batches of up to 25). Results take minutes.
2820
+ - \`get-control\` on each: a draft's tests now carry \`status\`, while the control itself stays
2821
+ unscored (\`statusExplanation: not_live\`, with \`testsRan\`, \`testsPassing\`, \`testsFailing\`). Read
2822
+ \`passingWithoutData\` and each test's \`effective\`: a pass on no data is not evidence.
2823
+ - Sort what you find into real failures (the environment needs fixing; the control can still go
2824
+ live and will report the failure), query mistakes (\`update-control-test\` with a corrected query,
2825
+ then evaluate again), and missing data (an integration to connect or enable).
2826
+ - Controls with no tests pass only by attestation once LIVE; say which ones those are.
2827
+
2828
+ ## 3. Explain the states, then ask
2829
+
2830
+ Tell the user what each move means before moving anything:
2831
+
2832
+ - **REVIEW**: a sign-off stage; still excluded from scorecards.
2833
+ - **LIVE**: evaluated daily, counted in every scorecard, counts against the account's
2834
+ live-controls limit, can be attested. Newly LIVE controls read "0 passing, 0 failing" until their
2835
+ first run.
2836
+ - **RETIRED**: excluded; the stored status is cleared and re-scored if the control returns to LIVE.
2837
+
2838
+ Ask whether they want everything LIVE now, a REVIEW stop first, or only the controls whose tests
2839
+ they have seen. Retiring is by explicit control ids, never framework-wide.
2840
+
2841
+ ## 4. Promote
2842
+
2843
+ - \`transition-controls\` with \`frameworkId\` and the target state they chose (the tool walks
2844
+ DRAFT→REVIEW→LIVE when asked for LIVE), or with the chosen \`controlIds\`. Read \`transitioned\`,
2845
+ \`skipped\`, \`refused\` and \`remaining\`; while the result has \`nextInputs\`, make each of those
2846
+ calls and repeat with their results.
2847
+ - A \`live_limit\` refusal carries the backend's own numbers: stop, report them, and offer to retire
2848
+ controls or keep the rest in DRAFT.
2849
+ - Afterwards \`get-compliance-summary\` again, with the note that newly LIVE controls show no result
2850
+ until their first evaluation.
2851
+
2852
+ Every state change is reversible except that leaving LIVE clears the stored status; nothing here
2853
+ deletes anything. Details: the manual \`framework-authoring\` on \`get-reference\`.
2143
2854
  `,
2144
2855
  "test-connection.md": `Test the connection to JupiterOne and the caller's access to the target account, and report who
2145
2856
  the caller is: the credential type, the signed-in user's email and a summary of permissions. Call
@@ -2163,6 +2874,37 @@ sign-in can access. If tools take an \`accountId\`, retry with one of those; the
2163
2874
  needs no change. If the connection is pinned, the list carries each account's connector URL;
2164
2875
  relay it so the user can fix the connector's account binding. Do not loop on re-authentication:
2165
2876
  if the text says the pinned account is inaccessible, re-authenticating will not fix it.
2877
+ `,
2878
+ "transition-controls.md": `Move JupiterOne Compliance (CCM) controls between lifecycle states in a batch, by id or for a whole framework: promote drafts to REVIEW or LIVE, send a control back, or retire one. Authored and imported controls land DRAFT and are excluded from every scorecard until they are LIVE, so this is the call that makes a framework count; which state to go to is the user's decision. Siblings: \`evaluate-controls\` proves drafts first, \`list-controls\` with \`states\` shows what is waiting. Vocabulary: promote, go live, make live, activate, bulk, publish controls, review, retire, draft to live, state.
2879
+
2880
+ ## States
2881
+
2882
+ - \`DRAFT\`: authoring; excluded from counts; tests run only on request.
2883
+ - \`REVIEW\`: sign-off; still excluded.
2884
+ - \`LIVE\`: evaluated daily, counted everywhere, counts against the live-controls limit, attestable. Newly LIVE controls read "0 passing, 0 failing" until their first run.
2885
+ - \`RETIRED\`: excluded; the stored status is cleared on leaving LIVE and re-scored on return.
2886
+
2887
+ Valid moves: DRAFT→REVIEW, REVIEW→DRAFT, REVIEW→LIVE, LIVE→REVIEW, LIVE→RETIRED, RETIRED→LIVE. A request for a state two moves away (DRAFT to LIVE) walks both, landing the first move across the whole batch before the second so a cut-off call leaves every control in a consistent state. A path through LIVE toward another state (DRAFT or REVIEW to RETIRED, RETIRED to REVIEW or DRAFT) is not taken: promote to LIVE first if that is what the user wants.
2888
+
2889
+ ## Parameters
2890
+
2891
+ Exactly one of \`controlIds[]\` (1 to 25 exact ids) or \`frameworkId\` (every control of the framework in one of \`fromStates\`, default \`["DRAFT", "REVIEW"]\`); \`targetState\`; optional \`note\` recorded on each transition. With \`controlIds\`, a control moves from whatever state it is in unless \`fromStates\` is given. \`RETIRED\` is accepted only with \`controlIds\`. Every move is decided on the state the API holds now, never on the graph's.
2892
+
2893
+ ## Outcomes
2894
+
2895
+ Always \`ok\`: \`transitioned[]\`, one entry per move (\`id\`, \`name\`, \`from\`, \`to\`, \`url\`; DRAFT to LIVE is two), \`skipped[]\` (\`already_in_state\`, \`not_in_from_states\`, \`passes_through_live\`, \`not_found\`, or \`invalid_transition\`, each with the control's current state), \`refused[]\` (\`reason\` with the backend's text, including a control whose read was denied; a \`live_limit\` refusal carries its numbers verbatim and stops the rest), \`interrupted[]\` (moves cut off mid-flight that may still land; each comes back in \`nextInputs\` from either state unless the live-controls limit stopped the call, and \`nextStep\` says to wait for the state to settle first), and \`remaining\`: the controls not reached or not finished within the call's budget, listed in \`remainingControlIds\`. \`nextInputs\` holds the calls that finish the job: make each, then repeat with each result's \`nextInputs\` until there are none. A control this call moved comes back by id with only the state it was left in, so a follow-up that reads it stale moves nothing; a framework pass comes back as the framework, re-checked control by control. \`selectionComplete: false\` means the framework had more controls than one call selects. \`nextStep\` says so, and names \`get-compliance-summary\` once everything is LIVE.
2896
+
2897
+ Errors: \`invalid_input:\` (both or neither selector, an unknown state, RETIRED without ids); \`framework_not_found:\`; a call cut off at the 55-second limit can return no response at all: read the controls back with \`get-control\` or \`list-controls\` \`states\`, then call again; every move is decided on the state the API reads at that moment. After a move, read a control back with \`get-control\` before \`update-control\` or \`link-controls\` on it: CCM writes a control back whole from a read that can lag (\`note\` says so).
2898
+
2899
+ ## Access
2900
+
2901
+ Needs the Compliance (CCM) entitlement and edit permission on each control's resource group; an access-denied error names the missing one.
2902
+
2903
+ ## Example
2904
+
2905
+ \`{ "frameworkId": "<id>", "targetState": "LIVE" }\`
2906
+
2907
+ Full reference: get-reference topic framework-authoring
2166
2908
  `,
2167
2909
  "update-attestation.md": `Change an existing attestation on a JupiterOne Compliance (CCM) control, most often to renew it with a later \`expiresOn\`; an expired attestation given a future expiry is active again, so renewing works before and after it lapses. Find the attestation \`id\` in \`get-control\` (\`attestations\`) or \`get-compliance-summary\` (\`expiringAttestations\`, \`expiredAttestations\`). Siblings: \`create-attestation\` records a new one, \`revoke-attestation\` withdraws one for good. Vocabulary: compliance, renew, extend, expiry, attestation, evidence, exception, audit.
2168
2910
 
@@ -2187,6 +2929,54 @@ Needs the Compliance (CCM) entitlement and edit permission on the control's reso
2187
2929
  \`{ "attestationId": "<id from get-control>", "expiresOn": "2028-06-30" }\`
2188
2930
 
2189
2931
  Full reference: get-reference topic compliance-model
2932
+ `,
2933
+ "update-control-test.md": `Change an existing test on a JupiterOne Compliance (CCM) control: its query, whether rows are \`GOOD\` or \`BAD\`, its name or description. The usual reason is a query that measured the wrong thing (an unconnected tool, a value stored in another casing, too broad a scope); prove the new query with \`execute-j1ql-query\` first. A changed query is parsed and run before it is saved, like \`create-control-test\`. Test ids come from \`get-control\` (\`tests[].id\`). \`delete-control-test\` removes a test; \`create-control-test\` adds one. Vocabulary: fix test, edit query, change resultsAre, rename test, tune.
2934
+
2935
+ ## Parameters
2936
+
2937
+ \`controlTestId\` plus at least one of \`testName\`, \`query\`, \`resultsAre\` (\`GOOD\` or \`BAD\`), \`description\`. One query per test.
2938
+
2939
+ ## Preflight
2940
+
2941
+ When \`query\` changes it is parsed locally and run once within the call's budget, as in \`create-control-test\`. A syntax error, or a run the engine rejects outright, returns \`invalid_input:\` with \`structuredContent.suggestion\`; nothing is saved. Otherwise \`rows\`, \`noDatapoints\` and \`queryRun\` (\`ran\`, \`skipped_deadline\`, \`error\`) are advisory, and an \`error\` comes with a \`nextStep\`.
2942
+
2943
+ ## Outcomes
2944
+
2945
+ - \`updated\`: \`test\` as saved (\`id\`, \`name\`, \`resultsAre\`, \`effective\`, \`referencedRuleId\`), the control's \`id\`, \`state\`, \`url\`. The stored evaluation and the control's status are from the previous query until the next run: \`evaluate-controls\` on a draft, or the daily run on a LIVE control. Exemptions apply to evaluations of the query they were filed against, so a changed query may need a new evaluation before \`create-exemptions\` is eligible. Safe to repeat.
2946
+ - \`not_found\`: no non-deleted test has this id; nothing changed.
2947
+ - Errors: \`invalid_input:\` (no field to change, or a query that cannot run); \`read_failed:\` (the test could not be read in time; nothing changed; call again); \`interrupted:\` (cut off at the 55-second limit and may have landed; read back with \`get-control\` before repeating).
2948
+
2949
+ ## Access
2950
+
2951
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
2952
+
2953
+ ## Example
2954
+
2955
+ \`{ "controlTestId": "<id from get-control>", "query": "FIND wiz_finding WITH severity = 'critical' AND status = 'OPEN' AS f RETURN f.displayName" }\`
2956
+
2957
+ Full reference: get-reference topic framework-authoring
2958
+ `,
2959
+ "update-control.md": `Change a JupiterOne Compliance (CCM) control's fields: name, description, identifier, catalog, owner, remediation, exception process, MITRE technique, resource group, and the requirements it serves. Use it to enrich a template control with the customer's own wording and ids, to fix a mistake, or to detach a control from a requirement. It never changes the lifecycle state (\`transition-controls\`) or the tests (\`create-\`, \`update-\`, \`delete-control-test\`). Vocabulary: edit control, rename, update description, remediation, owner, map to requirement, unlink, requirementIds.
2960
+
2961
+ ## Parameters
2962
+
2963
+ \`controlId\` plus at least one field to change. Strings: \`controlName\`, \`description\`, \`identifier\`, \`catalog\`, \`owner\` (an email), \`remediation\`, \`exceptionProcess\` (markdown), \`mitreTechnique\` (\`T1078\` or \`T1059.001\`), \`resourceGroupId\`; \`null\` clears \`identifier\`, \`catalog\`, \`owner\`, \`remediation\`, \`exceptionProcess\` or \`mitreTechnique\`; \`description\` and \`resourceGroupId\` cannot be cleared, only replaced. \`requirementIds\` is an object with one of \`set\` (replace the whole list; never empty), \`add\` or \`remove\`; an omitted field is left as it is.
2964
+
2965
+ ## Outcomes
2966
+
2967
+ - \`updated\`: \`control\` as saved, with \`state\`, \`frameworkIds\`, \`url\`. Safe to repeat: the same input a second time changes nothing. A \`requirementIds\` change is the slow path (over a minute on a slow backend, answered \`interrupted:\`); finish it, read the control back, and only then transition it, since a late-landing update restores the state it read. The reverse holds too: after \`transition-controls\` moves a control, read it with \`get-control\` until it shows the new state before updating it.
2968
+ - \`not_found\`: no non-deleted control has this id; nothing changed.
2969
+ - Errors: \`invalid_input:\` (no field to change, a malformed owner or MITRE id, \`requirementIds\` with several of \`set\`, \`add\`, \`remove\`, or \`set: []\`); \`requirement_not_found:\` (an id to add does not exist); \`not_ready:\` (an id to add was created moments ago and CCM cannot link to it yet; nothing changed; call again in a minute); \`interrupted:\` (cut off at the 55-second limit and may have landed; read back with \`get-control\` before repeating).
2970
+
2971
+ ## Access
2972
+
2973
+ Needs the Compliance (CCM) entitlement and edit permission on the control's resource group; an access-denied error names the missing one.
2974
+
2975
+ ## Example
2976
+
2977
+ \`{ "controlId": "ccm_c_…", "identifier": "6.1.2", "remediation": "Enable the Okta MFA sign-on policy for the affected group.", "requirementIds": { "add": ["<requirementId>"] } }\`
2978
+
2979
+ Full reference: get-reference topic framework-authoring
2190
2980
  `,
2191
2981
  "update-dashboard-widget.md": `Replace an existing widget's whole definition: its query, title, chart type or settings. The
2192
2982
  \`input\` is the widget's new full state, so read the current widget with \`get-dashboard-details\`,
@@ -2258,6 +3048,10 @@ Full reference: get-reference topic dashboard-layout
2258
3048
 
2259
3049
  JupiterOne Compliance (CCM) runs each control test as a rule named \`CONTROL-TEST:<test name>\`, hidden from \`list-rules\` and \`get-rule-details\`. The tool asks the graph whether a control test references the id and refuses with \`lintCode: 'ccm-managed-rule'\`; a \`name\` with the prefix is refused too. The change belongs on the control, which \`get-control\` reads. The response carries \`ownershipCheck\`: \`'graph'\` when the check ran and found no control test, \`'skipped'\` when it could not run and the update went ahead.
2260
3050
 
3051
+ ## Before saving
3052
+
3053
+ When the update changes an action, render it with \`preview-rule-actions\` (pass the new \`question\`, \`operations\` and \`templates\`) and show the user what it will send; nothing is saved or sent by the preview.
3054
+
2261
3055
  ## Response
2262
3056
 
2263
3057
  \`rule.url\`; give it to the user.