@onlyflows/servicenow-mcp 1.0.0 → 2.1.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 (281) hide show
  1. package/.env.example +56 -0
  2. package/CHANGELOG.md +214 -0
  3. package/README.md +939 -101
  4. package/dist/auth.d.ts +88 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +396 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/client.d.ts +111 -17
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +554 -79
  11. package/dist/client.js.map +1 -1
  12. package/dist/config.d.ts +41 -4
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +44 -34
  15. package/dist/config.js.map +1 -1
  16. package/dist/encoded-query-policy.d.ts +72 -0
  17. package/dist/encoded-query-policy.d.ts.map +1 -0
  18. package/dist/encoded-query-policy.js +409 -0
  19. package/dist/encoded-query-policy.js.map +1 -0
  20. package/dist/execution-context.d.ts +235 -0
  21. package/dist/execution-context.d.ts.map +1 -0
  22. package/dist/execution-context.js +441 -0
  23. package/dist/execution-context.js.map +1 -0
  24. package/dist/field-policy.d.ts +117 -0
  25. package/dist/field-policy.d.ts.map +1 -0
  26. package/dist/field-policy.js +1684 -0
  27. package/dist/field-policy.js.map +1 -0
  28. package/dist/http-auth.d.ts +131 -0
  29. package/dist/http-auth.d.ts.map +1 -0
  30. package/dist/http-auth.js +347 -0
  31. package/dist/http-auth.js.map +1 -0
  32. package/dist/http-entrypoint.d.ts +26 -0
  33. package/dist/http-entrypoint.d.ts.map +1 -0
  34. package/dist/http-entrypoint.js +255 -0
  35. package/dist/http-entrypoint.js.map +1 -0
  36. package/dist/http-observability.d.ts +147 -0
  37. package/dist/http-observability.d.ts.map +1 -0
  38. package/dist/http-observability.js +711 -0
  39. package/dist/http-observability.js.map +1 -0
  40. package/dist/http-request-policy.d.ts +72 -0
  41. package/dist/http-request-policy.d.ts.map +1 -0
  42. package/dist/http-request-policy.js +463 -0
  43. package/dist/http-request-policy.js.map +1 -0
  44. package/dist/http-request-signal.d.ts +12 -0
  45. package/dist/http-request-signal.d.ts.map +1 -0
  46. package/dist/http-request-signal.js +39 -0
  47. package/dist/http-request-signal.js.map +1 -0
  48. package/dist/http-runtime.d.ts +77 -0
  49. package/dist/http-runtime.d.ts.map +1 -0
  50. package/dist/http-runtime.js +1321 -0
  51. package/dist/http-runtime.js.map +1 -0
  52. package/dist/incident-journal-policy.d.ts +22 -0
  53. package/dist/incident-journal-policy.d.ts.map +1 -0
  54. package/dist/incident-journal-policy.js +115 -0
  55. package/dist/incident-journal-policy.js.map +1 -0
  56. package/dist/index.d.ts +14 -4
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +140 -36
  59. package/dist/index.js.map +1 -1
  60. package/dist/metadata-cache.d.ts +71 -0
  61. package/dist/metadata-cache.d.ts.map +1 -0
  62. package/dist/metadata-cache.js +397 -0
  63. package/dist/metadata-cache.js.map +1 -0
  64. package/dist/profile-admin.d.ts +64 -0
  65. package/dist/profile-admin.d.ts.map +1 -0
  66. package/dist/profile-admin.js +351 -0
  67. package/dist/profile-admin.js.map +1 -0
  68. package/dist/profile-credentials.d.ts +68 -0
  69. package/dist/profile-credentials.d.ts.map +1 -0
  70. package/dist/profile-credentials.js +329 -0
  71. package/dist/profile-credentials.js.map +1 -0
  72. package/dist/profile-manager.d.ts +187 -0
  73. package/dist/profile-manager.d.ts.map +1 -0
  74. package/dist/profile-manager.js +1026 -0
  75. package/dist/profile-manager.js.map +1 -0
  76. package/dist/record-identifier-policy.d.ts +39 -0
  77. package/dist/record-identifier-policy.d.ts.map +1 -0
  78. package/dist/record-identifier-policy.js +203 -0
  79. package/dist/record-identifier-policy.js.map +1 -0
  80. package/dist/runtime-environment.d.ts +23 -0
  81. package/dist/runtime-environment.d.ts.map +1 -0
  82. package/dist/runtime-environment.js +58 -0
  83. package/dist/runtime-environment.js.map +1 -0
  84. package/dist/server.d.ts +33 -0
  85. package/dist/server.d.ts.map +1 -0
  86. package/dist/server.js +73 -0
  87. package/dist/server.js.map +1 -0
  88. package/dist/servicenow-identifiers.d.ts +8 -0
  89. package/dist/servicenow-identifiers.d.ts.map +1 -0
  90. package/dist/servicenow-identifiers.js +22 -0
  91. package/dist/servicenow-identifiers.js.map +1 -0
  92. package/dist/setup-prompts.d.ts +7 -0
  93. package/dist/setup-prompts.d.ts.map +1 -0
  94. package/dist/setup-prompts.js +123 -0
  95. package/dist/setup-prompts.js.map +1 -0
  96. package/dist/setup.d.ts +109 -0
  97. package/dist/setup.d.ts.map +1 -0
  98. package/dist/setup.js +1903 -0
  99. package/dist/setup.js.map +1 -0
  100. package/dist/startup.d.ts +43 -0
  101. package/dist/startup.d.ts.map +1 -0
  102. package/dist/startup.js +75 -0
  103. package/dist/startup.js.map +1 -0
  104. package/dist/stdio-runtime.d.ts +106 -0
  105. package/dist/stdio-runtime.d.ts.map +1 -0
  106. package/dist/stdio-runtime.js +231 -0
  107. package/dist/stdio-runtime.js.map +1 -0
  108. package/dist/structured-query.d.ts +187 -0
  109. package/dist/structured-query.d.ts.map +1 -0
  110. package/dist/structured-query.js +503 -0
  111. package/dist/structured-query.js.map +1 -0
  112. package/dist/table-defaults.d.ts +28 -0
  113. package/dist/table-defaults.d.ts.map +1 -0
  114. package/dist/table-defaults.js +85 -0
  115. package/dist/table-defaults.js.map +1 -0
  116. package/dist/table-policy.d.ts +71 -0
  117. package/dist/table-policy.d.ts.map +1 -0
  118. package/dist/table-policy.js +290 -0
  119. package/dist/table-policy.js.map +1 -0
  120. package/dist/tool-error.d.ts +48 -0
  121. package/dist/tool-error.d.ts.map +1 -0
  122. package/dist/tool-error.js +139 -0
  123. package/dist/tool-error.js.map +1 -0
  124. package/dist/tool-table-access.d.ts +19 -0
  125. package/dist/tool-table-access.d.ts.map +1 -0
  126. package/dist/tool-table-access.js +388 -0
  127. package/dist/tool-table-access.js.map +1 -0
  128. package/dist/tools/aggregate.d.ts +22 -42
  129. package/dist/tools/aggregate.d.ts.map +1 -1
  130. package/dist/tools/aggregate.js +103 -47
  131. package/dist/tools/aggregate.js.map +1 -1
  132. package/dist/tools/all-fields-cap.d.ts +45 -0
  133. package/dist/tools/all-fields-cap.d.ts.map +1 -0
  134. package/dist/tools/all-fields-cap.js +151 -0
  135. package/dist/tools/all-fields-cap.js.map +1 -0
  136. package/dist/tools/atf.d.ts +21 -60
  137. package/dist/tools/atf.d.ts.map +1 -1
  138. package/dist/tools/atf.js +180 -116
  139. package/dist/tools/atf.js.map +1 -1
  140. package/dist/tools/attach.d.ts +31 -45
  141. package/dist/tools/attach.d.ts.map +1 -1
  142. package/dist/tools/attach.js +175 -137
  143. package/dist/tools/attach.js.map +1 -1
  144. package/dist/tools/batch.d.ts +78 -42
  145. package/dist/tools/batch.d.ts.map +1 -1
  146. package/dist/tools/batch.js +172 -68
  147. package/dist/tools/batch.js.map +1 -1
  148. package/dist/tools/catalog.d.ts +6 -0
  149. package/dist/tools/catalog.d.ts.map +1 -0
  150. package/dist/tools/catalog.js +203 -0
  151. package/dist/tools/catalog.js.map +1 -0
  152. package/dist/tools/codesearch.d.ts +14 -25
  153. package/dist/tools/codesearch.d.ts.map +1 -1
  154. package/dist/tools/codesearch.js +60 -48
  155. package/dist/tools/codesearch.js.map +1 -1
  156. package/dist/tools/create-module.d.ts +48 -0
  157. package/dist/tools/create-module.d.ts.map +1 -0
  158. package/dist/tools/create-module.js +98 -0
  159. package/dist/tools/create-module.js.map +1 -0
  160. package/dist/tools/create.d.ts +2 -38
  161. package/dist/tools/create.d.ts.map +1 -1
  162. package/dist/tools/create.js +9 -41
  163. package/dist/tools/create.js.map +1 -1
  164. package/dist/tools/delete.d.ts +13 -23
  165. package/dist/tools/delete.d.ts.map +1 -1
  166. package/dist/tools/delete.js +30 -33
  167. package/dist/tools/delete.js.map +1 -1
  168. package/dist/tools/discover.d.ts +15 -27
  169. package/dist/tools/discover.d.ts.map +1 -1
  170. package/dist/tools/discover.js +103 -60
  171. package/dist/tools/discover.js.map +1 -1
  172. package/dist/tools/get-module.d.ts +85 -0
  173. package/dist/tools/get-module.d.ts.map +1 -0
  174. package/dist/tools/get-module.js +221 -0
  175. package/dist/tools/get-module.js.map +1 -0
  176. package/dist/tools/get.d.ts +2 -51
  177. package/dist/tools/get.d.ts.map +1 -1
  178. package/dist/tools/get.js +9 -49
  179. package/dist/tools/get.js.map +1 -1
  180. package/dist/tools/handler-result.d.ts +14 -0
  181. package/dist/tools/handler-result.d.ts.map +1 -0
  182. package/dist/tools/handler-result.js +177 -0
  183. package/dist/tools/handler-result.js.map +1 -0
  184. package/dist/tools/health.d.ts +12 -15
  185. package/dist/tools/health.d.ts.map +1 -1
  186. package/dist/tools/health.js +55 -36
  187. package/dist/tools/health.js.map +1 -1
  188. package/dist/tools/incident-journal-module.d.ts +12 -0
  189. package/dist/tools/incident-journal-module.d.ts.map +1 -0
  190. package/dist/tools/incident-journal-module.js +61 -0
  191. package/dist/tools/incident-journal-module.js.map +1 -0
  192. package/dist/tools/index.d.ts +47 -36
  193. package/dist/tools/index.d.ts.map +1 -1
  194. package/dist/tools/index.js +814 -35
  195. package/dist/tools/index.js.map +1 -1
  196. package/dist/tools/nl.d.ts +10 -24
  197. package/dist/tools/nl.d.ts.map +1 -1
  198. package/dist/tools/nl.js +37 -147
  199. package/dist/tools/nl.js.map +1 -1
  200. package/dist/tools/profile.d.ts +37 -0
  201. package/dist/tools/profile.d.ts.map +1 -0
  202. package/dist/tools/profile.js +39 -0
  203. package/dist/tools/profile.js.map +1 -0
  204. package/dist/tools/query-module.d.ts +119 -0
  205. package/dist/tools/query-module.d.ts.map +1 -0
  206. package/dist/tools/query-module.js +324 -0
  207. package/dist/tools/query-module.js.map +1 -0
  208. package/dist/tools/query.d.ts +2 -72
  209. package/dist/tools/query.d.ts.map +1 -1
  210. package/dist/tools/query.js +8 -72
  211. package/dist/tools/query.js.map +1 -1
  212. package/dist/tools/record-write-shared.d.ts +7 -0
  213. package/dist/tools/record-write-shared.d.ts.map +1 -0
  214. package/dist/tools/record-write-shared.js +65 -0
  215. package/dist/tools/record-write-shared.js.map +1 -0
  216. package/dist/tools/relationships.d.ts +21 -42
  217. package/dist/tools/relationships.d.ts.map +1 -1
  218. package/dist/tools/relationships.js +70 -56
  219. package/dist/tools/relationships.js.map +1 -1
  220. package/dist/tools/result-envelope.d.ts +603 -0
  221. package/dist/tools/result-envelope.d.ts.map +1 -0
  222. package/dist/tools/result-envelope.js +770 -0
  223. package/dist/tools/result-envelope.js.map +1 -0
  224. package/dist/tools/schema-module.d.ts +64 -0
  225. package/dist/tools/schema-module.d.ts.map +1 -0
  226. package/dist/tools/schema-module.js +367 -0
  227. package/dist/tools/schema-module.js.map +1 -0
  228. package/dist/tools/schema.d.ts +2 -37
  229. package/dist/tools/schema.d.ts.map +1 -1
  230. package/dist/tools/schema.js +6 -57
  231. package/dist/tools/schema.js.map +1 -1
  232. package/dist/tools/script.d.ts +33 -27
  233. package/dist/tools/script.d.ts.map +1 -1
  234. package/dist/tools/script.js +43 -37
  235. package/dist/tools/script.js.map +1 -1
  236. package/dist/tools/syslog.d.ts +19 -46
  237. package/dist/tools/syslog.d.ts.map +1 -1
  238. package/dist/tools/syslog.js +101 -67
  239. package/dist/tools/syslog.js.map +1 -1
  240. package/dist/tools/tool-module.d.ts +143 -0
  241. package/dist/tools/tool-module.d.ts.map +1 -0
  242. package/dist/tools/tool-module.js +1095 -0
  243. package/dist/tools/tool-module.js.map +1 -0
  244. package/dist/tools/update-module.d.ts +51 -0
  245. package/dist/tools/update-module.d.ts.map +1 -0
  246. package/dist/tools/update-module.js +111 -0
  247. package/dist/tools/update-module.js.map +1 -0
  248. package/dist/tools/update.d.ts +2 -45
  249. package/dist/tools/update.d.ts.map +1 -1
  250. package/dist/tools/update.js +9 -41
  251. package/dist/tools/update.js.map +1 -1
  252. package/dist/utils.d.ts +68 -1
  253. package/dist/utils.d.ts.map +1 -1
  254. package/dist/utils.js +114 -16
  255. package/dist/utils.js.map +1 -1
  256. package/dist/version.d.ts +10 -0
  257. package/dist/version.d.ts.map +1 -0
  258. package/dist/version.js +13 -0
  259. package/dist/version.js.map +1 -0
  260. package/dist/write-value-policy.d.ts +56 -0
  261. package/dist/write-value-policy.d.ts.map +1 -0
  262. package/dist/write-value-policy.js +310 -0
  263. package/dist/write-value-policy.js.map +1 -0
  264. package/docs/ADDING-TOOLS.md +227 -0
  265. package/docs/CLIENT-SETUP.md +914 -0
  266. package/docs/CONTAINER-DEPLOYMENT.md +310 -0
  267. package/docs/CROSS-CLIENT-RELEASE-MATRIX.md +63 -0
  268. package/docs/ENTERPRISE-RELEASE-BOUNDARY.md +149 -0
  269. package/docs/OPERATIONS-RUNBOOK.md +383 -0
  270. package/docs/PRIVATE-CHATGPT-CONNECTIVITY.md +347 -0
  271. package/docs/PRODUCTION-SECURITY.md +368 -0
  272. package/docs/PROFILE-CREDENTIALS.md +126 -0
  273. package/docs/RELEASE-VALIDATION.md +140 -0
  274. package/docs/TESTING-OAUTH.md +101 -0
  275. package/docs/V2-MIGRATION.md +493 -0
  276. package/package.json +60 -13
  277. package/scripts/inspector.mjs +140 -0
  278. package/scripts/release-validate.mjs +201 -0
  279. package/scripts/smoke-test.mjs +274 -0
  280. package/tools/inspector/package-lock.json +3812 -0
  281. package/tools/inspector/package.json +12 -0
