feat: declare a risk tier on every command in the catalog

467 of the 1592 commands carried no `risk:`. An unset risk is read as
destructive by the agent approval gate, so half the catalog's write side sat
behind the same prompt — and, in HarfangLab's case, 39 pure lookups did too.
A gate that stops everything stops being read as a signal, which is the
argument already made for the toolkit and for sentinelone (df27876).

The catalog is now 1027 read, 261 safe_write, 304 destructive, with nothing
defaulted. The line follows the one sentinelone drew: impact on the estate,
not reversibility — isolate-agent is reversible and is the canonical
destructive example.

  read        only queries; changes nothing outside Riposte
  safe_write  additive or reversible inside the tool's own case/enrichment
              plane: comments, tickets, tags, alert statuses, threat-intel
              records, sandbox submissions, collection jobs, outbound messages
  destructive changes the estate or weakens a control: containment, blocklists
              and allowlists, exclusions and detection rules, every delete,
              identity and credential operations, code on a host, generic
              API escape hatches

Three calls that were not obvious, and are now applied throughout:

- Undoing a containment is tiered like the containment it lifts. Un-isolating
  a host or un-banning an IP mid-incident is its own decision, not a return to
  a neutral state. The catalog contradicted itself here — crowdstrike's
  lift_containment was destructive while harfanglab's deisolate_from_threat
  was safe_write — so deisolate_from_threat and unquarantine_file are
  re-tiered to destructive, the only two existing tiers this pass changes.
- Retrieving a live secret is destructive: cyberark get_password, delinea
  get_secret, vault read_secret, beyondtrust get_credential. It is a GET, but
  the tier describes the stake, not the HTTP verb.
- Sending outward to humans stays safe_write — slack, teams, twilio, telegram,
  mail. Irreversible, but it is the collaboration plane, not the estate.

An object created but not yet referenced by a rule is safe_write; editing one
a rule already reads is destructive. That is why fortigate create_address and
panos create_custom_url_category are safe_write while update_address_group and
edit_custom_url_category are not.

The template and README never documented the field, which is how 467 commands
came to omit it. Both now carry the tier table and these rules, so the next
integration declares a tier instead of inheriting one.