@@ -0,0 +1,368 @@
1
+ # Production security boundaries
2
+
3
+ > [!IMPORTANT]
4
+ > **This document describes the dormant HTTP transport, not the shipped one.**
5
+ > The product exposes stdio only: an MCP client spawns `servicenow-mcp` and
6
+ > speaks JSON-RPC over that process's stdin and stdout. There is no endpoint to
7
+ > configure, no service to start, and no bearer token to set, and
8
+ > `servicenow-mcp-setup` registers every client that way. The HTTP runtime this
9
+ > document assumes still compiles and is still tested, but nothing on the CLI
10
+ > path reaches it — see
11
+ > [the dormant HTTP transport](ENTERPRISE-RELEASE-BOUNDARY.md#the-dormant-http-transport).
12
+ > Sections about profiles, credentials, table access, field policy, and tool
13
+ > behavior are transport-independent and remain accurate.
14
+
15
+ This document is the production boundary contract for the ServiceNow MCP V2
16
+ HTTP process. It supplements the container and profile-credential guides; it
17
+ does not turn the application into a TLS terminator, reverse proxy, firewall,
18
+ DNS policy engine, or secret manager.
19
+
20
+ The supported deployment is private and single-owner. No installation command,
21
+ startup mode, or container entry point creates a tunnel or public endpoint.
22
+ Public-tunnel products are not a production boundary and must not be started
23
+ automatically. Private ChatGPT connectivity is a separately validated adapter,
24
+ not an application startup side effect.
25
+
26
+ ## HTTP authentication is optional and off by default
27
+
28
+ **As of 2.0 the `/mcp` endpoint is unauthenticated unless you configure it.**
29
+ The service requires and verifies a bearer token only when `MCP_BEARER_TOKEN`
30
+ is set in its environment. With that variable absent it starts, logs a warning
31
+ to stderr, and serves every request that reaches it.
32
+
33
+ What that means concretely:
34
+
35
+ - **Any process running as the service's user can use it.** There is no
36
+ credential to steal because there is no credential to present. A local
37
+ program, a malicious dependency in an unrelated project, a script the user
38
+ pastes into a terminal — each of these can call `/mcp` and exercise whatever
39
+ ServiceNow access the configured profiles grant, under the operator's own
40
+ audit identity.
41
+ - **The remaining boundary is narrow and specific.** It is the listen address
42
+ (`MCP_HOST`, `127.0.0.1` by default), the `Host` and `Origin` allowlists
43
+ (`MCP_ALLOWED_HOSTS` / `MCP_ALLOWED_ORIGINS`, both fail-closed), the
44
+ admission and rate limits, and the per-profile table and field policy.
45
+ Together those stop a remote host and stop a web page in the user's browser.
46
+ None of them distinguishes one local process from another.
47
+ - **It does not weaken the ServiceNow credential itself.** That still lives in
48
+ an owner-only `0600` file as a reference or an AES-256-GCM envelope, and
49
+ `SN_PROFILE_ENCRYPTION_KEY` is still injected separately. The change is that
50
+ reaching the *service* no longer requires anything, and the service uses that
51
+ credential on the caller's behalf.
52
+ - **Audit records are unchanged in shape.** `MCP_OWNER_ID` and `MCP_CLIENT_ID`
53
+ still label every record and default to `local-owner` / `local-client` when
54
+ unset. They were always configuration rather than proof of identity; with no
55
+ bearer they attribute a request to the configured owner without establishing
56
+ that the request came from them.
57
+
58
+ Do not run unauthenticated off loopback. Binding `MCP_HOST` to a routable
59
+ address without `MCP_BEARER_TOKEN` publishes your ServiceNow access to the
60
+ network.
61
+
62
+ ### Turning authentication on
63
+
64
+ Set `MCP_BEARER_TOKEN` in the service environment to a random value of 32-4096
65
+ bearer characters (`A-Za-z0-9._~+/-`, optional `=` padding), restart, and send
66
+ it from every client:
67
+
68
+ ```
69
+ Authorization: Bearer <the MCP_BEARER_TOKEN value>
70
+ ```
71
+
72
+ The token is compared as a SHA-256 digest with a timing-safe comparison, before
73
+ MCP parsing, profile lookup, tool dispatch, or any ServiceNow credential
74
+ access. Missing, duplicated, malformed, and unknown tokens all fail identically
75
+ with `401` and `WWW-Authenticate: Bearer`.
76
+
77
+ An empty `MCP_BEARER_TOKEN` is a startup failure, not a way to switch
78
+ authentication off — a half-applied secret injection stops the service rather
79
+ than quietly opening the port. `servicenow-mcp-setup` does not generate a
80
+ token; provision it the same way as every other runtime secret below.
81
+
82
+ `servicenow-mcp-setup doctor` reports which of the two modes an install is in
83
+ under the `http authentication` check.
84
+
85
+ For deployments that terminate TLS at a proxy or expose the endpoint beyond one
86
+ machine — the container, private-ChatGPT, and release-validation paths in this
87
+ repository all do — set `MCP_BEARER_TOKEN`. The rest of this document assumes
88
+ it is set.
89
+
90
+ ## TLS termination
91
+
92
+ The Node.js process serves HTTP/1.1 and does not terminate TLS. For every
93
+ non-loopback deployment, terminate TLS at an operator-managed reverse proxy,
94
+ load balancer, ingress, or private-access gateway with all of these properties:
95
+
96
+ - accept TLS 1.2 or TLS 1.3 only; prefer TLS 1.3 and disable TLS 1.0/1.1;
97
+ - use a certificate whose names match the advertised MCP authority, automate
98
+ renewal, and alert before expiry;
99
+ - redirect cleartext public traffic to HTTPS or, preferably, do not expose a
100
+ cleartext listener at all;
101
+ - forward upstream with HTTP/1.1 to a loopback or private listener; and
102
+ - protect the termination-to-process hop with loopback, a dedicated private
103
+ network plus ingress policy, or authenticated encryption. A routable shared
104
+ network is not an equivalent trust boundary.
105
+
106
+ TLS authenticates the endpoint; it does not replace `MCP_BEARER_TOKEN`.
107
+ Browser CORS and `Host` admission likewise do not authenticate a caller. When
108
+ `MCP_BEARER_TOKEN` is unset, nothing authenticates a caller at all.
109
+
110
+ ## Reverse proxy and client identity contract
111
+
112
+ There is deliberately no trusted-proxy mode in the application. It never uses
113
+ `Forwarded`, `X-Forwarded-For`, `X-Real-IP`, `X-Forwarded-Host`, or
114
+ `X-Forwarded-Proto` to determine identity, authority, scheme, or rate-limit
115
+ source. The application-level source is only the direct TCP peer reported by
116
+ `request.socket.remoteAddress`.
117
+
118
+ At the last trusted proxy hop:
119
+
120
+ 1. Remove every inbound `Forwarded` and `X-Forwarded-*`/`X-Real-IP` value. Do
121
+ not append an untrusted value and do not forward client-supplied identity
122
+ headers to the MCP process.
123
+ 2. Send exactly one `Host` header in a form listed in `MCP_ALLOWED_HOSTS`.
124
+ 3. Enforce original-client IP allowlists, connection limits, and rate limits at
125
+ the proxy. Behind a proxy, all application pre-authentication source limits
126
+ intentionally see the proxy peer, not the original client.
127
+ 4. Allow the proxy or orchestrator, and no other workload, to connect to the
128
+ MCP listen port. Health endpoints are unauthenticated lifecycle signals and
129
+ need the same network isolation.
130
+
131
+ Do not use a forwarded address in audit attribution. The authenticated
132
+ single-owner context comes from the operator-configured `MCP_OWNER_ID` and
133
+ `MCP_CLIENT_ID`; those non-secret identifiers are not accepted from request
134
+ headers.
135
+
136
+ ### Exact `Host` behavior
137
+
138
+ Every request, including health and unknown routes, must contain exactly one
139
+ syntactically valid raw `Host` authority. Missing, duplicate, or malformed
140
+ values receive HTTP 400. A valid but unapproved authority receives HTTP 421
141
+ before routing, authentication, or body parsing.
142
+
143
+ `MCP_ALLOWED_HOSTS` is a comma-separated list of one to 128 exact authorities.
144
+ It supports no wildcard or suffix matching. Hostnames are normalized to lower
145
+ case and an optional terminal dot is removed, but ports remain part of the
146
+ contract. Configure the exact form the final proxy sends, for example
147
+ `mcp.example.com` and/or `mcp.example.com:443`; do not derive it from
148
+ `X-Forwarded-Host`. When `MCP_ALLOWED_HOSTS` is omitted, only authorities safely
149
+ derived from the bind address and accepted socket are allowed, which is not a
150
+ substitute for explicit configuration behind a proxy.
151
+
152
+ The reserved `mcp-health.internal` authority is accepted only on
153
+ `/health/live` and `/health/ready` from a loopback TCP peer. It never admits
154
+ `/mcp` and must not be added to `MCP_ALLOWED_HOSTS`.
155
+
156
+ ### Exact `Origin` behavior
157
+
158
+ Non-browser clients may omit `Origin`. If present, there must be exactly one
159
+ HTTP(S) origin containing no credentials, path, query, or fragment. It must
160
+ exactly match an entry in `MCP_ALLOWED_ORIGINS`; otherwise the request receives
161
+ HTTP 400 for malformed input or HTTP 403 for an unapproved origin. There is no
162
+ wildcard or reflected-origin mode.
163
+
164
+ An MCP CORS preflight additionally requires `POST` and only the documented
165
+ request headers. CORS is a browser boundary, not authorization: it governs what
166
+ a *browser* will let a page do, and a non-browser client on the same machine
167
+ sends whatever headers it likes. Where `MCP_BEARER_TOKEN` is set, the bearer
168
+ remains required for the subsequent `/mcp` request; where it is not, the
169
+ `Host`/`Origin` allowlists are the only thing a browser has to defeat, and a
170
+ local process has nothing to defeat.
171
+
172
+ ## Secret injection and storage
173
+
174
+ Never put a bearer token, password, OAuth client secret, API key, profile
175
+ encryption key, ciphertext, or provider reference in an image layer, Dockerfile
176
+ `ARG`/`ENV`, committed manifest, command argument, shell history, diagnostic
177
+ bundle, or log field.
178
+
179
+ Inject secrets at runtime from the orchestrator or approved secret manager.
180
+ The built-in provider adapter reads canonical `SN_*` environment references;
181
+ an embedding deployment may supply another provider-neutral resolver. Restrict
182
+ secret-read permission to the runtime identity and scope each ServiceNow secret
183
+ to the profile that uses it. Treat process-environment and orchestrator
184
+ inspection permissions as secret-reading permissions.
185
+
186
+ Current profile administration writes only a structured secret reference or an
187
+ AES-256-GCM encrypted envelope. Read-compatible V1 `env:...` references may be
188
+ loaded and migrate to structured references on the next write; legacy plaintext
189
+ is rejected. Encrypted profile data lives in an owner-only directory/file
190
+ (`0700`/`0600` where POSIX permissions are available), and
191
+ `SN_PROFILE_ENCRYPTION_KEY` is injected separately. Do not store that key next
192
+ to the encrypted profile. Mount profile storage read-only for the serving
193
+ process unless a separate, tightly scoped administration job is actively
194
+ performing an out-of-band rotation.
195
+
196
+ Use `servicenow-mcp-profile create`, `rotate`, `inspect`, and `remove` for
197
+ profile administration. Protected values enter through non-echoed or bounded
198
+ standard input, never credential-bearing CLI options. The MCP `sn_profile`
199
+ tool is inspection-only and returns non-secret metadata.
200
+
201
+ ### Rotation procedure
202
+
203
+ 1. Create a replacement credential or encryption key in the authoritative
204
+ secret system without revoking the old value.
205
+ 2. Update the runtime secret reference, or use `servicenow-mcp-profile rotate`
206
+ to atomically replace the encrypted envelope/reference. Keep the profile
207
+ encryption key separate from both old and new profile files.
208
+ 3. Roll or restart serving processes when an injected environment value or
209
+ mounted profile file changes; the process does not promise live environment
210
+ or file watching. Provider adapters may refresh in place only when their
211
+ deployment contract explicitly guarantees it.
212
+ 4. Verify authentication with the explicitly named profile, verify logs and
213
+ diagnostics contain no protected value, then revoke the old credential.
214
+ 5. Rotate `MCP_BEARER_TOKEN`, where it is configured, by replacing the runtime
215
+ secret and rolling all replicas as one controlled change. Do not accept both
216
+ tokens indefinitely. Removing the variable does not deny access — it makes
217
+ the endpoint unauthenticated, so treat "revoke the bearer" as "replace it".
218
+
219
+ Application JSON-line events are designed to contain bounded identifiers,
220
+ outcomes, reasons, and latency—not request authorization, ServiceNow
221
+ credentials, profile references, ciphertext, or response bodies. Configure the
222
+ TLS proxy, orchestrator, and log collector to redact `Authorization`, cookies,
223
+ API-key headers, request/response bodies, environment dumps, and query strings.
224
+ Disable debug middleware that records complete headers or bodies. Redaction at
225
+ the application is not a reason to retain secret-bearing proxy access logs.
226
+
227
+ ## Network and DNS boundaries
228
+
229
+ Application validation and infrastructure network policy are both required.
230
+ Use default-deny ingress and egress at the workload identity, namespace,
231
+ security-group, firewall, or service-mesh layer.
232
+
233
+ | Direction | Allow only | Deny or isolate |
234
+ | --- | --- | --- |
235
+ | Inbound to TLS edge | Approved private connector and operator/client networks on TCP 443 | Direct public access when the release is private; all other ports |
236
+ | Edge to MCP process | Exact proxy/orchestrator identities to the configured MCP port | Internet clients, peer workloads, and bypass routes around TLS/authentication |
237
+ | Lifecycle probes | Orchestrator/proxy to `/health/live` and `/health/ready` | Public health scraping and using health as an MCP access path |
238
+ | MCP to ServiceNow | TCP 443 to the exact approved instance origins for configured profiles | Cleartext HTTP, arbitrary internet destinations, and unapproved ServiceNow tenants |
239
+ | DNS | The designated recursive resolver(s), using only the transport the platform requires | Arbitrary external resolvers and workload-controlled DNS overrides |
240
+ | Optional dependencies | Explicit secret-provider or log-export endpoints required by the deployment | Cloud metadata, control-plane APIs, and unrelated internal services |
241
+
242
+ The client constructs ServiceNow API paths on the configured HTTPS origin.
243
+ Runtime-added profiles accept ServiceNow SaaS hostnames or an operator-set
244
+ `SN_ALLOWED_INSTANCE_HOSTS` entry. That variable is a hostname admission check
245
+ for runtime-added profiles only: operator-loaded profile files may intentionally
246
+ name other HTTPS origins, and neither path pins DNS answers or destination IPs.
247
+ It is not a firewall.
248
+
249
+ Constrain every DNS answer and redirect at the egress layer. Block loopback,
250
+ link-local (including cloud metadata), multicast, and private address ranges
251
+ unless an approved self-hosted ServiceNow deployment requires an exact range.
252
+ If private ServiceNow is required, allow the smallest stable hostname and CIDR
253
+ set, route it through controlled DNS, and review changes before deployment.
254
+ DNS policy must cover UDP and TCP resolution, or the platform's approved
255
+ encrypted resolver transport, so a fallback path cannot bypass the allowlist.
256
+
257
+ ServiceNow table allowlists are a separate application-data boundary.
258
+ Per-profile `tableAccess` rules authorize application data; `SN_ALLOWED_READ_TABLES`,
259
+ `SN_ALLOWED_WRITE_TABLES`, and `SN_TABLE_ACCESS_TARGETS` are mapped only into
260
+ the explicit `SN_PROFILE_NAME` environment profile when no profile file exists.
261
+ These rules do not grant network reachability. Conversely, network reachability
262
+ to an instance does not authorize a table or tool.
263
+
264
+ ## Canonical deployment example
265
+
266
+ The following is a name-and-source map, not a file containing secret values.
267
+ Replace every angle-bracket entry through runtime secret/config injection.
268
+
269
+ ```text
270
+ MCP_HOST=127.0.0.1
271
+ MCP_PORT=3000
272
+ MCP_ALLOWED_HOSTS=mcp.example.com,mcp.example.com:443
273
+ MCP_ALLOWED_ORIGINS=https://approved-browser.example
274
+ MCP_BEARER_TOKEN=<runtime-secret:MCP_BEARER_TOKEN>
275
+ MCP_OWNER_ID=owner-production
276
+ MCP_CLIENT_ID=private-mcp-client
277
+
278
+ SN_PROFILE_NAME=prod
279
+ SN_INSTANCE=https://acme.service-now.com
280
+ SN_AUTH_TYPE=oauth
281
+ SN_GRANT_TYPE=client_credentials
282
+ SN_CLIENT_ID=<runtime-config:ServiceNow-OAuth-client-id>
283
+ SN_CLIENT_SECRET=<runtime-secret:SN_CLIENT_SECRET>
284
+ SN_PROFILE_ENCRYPTION_KEY=<runtime-secret:SN_PROFILE_ENCRYPTION_KEY>
285
+ SN_ALLOWED_INSTANCE_HOSTS=acme.service-now.com
286
+ SN_ALLOWED_READ_TABLES=incident,problem,change_request
287
+ SN_ALLOWED_WRITE_TABLES=incident,change_request
288
+ SN_TABLE_ACCESS_TARGETS=<runtime-config:reviewed-target-catalog>
289
+ SN_METADATA_CACHE_TTL_MS=86400000
290
+ SN_METADATA_CACHE_TABLES=sys_glide_object,sys_dictionary,sys_db_object,sys_app,sys_plugins,sys_metadata*,sys_flow*
291
+ ```
292
+
293
+ Metadata caching additionally requires a resolvable ServiceNow session
294
+ timezone: the freshness probe compares `sys_updated_on`, which the instance
295
+ evaluates in the session user's timezone. The zone is read from
296
+ `sys_user.time_zone` for the authenticating account, falling back to the
297
+ `glide.sys.default.tz` property, so the profile needs read access to `sys_user`
298
+ and `sys_properties` for the lookup to succeed. When it cannot be resolved the
299
+ cache disables itself for that identity rather than assuming UTC — an assumed
300
+ zone would serve silently stale metadata for the length of the offset. OAuth
301
+ client_credentials and API-key profiles carry no username and therefore cannot
302
+ cache metadata at all. Deletions to a cached table become visible within one
303
+ TTL, since the probe detects updates rather than deletes.
304
+
305
+ Journal content is readable on request. `comments` and `work_notes` on
306
+ `incident` are returned by `fields=all`, `response_format: "detailed"`, an
307
+ explicit `fields=comments`, and `sn_schema`; the default projection still
308
+ excludes them. Journal content on production instances routinely contains
309
+ customer PII, so a profile granted `incident` reads can retrieve
310
+ customer-visible commentary whenever the caller asks for it. Treat that as part
311
+ of the data classification when granting incident reads, and narrow it through
312
+ the field policy rather than relying on the default projection, which the
313
+ caller can override. Field names matching the sensitive-name pattern are
314
+ excluded from an unrestricted selection before the request is built, so those
315
+ values are never requested rather than being requested and scrubbed on arrival.
316
+
317
+ `sys_properties` is deliberately absent from that list. Rows in it are
318
+ ACL-restricted per user and routinely hold integration secrets in the `value`
319
+ column, and a cache hit is served without re-contacting ServiceNow, so the
320
+ caller's ACLs are not evaluated on the hit. Do not add it, and review any
321
+ table you do add against the same two questions: are its rows ACL-restricted
322
+ per user, and would a stale or cross-identity answer be a disclosure?
323
+
324
+ For a named profile, keep the secret out of JSON and reference the same
325
+ canonical runtime secret:
326
+
327
+ ```json
328
+ {
329
+ "version": 2,
330
+ "profiles": {
331
+ "production": {
332
+ "instance": "https://acme.service-now.com",
333
+ "authType": "oauth",
334
+ "grantType": "client_credentials",
335
+ "clientId": "configured-non-secret-client-id",
336
+ "clientSecret": {
337
+ "type": "secret_ref",
338
+ "provider": "env",
339
+ "reference": "SN_CLIENT_SECRET"
340
+ }
341
+ }
342
+ }
343
+ }
344
+ ```
345
+
346
+ ## Denied exposure patterns
347
+
348
+ Do not approve a deployment that has any of these properties:
349
+
350
+ - the MCP listener, health endpoints, or a public tunnel are directly exposed
351
+ to the internet;
352
+ - TLS below 1.2 is enabled, certificate validation is bypassed, or the
353
+ termination-to-process hop crosses an untrusted network in cleartext;
354
+ - the proxy trusts or forwards caller-supplied forwarding/identity headers;
355
+ - wildcard `Host`, reflected/wildcard `Origin`, or CORS is treated as caller
356
+ authentication;
357
+ - secrets are baked into an image or committed configuration, passed on a
358
+ command line, colocated with an encryption key, or emitted to logs;
359
+ - unrestricted DNS/egress can reach arbitrary internet, metadata, loopback,
360
+ link-local, or internal destinations; or
361
+ - `SN_ALLOWED_INSTANCE_HOSTS` or a table allowlist is represented as replacing
362
+ infrastructure egress policy.
363
+
364
+ Before release, test the TLS policy externally, inspect the final proxy header
365
+ set, exercise rejected `Host`/`Origin` cases, verify direct access to the MCP
366
+ port is blocked, test approved and denied DNS/egress destinations, scan the
367
+ image and rendered deployment configuration for secrets, and perform a staged
368
+ credential rotation with redaction verification.
@@ -0,0 +1,126 @@
1
+ # Profile credentials and out-of-band administration
2
+
3
+ ServiceNow MCP V2 stores each authentication secret as either a provider-neutral
4
+ secret reference or a versioned encrypted envelope. It never stores plaintext
5
+ credentials or the encryption key in `~/.servicenow-mcp/config.json`.
6
+
7
+ ## Administration entry point
8
+
9
+ After installing the package, invoke the dedicated operator-only executable:
10
+
11
+ ```sh
12
+ servicenow-mcp-profile create \
13
+ --name dev \
14
+ --instance https://dev.service-now.com \
15
+ --auth-type basic \
16
+ --username integration.user \
17
+ --source encrypted
18
+ ```
19
+
20
+ When working from a source checkout, build first and invoke the same artifact
21
+ directly:
22
+
23
+ ```sh
24
+ npm run build
25
+ node dist/profile-admin.js create \
26
+ --name dev \
27
+ --instance https://dev.service-now.com \
28
+ --auth-type basic \
29
+ --username integration.user \
30
+ --source encrypted
31
+ ```
32
+
33
+ When run in a terminal, the command prompts without echo. When standard input is
34
+ not a terminal, it reads bounded newline-delimited values from standard input.
35
+ Do not put passwords, API keys, client secrets, ciphertext, or secret references
36
+ in arguments. Credential-bearing options such as `--password`, `--credential`,
37
+ `--client-secret`, `--api-key`, and `--reference` are rejected.
38
+
39
+ For OAuth password grant, protected inputs are read in this order: user
40
+ credential, then OAuth client secret. Other modes read one value.
41
+
42
+ Available commands are:
43
+
44
+ ```text
45
+ create --name ... --instance ... [authentication metadata] --source encrypted
46
+ create --name ... --instance ... [authentication metadata] --source reference --provider ...
47
+ inspect --name ...
48
+ rotate --name ... --field credential|clientSecret|apiKey --source encrypted
49
+ rotate --name ... --field credential|clientSecret|apiKey --source reference --provider ...
50
+ remove --name ...
51
+ ```
52
+
53
+ `inspect` reports only safe profile metadata and source kinds. It never returns
54
+ references, ciphertext, keys, or decrypted credentials. The MCP `sn_profile`
55
+ tool remains read-only and has no create, remove, or rotation operation.
56
+
57
+ ## Two-profile isolation and recovery
58
+
59
+ For a complete two-profile walkthrough, create one profile with
60
+ `--source reference --provider env` and another with `--source encrypted` as
61
+ documented in [V2 service and client setup](CLIENT-SETUP.md). Enter the
62
+ reference name or protected value only through the non-echoed prompt or bounded
63
+ standard input. Never pass either value, ciphertext, or an encryption key in a
64
+ tool argument or command-line argument.
65
+
66
+ Each call still names exactly one profile. Resolving a referenced profile must
67
+ not resolve or construct the encrypted profile, and vice versa. Successful
68
+ results and bounded audit events identify the same resolved profile and
69
+ canonical instance. There is no default, active-profile state, or switch
70
+ operation.
71
+
72
+ Keep `SN_PROFILE_ENCRYPTION_KEY` in a separate approved key system, distinct
73
+ from the MCP bearer, where one is configured, and every ServiceNow credential. A process has one key for
74
+ the encrypted envelopes in its profile file; profiles that require independent
75
+ key trust domains require separate private service deployments.
76
+
77
+ Back up only the owner-only encrypted/reference profile file and non-secret
78
+ version metadata. Exclude keys, plaintext, secret-manager exports, environment
79
+ dumps, and resolver credentials. Track the matching key version separately so
80
+ the backup is a recoverable pair without colocating its parts. For rotation,
81
+ prepare a complete working file under the new key, re-enter every encrypted
82
+ field, verify both explicit profiles, deploy the new file/key pair together,
83
+ and only then retire the old pair. Never serve mixed envelopes requiring
84
+ different keys.
85
+
86
+ Test recovery in an isolated private environment: restore owner-only
87
+ permissions, inject the matching key and resolver access separately, inspect
88
+ safe metadata, start the server, and run one bounded read for each explicit
89
+ profile. Verify crossed result/audit profile bindings and that a wrong key or
90
+ resolver failure stops before client construction. Retain the old pair until
91
+ that verification succeeds.
92
+
93
+ ## Local encrypted storage
94
+
95
+ Encrypted values use AES-256-GCM with a fresh 96-bit nonce. The envelope records
96
+ only version, algorithm, nonce, authentication tag, and ciphertext. Authenticated
97
+ metadata binds the value to its profile name and credential field, so moving an
98
+ envelope to another profile or field fails authentication.
99
+
100
+ Supply exactly 32 random key bytes encoded as base64 or base64url through the
101
+ canonical `SN_PROFILE_ENCRYPTION_KEY` setting. Inject it separately through the
102
+ deployment secret mechanism or OS keychain; never add it to the profile file,
103
+ source tree, command arguments, logs, or diagnostics. A missing, malformed, or
104
+ wrong key fails before ServiceNow client construction.
105
+
106
+ ## Secret references
107
+
108
+ The core defines a provider-neutral resolver interface and includes only an
109
+ environment adapter. New environment references use the canonical `SN_*`
110
+ namespace. Other providers are supplied as adapters by the embedding
111
+ deployment; no cloud SDK is linked into the core. References resolve only when
112
+ `ProfileManager.getConfig(profile)` constructs the selected execution
113
+ configuration.
114
+
115
+ ## Storage and migration behavior
116
+
117
+ Configuration updates use an owner-only lock, write and sync a unique temporary
118
+ file, atomically rename it, and enforce mode `0600` on the file and `0700` on its
119
+ directory where the platform supports POSIX permissions.
120
+
121
+ V1 `env:...` references remain readable. Canonical `env:SN_*` values migrate to
122
+ structured references on the next write. A raw legacy plaintext credential is
123
+ rejected instead of being loaded or silently falling back to environment
124
+ configuration. To recover such a file, keep any backup owner-only, remove every
125
+ plaintext secret from the active configuration, and recreate or rotate each
126
+ credential through the protected administration entry point.
@@ -0,0 +1,140 @@
1
+ # Provider-neutral release validation
2
+
3
+ SNSDK-57 defines one release workflow for the HTTP artifact. It is independent
4
+ of ChatGPT, Claude, and every other AI provider. The portable gates use local
5
+ fakes and the protected `/mcp` protocol surface; they do not contact ServiceNow.
6
+ This workflow does not create a tunnel, public endpoint, deployment, package
7
+ publication, or provider integration.
8
+
9
+ ## Portable release gates
10
+
11
+ Run from a clean checkout on a supported Node.js version:
12
+
13
+ ```sh
14
+ npm ci --engine-strict
15
+ npm run release:contract
16
+ npm run typecheck
17
+ npm run lint
18
+ npm run build
19
+ npm run test:unit
20
+ npm run test:protocol
21
+ npm run test:profile
22
+ npm run test:release
23
+ npm pack --dry-run --json --ignore-scripts
24
+ npm audit --omit=dev --audit-level=moderate
25
+ ```
26
+
27
+ The unit and protocol commands are deliberately separate release records even
28
+ though the complete unit suite contains the focused protocol cases. The
29
+ protocol gate includes the all-19-tool missing-profile rejection matrix through
30
+ the official SDK and independent Fetch clients, plus the catalog-wide resolved
31
+ profile/result/audit contract. The profile gate covers encryption,
32
+ secret-reference resolution, operator administration, and profile isolation.
33
+
34
+ Archive the package archive manifest from the dry run, including every path,
35
+ size, package version, and integrity value. The production dependency audit
36
+ must contain no unresolved moderate-or-higher finding. Never archive an
37
+ environment dump, credential, bearer, profile file, ServiceNow response, or
38
+ request body.
39
+
40
+ ## Inspector and second-client check
41
+
42
+ MCP Inspector is an optional release client, not a runtime dependency. Version
43
+ `2.0.0` and its registry integrity are locked under `tools/inspector/`; its
44
+ Node.js `>=22.19.0` requirement is isolated so the server remains supported on
45
+ Node.js 20. Install that toolchain only from the committed lock:
46
+
47
+ ```sh
48
+ npm ci --prefix tools/inspector --engine-strict --ignore-scripts
49
+ npm audit --prefix tools/inspector --audit-level=moderate
50
+ ```
51
+
52
+ Set the non-secret `MCP_URL` to the exact reviewed `/mcp` URL and set
53
+ `MCP_PROFILE` to the named test profile. Have the approved supervisor or secret
54
+ manager inject the bearer into the service and smoke-client processes. Release
55
+ validation always runs against an authenticated service: `MCP_BEARER_TOKEN` is
56
+ optional for the product but required for these gates, and `npm run smoke`
57
+ refuses to start without it. Do not
58
+ put it in shell input or Inspector arguments. On Node.js 22.19 or newer, run:
59
+
60
+ ```sh
61
+ npm run inspector
62
+ ```
63
+
64
+ The launcher starts the locked Inspector UI and proxy on loopback, preserves
65
+ Inspector proxy authentication, disables automatic browser opening, scrubs MCP
66
+ and ServiceNow secrets from the child environment, and passes no target or
67
+ bearer header in argv. In the local UI:
68
+
69
+ 1. Select Streamable HTTP and enter the exact `MCP_URL` shown by the launcher.
70
+ 2. Enter the bearer directly from the approved secret store in the local UI.
71
+ 3. Run `tools/list`; verify exactly 19 tools and required non-empty `profile`
72
+ schemas.
73
+ 4. Call `sn_profile` once without `profile` and verify rejection.
74
+ 5. Call it again with the exact `MCP_PROFILE`; verify
75
+ `structuredContent.profile` and the safe audit record match.
76
+
77
+ Without changing `MCP_URL`, `MCP_PROFILE`, or the protected endpoint, run the
78
+ official SDK smoke client as the second client:
79
+
80
+ ```sh
81
+ npm run smoke
82
+ ```
83
+
84
+ The smoke client requires an explicit URL, bearer, and profile and applies a
85
+ 30-second per-operation timeout by default. `MCP_SMOKE_TIMEOUT_MS` may be set to
86
+ an integer from 1000 through 120000. It validates the resolved profile on every
87
+ successful probe. Neither launcher installs a provider adapter or creates a
88
+ public tunnel. Inspector is interactive evidence; it cannot replace the
89
+ deterministic CI protocol matrix.
90
+
91
+ ## Deliberately enabled disposable writes
92
+
93
+ The smoke client is read-only unless both the write switch and an exact-profile
94
+ confirmation are present. On a disposable authorized PDI only:
95
+
96
+ ```sh
97
+ npm run smoke -- --write --confirm-write-profile=oauth-test
98
+ ```
99
+
100
+ The confirmation must exactly equal `MCP_PROFILE`. The sequence creates one
101
+ incident, reads its canonical `structuredContent.data.sys_id`, appends one work
102
+ note, and attempts deletion in `finally`. Never enable it for production or a
103
+ shared instance. A failed deletion is a failed smoke result and requires manual
104
+ cleanup by an authorized instance owner.
105
+
106
+ ## Container, artifact, and rollback evidence
107
+
108
+ The container validation and scan gate is separate because it requires Docker
109
+ and a supported pinned scanner:
110
+
111
+ ```sh
112
+ npm run container:build
113
+ npm run container:validate
114
+ MCP_CONTAINER_SCANNER=trivy npm run container:scan
115
+ ```
116
+
117
+ The checked-in workflows download the immutable Trivy `0.70.0` Linux archive
118
+ directly from its official release, verify its committed SHA-256 digest before
119
+ installation, and do not invoke a mutable scanner setup action.
120
+
121
+ CI builds before validation, runs the official SDK and independent Fetch client
122
+ against the same local image, and scans that exact tag. Record the image ID,
123
+ platform manifest digest, labels, validation summary, scanner/version/database
124
+ timestamp, and result. The provenance archive remains a separately authorized
125
+ release action and is never published by these checks.
126
+
127
+ Before any rollout, record the previous immutable artifact digest and the exact
128
+ configuration revision needed for rollback. Rollback means redeploying that
129
+ previous reviewed digest—not rebuilding a mutable tag—then repeating health,
130
+ two-client discovery, explicit-profile, audit, and secret-leak checks. Stop the
131
+ release when the tag differs from `v<package.json version>`, evidence is
132
+ missing, a scan/audit fails, cleanup fails, or any gate requires weakening a
133
+ profile, authentication, table, field, or transport boundary.
134
+
135
+ The roadmap does not authorize SNSDK-57 to choose a new semantic version. The
136
+ current package and lock version remain unchanged until a release owner selects
137
+ the target; stable-tag publication fails unless the tag exactly matches them.
138
+
139
+ The Inspector operating model and security constraints are documented by the
140
+ [official MCP Inspector project](https://github.com/modelcontextprotocol/inspector).