111 packages get a MINOR bump and a changelog entry: an instance compares
versions to offer an update, so an unbumped manifest would leave the tiers
sitting in the catalog and never reaching the estates that need them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 12:55:20 +02:00
parent c7569fd4d0
commit 45e9cbd269
113 changed files with 727 additions and 224 deletions
+17 -2
View File
@@ -1,8 +1,8 @@
id: servicenow
name: ServiceNow
version: 1.0.0
version: 1.1.0
description: "ServiceNow ITSM (Table / Service Catalog / Change Management REST APIs) — ticket lifecycle (create/update/resolve/delete, comments, work notes, links, tags, journal notes), generic table records CRUD, CMDB and user/group queries, service catalog ordering, standard change creation, attachments, work-item queue routing, plus ticket ingestion (get_incidents) with an OCSF mapper. Basic or OAuth 2.0 (password grant) authentication."
changelog: "1.0.0 — Initial release: ticket lifecycle commands (incident, problem, change_request, sc_request, sc_task, sc_req_item), records/table CRUD and discovery, CMDB computer/group/user queries, service catalog (search, details, order), standard change from template + change tasks, attachments (list/upload/delete), queue routing, generic API call, and ticket ingestion with a bundled OCSF mapper."
changelog: "1.1.0 — Declare the risk tier on the 15 commands that carried none: 9 safe_write, 6 destructive. An unset risk is read as destructive by the agent approval gate, so the 9 that only annotate sat behind the same prompt as the ones that change the estate. | 1.0.0 — Initial release: ticket lifecycle commands (incident, problem, change_request, sc_request, sc_task, sc_req_item), records/table CRUD and discovery, CMDB computer/group/user queries, service catalog (search, details, order), standard change from template + change tasks, attachments (list/upload/delete), queue routing, generic API call, and ticket ingestion with a bundled OCSF mapper."
category: ticketing
# Per-instance configuration. The base URL is the instance root, e.g.
@@ -91,6 +91,7 @@ commands:
- id: create_ticket
name: servicenow-create-ticket
description: "Create a ticket. Common fields have named inputs; anything else goes through fields/custom_fields."
risk: safe_write
inputs_schema:
properties:
ticket_type: { type: string, description: "Ticket table (default from instance config)" }
@@ -115,6 +116,7 @@ commands:
- id: update_ticket
name: servicenow-update-ticket
description: "Update a ticket by sys_id (state changes, reassignment, resolution fields, any field via fields/custom_fields)."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Ticket sys_id to update" }
@@ -142,6 +144,7 @@ commands:
- id: delete_ticket
name: servicenow-delete-ticket
description: "Delete a ticket by sys_id."
risk: destructive
inputs_schema:
properties:
id: { type: string, description: "Ticket sys_id to delete" }
@@ -165,6 +168,7 @@ commands:
- id: add_comment
name: servicenow-add-comment
description: "Add a customer-visible comment or an internal work note to a ticket."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Ticket sys_id" }
@@ -176,6 +180,7 @@ commands:
- id: add_link
name: servicenow-add-link
description: "Post a clickable link (with optional text) into a ticket's comments or work notes."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Ticket sys_id" }
@@ -188,6 +193,7 @@ commands:
- id: add_tag
name: servicenow-add-tag
description: "Attach an existing tag (label) to a ticket via the label_entry table."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Ticket sys_id" }
@@ -219,6 +225,7 @@ commands:
- id: upload_file
name: servicenow-upload-file
description: "Attach a file to a record (content provided as base64)."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Record sys_id to attach the file to" }
@@ -230,6 +237,7 @@ commands:
- id: delete_file
name: servicenow-delete-file
description: "Delete an attachment by its attachment sys_id."
risk: destructive
inputs_schema:
properties:
file_sys_id: { type: string, description: "Attachment sys_id (from servicenow-get-ticket-attachments)" }
@@ -252,6 +260,7 @@ commands:
- id: create_record
name: servicenow-create-record
description: "Create a record in any table."
risk: destructive
inputs_schema:
properties:
table_name: { type: string, description: "Table name" }
@@ -263,6 +272,7 @@ commands:
- id: update_record
name: servicenow-update-record
description: "Update a record in any table by sys_id."
risk: destructive
inputs_schema:
properties:
table_name: { type: string, description: "Table name" }
@@ -275,6 +285,7 @@ commands:
- id: delete_record
name: servicenow-delete-record
description: "Delete a record from any table by sys_id."
risk: destructive
inputs_schema:
properties:
table_name: { type: string, description: "Table name" }
@@ -381,6 +392,7 @@ commands:
- id: create_item_order
name: servicenow-create-item-order
description: "Order a catalog item (order_now). Mandatory item variables must be provided."
risk: safe_write
inputs_schema:
properties:
id: { type: string, description: "Catalog item sys_id" }
@@ -393,6 +405,7 @@ commands:
- id: create_change_from_template
name: servicenow-create-change-from-template
description: "Create a standard change request from a standard change template (Change Management API)."
risk: safe_write
inputs_schema:
properties:
template: { type: string, description: "Standard change template sys_id" }
@@ -412,6 +425,7 @@ commands:
- id: document_route_to_queue
name: servicenow-document-route-to-queue
description: "Route a document (ticket/record) to an Advanced Work Assignment queue."
risk: safe_write
inputs_schema:
properties:
queue_id: { type: string, description: "Queue sys_id (awa_queue table)" }
@@ -422,6 +436,7 @@ commands:
- id: generic_api_call
name: servicenow-generic-api-call
description: "Call any instance REST endpoint (path relative to the instance URL, e.g. /api/now/table/incident)."
risk: destructive
inputs_schema:
properties:
method: { type: string, description: "HTTP method: GET, POST, PATCH, PUT or DELETE" }