saktum 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/package.json +1 -1
- package/saktum.mjs +180 -69
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Saktum Check
|
|
2
2
|
|
|
3
3
|
**Test your MCP server in one command:** conformance, sign-in, security mapped to the **OWASP MCP Top 10**, agent
|
|
4
|
-
experience, what your tools cost an agent in context, and performance.
|
|
5
|
-
signed result anyone can verify.
|
|
4
|
+
experience, what your tools cost an agent in context, and performance. Two grades (**trust** and **agent readiness**),
|
|
5
|
+
plain findings, a fix for each, and a signed result anyone can verify.
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
npx saktum check -- npx -y @your/mcp-server # a local server
|
|
@@ -32,7 +32,9 @@ Runs on your machine. Nothing is uploaded. Your own environment variables are ne
|
|
|
32
32
|
Evidence: at handleCall (/home/deploy/acme-mcp/src/handlers.js:42:11)
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**Two grades.** *Trust* covers conformance, sign-in and security; *agent readiness* covers whether agents can choose and
|
|
36
|
+
use your tools safely and cheaply (danger annotations, descriptions, context cost). Readiness never changes the trust
|
|
37
|
+
grade. Every report ends with **OWASP MCP Top 10 coverage**: which categories this run tested and which come later.
|
|
36
38
|
|
|
37
39
|
## What it checks (v0.1: 24 checks)
|
|
38
40
|
|
package/package.json
CHANGED
package/saktum.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Saktum Check 0.1.
|
|
2
|
+
// Saktum Check 0.1.4 (private beta). Licensed Apache-2.0; bundled dependencies keep their own licences.
|
|
3
3
|
import { createRequire as __saktumCreateRequire } from "node:module";
|
|
4
4
|
const require = __saktumCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -13435,9 +13435,9 @@ var require_data = __commonJS({
|
|
|
13435
13435
|
}
|
|
13436
13436
|
});
|
|
13437
13437
|
|
|
13438
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
13438
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js
|
|
13439
13439
|
var require_utils = __commonJS({
|
|
13440
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
13440
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
13441
13441
|
"use strict";
|
|
13442
13442
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
13443
13443
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -13669,6 +13669,37 @@ var require_utils = __commonJS({
|
|
|
13669
13669
|
}
|
|
13670
13670
|
return output.join("");
|
|
13671
13671
|
}
|
|
13672
|
+
function removeDotSegmentsRelative(path) {
|
|
13673
|
+
if (path === "" || path[0] === "/") {
|
|
13674
|
+
return removeDotSegments(path);
|
|
13675
|
+
}
|
|
13676
|
+
const segments = path.split("/");
|
|
13677
|
+
const last = segments.length - 1;
|
|
13678
|
+
const output = [];
|
|
13679
|
+
let trailingDirectory = false;
|
|
13680
|
+
for (let i = 0; i <= last; i++) {
|
|
13681
|
+
const segment = segments[i];
|
|
13682
|
+
if (segment === "." || segment === "..") {
|
|
13683
|
+
if (segment === "..") {
|
|
13684
|
+
if (output.length !== 0 && output[output.length - 1] !== "..") {
|
|
13685
|
+
output.pop();
|
|
13686
|
+
} else {
|
|
13687
|
+
output.push("..");
|
|
13688
|
+
}
|
|
13689
|
+
}
|
|
13690
|
+
trailingDirectory = i === last;
|
|
13691
|
+
} else {
|
|
13692
|
+
output.push(segment);
|
|
13693
|
+
}
|
|
13694
|
+
}
|
|
13695
|
+
if (trailingDirectory && output[output.length - 1] !== "..") {
|
|
13696
|
+
output.push("");
|
|
13697
|
+
}
|
|
13698
|
+
if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
|
|
13699
|
+
output.unshift(".");
|
|
13700
|
+
}
|
|
13701
|
+
return output.join("/");
|
|
13702
|
+
}
|
|
13672
13703
|
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
13673
13704
|
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
13674
13705
|
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
@@ -13929,6 +13960,7 @@ var require_utils = __commonJS({
|
|
|
13929
13960
|
encodeFragment,
|
|
13930
13961
|
escapePreservingEscapes,
|
|
13931
13962
|
removeDotSegments,
|
|
13963
|
+
removeDotSegmentsRelative,
|
|
13932
13964
|
isIPv4,
|
|
13933
13965
|
isUUID,
|
|
13934
13966
|
normalizeIPv6,
|
|
@@ -13937,9 +13969,9 @@ var require_utils = __commonJS({
|
|
|
13937
13969
|
}
|
|
13938
13970
|
});
|
|
13939
13971
|
|
|
13940
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
13972
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js
|
|
13941
13973
|
var require_schemes = __commonJS({
|
|
13942
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
13974
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
13943
13975
|
"use strict";
|
|
13944
13976
|
var { isUUID } = require_utils();
|
|
13945
13977
|
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
@@ -14148,20 +14180,22 @@ var require_schemes = __commonJS({
|
|
|
14148
14180
|
}
|
|
14149
14181
|
});
|
|
14150
14182
|
|
|
14151
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
14183
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js
|
|
14152
14184
|
var require_fast_uri = __commonJS({
|
|
14153
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
14185
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js"(exports, module) {
|
|
14154
14186
|
"use strict";
|
|
14155
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
14187
|
+
var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
14156
14188
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
14157
14189
|
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
14158
14190
|
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14191
|
+
var MALFORMED_HOST_ERROR = "URI host is malformed.";
|
|
14192
|
+
var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
|
|
14193
|
+
function validateScheme(scheme) {
|
|
14194
|
+
const stringScheme = String(scheme);
|
|
14195
|
+
if (!VALID_SCHEME.test(stringScheme)) {
|
|
14162
14196
|
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
14163
14197
|
}
|
|
14164
|
-
return
|
|
14198
|
+
return stringScheme;
|
|
14165
14199
|
}
|
|
14166
14200
|
function normalize(uri, options) {
|
|
14167
14201
|
if (typeof uri === "string") {
|
|
@@ -14198,6 +14232,9 @@ var require_fast_uri = __commonJS({
|
|
|
14198
14232
|
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
14199
14233
|
const resolvedHost = resolved.host;
|
|
14200
14234
|
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
14235
|
+
if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
|
|
14236
|
+
throw new Error(MALFORMED_HOST_ERROR);
|
|
14237
|
+
}
|
|
14201
14238
|
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
14202
14239
|
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
14203
14240
|
if (resolved.error && !encodedASCIIHost) {
|
|
@@ -14239,14 +14276,15 @@ var require_fast_uri = __commonJS({
|
|
|
14239
14276
|
if (relative.path[0] === "/") {
|
|
14240
14277
|
target.path = removeDotSegments(relative.path);
|
|
14241
14278
|
} else {
|
|
14242
|
-
|
|
14279
|
+
const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
|
|
14280
|
+
if (baseHasAuthority && !base.path) {
|
|
14243
14281
|
target.path = "/" + relative.path;
|
|
14244
14282
|
} else if (!base.path) {
|
|
14245
14283
|
target.path = relative.path;
|
|
14246
14284
|
} else {
|
|
14247
14285
|
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
14248
14286
|
}
|
|
14249
|
-
target.path = removeDotSegments(target.path);
|
|
14287
|
+
target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
|
|
14250
14288
|
}
|
|
14251
14289
|
target.query = relative.query;
|
|
14252
14290
|
}
|
|
@@ -14284,12 +14322,13 @@ var require_fast_uri = __commonJS({
|
|
|
14284
14322
|
const options = Object.assign({}, opts);
|
|
14285
14323
|
const uriTokens = [];
|
|
14286
14324
|
if (component.scheme) {
|
|
14287
|
-
component.scheme =
|
|
14325
|
+
component.scheme = validateScheme(component.scheme);
|
|
14288
14326
|
}
|
|
14289
14327
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
14290
14328
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
14291
14329
|
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
14292
|
-
const
|
|
14330
|
+
const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
|
|
14331
|
+
const pathNoScheme = !options.skipEscape && schemelessReference;
|
|
14293
14332
|
if (component.path !== void 0) {
|
|
14294
14333
|
if (!options.skipEscape) {
|
|
14295
14334
|
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
@@ -14298,7 +14337,7 @@ var require_fast_uri = __commonJS({
|
|
|
14298
14337
|
}
|
|
14299
14338
|
}
|
|
14300
14339
|
if (options.reference !== "suffix" && component.scheme) {
|
|
14301
|
-
component.scheme =
|
|
14340
|
+
component.scheme = validateScheme(component.scheme);
|
|
14302
14341
|
uriTokens.push(component.scheme, ":");
|
|
14303
14342
|
}
|
|
14304
14343
|
const authority = recomposeAuthority(component);
|
|
@@ -14314,9 +14353,9 @@ var require_fast_uri = __commonJS({
|
|
|
14314
14353
|
if (component.path !== void 0) {
|
|
14315
14354
|
let s = component.path;
|
|
14316
14355
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
14317
|
-
s = removeDotSegments(s);
|
|
14356
|
+
s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
|
|
14318
14357
|
}
|
|
14319
|
-
if (
|
|
14358
|
+
if (schemelessReference) {
|
|
14320
14359
|
s = serializePathEncoding(s, true);
|
|
14321
14360
|
}
|
|
14322
14361
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") {
|
|
@@ -14363,16 +14402,34 @@ var require_fast_uri = __commonJS({
|
|
|
14363
14402
|
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
14364
14403
|
}
|
|
14365
14404
|
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
14405
|
+
if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
|
|
14406
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
14407
|
+
return true;
|
|
14408
|
+
}
|
|
14366
14409
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
14410
|
+
let url2;
|
|
14367
14411
|
try {
|
|
14368
|
-
|
|
14412
|
+
url2 = new URL("http://" + parsed.host);
|
|
14369
14413
|
} catch (e) {
|
|
14370
14414
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
14371
14415
|
return true;
|
|
14372
14416
|
}
|
|
14417
|
+
if (!isHostOnlyURL(url2)) {
|
|
14418
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
14419
|
+
return true;
|
|
14420
|
+
}
|
|
14421
|
+
parsed.host = url2.hostname;
|
|
14373
14422
|
}
|
|
14374
14423
|
return false;
|
|
14375
14424
|
}
|
|
14425
|
+
function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
|
|
14426
|
+
return Boolean(
|
|
14427
|
+
parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
|
|
14428
|
+
);
|
|
14429
|
+
}
|
|
14430
|
+
function isHostOnlyURL(url2) {
|
|
14431
|
+
return url2.username === "" && url2.password === "" && url2.port === "" && url2.pathname === "/" && url2.search === "" && url2.hash === "" && url2.hostname !== "";
|
|
14432
|
+
}
|
|
14376
14433
|
function parseWithStatus(uri, opts) {
|
|
14377
14434
|
const options = Object.assign({}, opts);
|
|
14378
14435
|
const parsed = {
|
|
@@ -14427,9 +14484,8 @@ var require_fast_uri = __commonJS({
|
|
|
14427
14484
|
parsed.query = matches[7];
|
|
14428
14485
|
parsed.fragment = matches[8];
|
|
14429
14486
|
if (parsed.scheme !== void 0) {
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
parsed.scheme = decodedScheme.toLowerCase();
|
|
14487
|
+
if (VALID_SCHEME.test(parsed.scheme)) {
|
|
14488
|
+
parsed.scheme = parsed.scheme.toLowerCase();
|
|
14433
14489
|
} else {
|
|
14434
14490
|
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
14435
14491
|
malformedScheme = true;
|
|
@@ -14457,7 +14513,7 @@ var require_fast_uri = __commonJS({
|
|
|
14457
14513
|
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
14458
14514
|
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
14459
14515
|
if (malformedIPLiteral) {
|
|
14460
|
-
parsed.error = parsed.error ||
|
|
14516
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
14461
14517
|
malformedAuthorityOrPort = true;
|
|
14462
14518
|
}
|
|
14463
14519
|
} else {
|
|
@@ -14485,7 +14541,7 @@ var require_fast_uri = __commonJS({
|
|
|
14485
14541
|
if (!isIP) {
|
|
14486
14542
|
host = normalizePercentEncoding(host.toLowerCase());
|
|
14487
14543
|
}
|
|
14488
|
-
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
14544
|
+
parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
|
|
14489
14545
|
}
|
|
14490
14546
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
14491
14547
|
if (parsed.path) {
|
|
@@ -17110,11 +17166,11 @@ var require_format = __commonJS({
|
|
|
17110
17166
|
}
|
|
17111
17167
|
function getFormat(fmtDef) {
|
|
17112
17168
|
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
17113
|
-
const
|
|
17169
|
+
const fmt2 = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
|
|
17114
17170
|
if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
|
|
17115
|
-
return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${
|
|
17171
|
+
return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt2}.validate`];
|
|
17116
17172
|
}
|
|
17117
|
-
return ["string", fmtDef,
|
|
17173
|
+
return ["string", fmtDef, fmt2];
|
|
17118
17174
|
}
|
|
17119
17175
|
function validCondition() {
|
|
17120
17176
|
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
@@ -18737,8 +18793,8 @@ var require_limit = __commonJS({
|
|
|
18737
18793
|
ref: self.formats,
|
|
18738
18794
|
code: opts.code.formats
|
|
18739
18795
|
});
|
|
18740
|
-
const
|
|
18741
|
-
cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${
|
|
18796
|
+
const fmt2 = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
|
|
18797
|
+
cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt2} != "object"`, (0, codegen_1._)`${fmt2} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt2}.compare != "function"`, compareCode(fmt2)));
|
|
18742
18798
|
}
|
|
18743
18799
|
function validateFormat() {
|
|
18744
18800
|
const format = fCxt.schema;
|
|
@@ -18748,15 +18804,15 @@ var require_limit = __commonJS({
|
|
|
18748
18804
|
if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
|
|
18749
18805
|
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
|
|
18750
18806
|
}
|
|
18751
|
-
const
|
|
18807
|
+
const fmt2 = gen.scopeValue("formats", {
|
|
18752
18808
|
key: format,
|
|
18753
18809
|
ref: fmtDef,
|
|
18754
18810
|
code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
|
|
18755
18811
|
});
|
|
18756
|
-
cxt.fail$data(compareCode(
|
|
18812
|
+
cxt.fail$data(compareCode(fmt2));
|
|
18757
18813
|
}
|
|
18758
|
-
function compareCode(
|
|
18759
|
-
return (0, codegen_1._)`${
|
|
18814
|
+
function compareCode(fmt2) {
|
|
18815
|
+
return (0, codegen_1._)`${fmt2}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
18760
18816
|
}
|
|
18761
18817
|
},
|
|
18762
18818
|
dependencies: ["format"]
|
|
@@ -19804,7 +19860,7 @@ var EMBEDDED_CONTRACTS = { "envelope.schema.json": `{
|
|
|
19804
19860
|
}
|
|
19805
19861
|
}
|
|
19806
19862
|
}
|
|
19807
|
-
`, "result.schema.json": '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://saktum.dev/schemas/result/0.1.json",\n "title": "Saktum Trust Check result",\n "description": "The canonical result of one run. Every report format is rendered from this model. Evidence is a hash plus a short, sanitised excerpt; raw payloads never appear.",\n "type": "object",\n "required": [\n "resultFormat",\n "tool",\n "target",\n "packs",\n "findings",\n "scores",\n "metrics",\n "run"\n ],\n "additionalProperties": false,\n "properties": {\n "resultFormat": {\n "const": "0.1"\n },\n "tool": {\n "type": "object",\n "required": [\n "name",\n "version"\n ],\n "additionalProperties": false,\n "properties": {\n "name": {\n "const": "saktum-trust-check"\n },\n "version": {\n "type": "string"\n }\n }\n },\n "target": {\n "type": "object",\n "required": [\n "transport",\n "description"\n ],\n "additionalProperties": false,\n "properties": {\n "transport": {\n "enum": [\n "stdio",\n "streamable-http"\n ]\n },\n "description": {\n "type": "string"\n },\n "protocolVersion": {\n "type": "string"\n },\n "serverInfo": {\n "type": "object"\n },\n "toolsFingerprint": {\n "type": "string",\n "pattern": "^sha256:[0-9a-f]{64}$"\n },\n "toolCount": {\n "type": "integer",\n "minimum": 0\n }\n }\n },\n "packs": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id",\n "version",\n "hash"\n ],\n "additionalProperties": false,\n "properties": {\n "id": {\n "type": "string"\n },\n "version": {\n "type": "string"\n },\n "hash": {\n "type": "string",\n "pattern": "^sha256:[0-9a-f]{64}$"\n }\n }\n }\n },\n "findings": {\n "type": "array",\n "items": {\n "$ref": "#/$defs/finding"\n }\n },\n "scores": {\n "type": "object",\n "required": [\n "overall",\n "capped",\n "categories"\n ],\n "additionalProperties": false,\n "properties": {\n "overall": {\n "type": [\n "integer",\n "null"\n ],\n "minimum": 0,\n "maximum": 100\n },\n "capped": {\n "type": "boolean"\n },\n "categories": {\n "type": "object",\n "additionalProperties": {\n "type": [\n "integer",\n "null"\n ]\n }\n }\n }\n },\n "metrics": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "contextCostTokens": {\n "type": "integer",\n "minimum": 0\n },\n "largestTools": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "tool",\n "tokens"\n ],\n "properties": {\n "tool": {\n "type": "string"\n },\n "tokens": {\n "type": "integer"\n }\n }\n }\n },\n "contextCostPer1kTurnsUsd": {\n "type": "number",\n "minimum": 0,\n "description": "Estimated cost of loading the tool definitions on 1,000 agent turns at pricePerMTokUsd. Reported only."\n },\n "pricePerMTokUsd": {\n "type": "number",\n "minimum": 0\n },\n "performance": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "initMs": {\n "type": "integer",\n "minimum": 0\n },\n "listMs": {\n "type": "integer",\n "minimum": 0\n },\n "listBytes": {\n "type": "integer",\n "minimum": 0\n },\n "rssMb": {\n "type": "number",\n "minimum": 0\n },\n "cpuPct": {\n "type": "number",\n "minimum": 0\n },\n "burst": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "requests": {\n "type": "integer"\n },\n "ok": {\n "type": "integer"\n },\n "rateLimited": {\n "type": "integer"\n },\n "errors": {\n "type": "integer"\n },\n "p95Ms": {\n "type": "integer"\n }\n }\n }\n }\n }\n }\n },\n "run": {\n "type": "object",\n "required": [\n "startedAt",\n "durationMs",\n "mode",\n "runner",\n "sandbox"\n ],\n "additionalProperties": false,\n "properties": {\n "startedAt": {\n "type": "string",\n "format": "date-time"\n },\n "durationMs": {\n "type": "integer",\n "minimum": 0\n },\n "mode": {\n "enum": [\n "passive",\n "active"\n ]\n },\n "runner": {\n "enum": [\n "self",\n "hosted"\n ],\n "description": "self: run and signed by the user, proves integrity not independence. hosted: run and signed by Saktum (later)."\n },\n "sandbox": {\n "enum": [\n "none",\n "docker"\n ],\n "description": "Whether local servers ran inside a container sandbox."\n }\n }\n },\n "signature": {\n "type": "object",\n "required": [\n "alg",\n "kid",\n "jws"\n ],\n "additionalProperties": false,\n "properties": {\n "alg": {\n "const": "EdDSA"\n },\n "kid": {\n "type": "string",\n "pattern": "^did:key:z"\n },\n "jws": {\n "type": "string"\n }\n }\n },\n "grade": {\n "enum": [\n "A",\n "B",\n "C",\n "D",\n "F",\n null\n ],\n "description": "Letter grade from the trust score: A 90-100, B 80-89, C 70-79, D 50-69, F below 50 or any failed critical check."\n },\n "summary": {\n "type": "array",\n "maxItems": 5,\n "items": {\n "type": "string",\n "maxLength": 400\n },\n "description": "Plain-language summary sentences shown first in every report."\n },\n "assuranceLevel": {\n "enum": [\n "L1",\n "L2",\n "L3",\n "L4"\n ],\n "description": "L1 self-tested (Saktum Check); L2 independently tested; L3 certified; L4 continuously certified."\n }\n },\n "$defs": {\n "finding": {\n "type": "object",\n "required": [\n "check",\n "pack",\n "status",\n "severity",\n "title"\n ],\n "additionalProperties": false,\n "properties": {\n "check": {\n "type": "string"\n },\n "pack": {\n "type": "string"\n },\n "status": {\n "enum": [\n "pass",\n "fail",\n "skipped",\n "inconclusive",\n "info"\n ]\n },\n "severity": {\n "enum": [\n "critical",\n "high",\n "medium",\n "low",\n "info"\n ]\n },\n "scored": {\n "type": "boolean"\n },\n "title": {\n "type": "string"\n },\n "subject": {\n "type": "string"\n },\n "message": {\n "type": "string"\n },\n "fix": {\n "type": "string"\n },\n "references": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "evidence": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "hash": {\n "type": "string"\n },\n "excerpt": {\n "type": "string",\n "maxLength": 240\n }\n }\n }\n }\n }\n }\n}\n', "test-cases.schema.json": '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://saktum.dev/schemas/test-cases/0.1.json",\n "title": "Saktum Trust Check functional test cases (saktum.tests.yaml)",\n "type": "object",\n "required": ["testsFormat", "tests"],\n "additionalProperties": false,\n "properties": {\n "testsFormat": { "const": "0.1" },\n "tests": {\n "type": "array",\n "items": {\n "type": "object",\n "required": ["id", "tool", "input", "expect"],\n "additionalProperties": false,\n "properties": {\n "id": { "type": "string" },\n "tool": { "type": "string" },\n "input": { "type": "object" },\n "sideEffects": { "type": "boolean", "default": false, "description": "Tests with side effects run only against owned targets." },\n "expect": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "isError": { "type": "boolean" },\n "textContains": { "type": "string" },\n "structured": { "type": "object" },\n "outputSchema": { "type": "boolean" },\n "latencyMs": { "type": "object", "properties": { "lt": { "type": "integer" } }, "additionalProperties": false }\n }\n }\n }\n }\n }\n }\n}\n' };
|
|
19863
|
+
`, "result.schema.json": '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://saktum.dev/schemas/result/0.1.json",\n "title": "Saktum Trust Check result",\n "description": "The canonical result of one run. Every report format is rendered from this model. Evidence is a hash plus a short, sanitised excerpt; raw payloads never appear.",\n "type": "object",\n "required": [\n "resultFormat",\n "tool",\n "target",\n "packs",\n "findings",\n "scores",\n "metrics",\n "run"\n ],\n "additionalProperties": false,\n "properties": {\n "resultFormat": {\n "const": "0.1"\n },\n "tool": {\n "type": "object",\n "required": [\n "name",\n "version"\n ],\n "additionalProperties": false,\n "properties": {\n "name": {\n "const": "saktum-trust-check"\n },\n "version": {\n "type": "string"\n }\n }\n },\n "target": {\n "type": "object",\n "required": [\n "transport",\n "description"\n ],\n "additionalProperties": false,\n "properties": {\n "transport": {\n "enum": [\n "stdio",\n "streamable-http"\n ]\n },\n "description": {\n "type": "string"\n },\n "protocolVersion": {\n "type": "string"\n },\n "serverInfo": {\n "type": "object"\n },\n "toolsFingerprint": {\n "type": "string",\n "pattern": "^sha256:[0-9a-f]{64}$"\n },\n "toolCount": {\n "type": "integer",\n "minimum": 0\n }\n }\n },\n "packs": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id",\n "version",\n "hash"\n ],\n "additionalProperties": false,\n "properties": {\n "id": {\n "type": "string"\n },\n "version": {\n "type": "string"\n },\n "hash": {\n "type": "string",\n "pattern": "^sha256:[0-9a-f]{64}$"\n }\n }\n }\n },\n "findings": {\n "type": "array",\n "items": {\n "$ref": "#/$defs/finding"\n }\n },\n "scores": {\n "type": "object",\n "required": [\n "overall",\n "capped",\n "categories"\n ],\n "additionalProperties": false,\n "properties": {\n "overall": {\n "type": [\n "integer",\n "null"\n ],\n "minimum": 0,\n "maximum": 100\n },\n "capped": {\n "type": "boolean"\n },\n "categories": {\n "type": "object",\n "additionalProperties": {\n "type": [\n "integer",\n "null"\n ]\n }\n }\n }\n },\n "metrics": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "contextCostTokens": {\n "type": "integer",\n "minimum": 0\n },\n "largestTools": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "tool",\n "tokens"\n ],\n "properties": {\n "tool": {\n "type": "string"\n },\n "tokens": {\n "type": "integer"\n }\n }\n }\n },\n "contextCostPer1kTurnsUsd": {\n "type": "number",\n "minimum": 0,\n "description": "Estimated cost of loading the tool definitions on 1,000 agent turns at pricePerMTokUsd. Reported only."\n },\n "pricePerMTokUsd": {\n "type": "number",\n "minimum": 0\n },\n "performance": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "initMs": {\n "type": "integer",\n "minimum": 0\n },\n "listMs": {\n "type": "integer",\n "minimum": 0\n },\n "listBytes": {\n "type": "integer",\n "minimum": 0\n },\n "rssMb": {\n "type": "number",\n "minimum": 0\n },\n "cpuPct": {\n "type": "number",\n "minimum": 0\n },\n "burst": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "requests": {\n "type": "integer"\n },\n "ok": {\n "type": "integer"\n },\n "rateLimited": {\n "type": "integer"\n },\n "errors": {\n "type": "integer"\n },\n "p95Ms": {\n "type": "integer"\n }\n }\n }\n }\n }\n }\n },\n "run": {\n "type": "object",\n "required": [\n "startedAt",\n "durationMs",\n "mode",\n "runner",\n "sandbox"\n ],\n "additionalProperties": false,\n "properties": {\n "startedAt": {\n "type": "string",\n "format": "date-time"\n },\n "durationMs": {\n "type": "integer",\n "minimum": 0\n },\n "mode": {\n "enum": [\n "passive",\n "active"\n ]\n },\n "runner": {\n "enum": [\n "self",\n "hosted"\n ],\n "description": "self: run and signed by the user, proves integrity not independence. hosted: run and signed by Saktum (later)."\n },\n "sandbox": {\n "enum": [\n "none",\n "docker"\n ],\n "description": "Whether local servers ran inside a container sandbox."\n }\n }\n },\n "signature": {\n "type": "object",\n "required": [\n "alg",\n "kid",\n "jws"\n ],\n "additionalProperties": false,\n "properties": {\n "alg": {\n "const": "EdDSA"\n },\n "kid": {\n "type": "string",\n "pattern": "^did:key:z"\n },\n "jws": {\n "type": "string"\n }\n }\n },\n "grade": {\n "enum": [\n "A",\n "B",\n "C",\n "D",\n "F",\n null\n ],\n "description": "Letter grade from the trust score: A 90-100, B 80-89, C 70-79, D 50-69, F below 50 or any failed critical check."\n },\n "summary": {\n "type": "array",\n "maxItems": 5,\n "items": {\n "type": "string",\n "maxLength": 400\n },\n "description": "Plain-language summary sentences shown first in every report."\n },\n "assuranceLevel": {\n "enum": [\n "L1",\n "L2",\n "L3",\n "L4"\n ],\n "description": "L1 self-tested (Saktum Check); L2 independently tested; L3 certified; L4 continuously certified."\n },\n "readiness": {\n "description": "Agent readiness: a second grade beside trust (annotations, descriptions, context cost), never mixed into the trust score.",\n "oneOf": [\n {\n "type": "null"\n },\n {\n "type": "object",\n "additionalProperties": false,\n "required": [\n "score",\n "grade",\n "toolsAnnotated",\n "toolsDescribed",\n "toolCount",\n "contextTokens"\n ],\n "properties": {\n "score": {\n "type": "integer",\n "minimum": 0,\n "maximum": 100\n },\n "grade": {\n "enum": [\n "A",\n "B",\n "C",\n "D",\n "F",\n null\n ]\n },\n "toolsAnnotated": {\n "type": "integer",\n "minimum": 0\n },\n "toolsDescribed": {\n "type": "integer",\n "minimum": 0\n },\n "toolCount": {\n "type": "integer",\n "minimum": 0\n },\n "contextTokens": {\n "type": "integer",\n "minimum": 0\n },\n "topImprovement": {\n "type": "string",\n "maxLength": 300\n }\n }\n }\n ]\n },\n "coverage": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "trustChecksRun": {\n "type": "integer",\n "minimum": 0\n }\n }\n }\n },\n "$defs": {\n "finding": {\n "type": "object",\n "required": [\n "check",\n "pack",\n "status",\n "severity",\n "title"\n ],\n "additionalProperties": false,\n "properties": {\n "check": {\n "type": "string"\n },\n "pack": {\n "type": "string"\n },\n "status": {\n "enum": [\n "pass",\n "fail",\n "skipped",\n "inconclusive",\n "info"\n ]\n },\n "severity": {\n "enum": [\n "critical",\n "high",\n "medium",\n "low",\n "info"\n ]\n },\n "scored": {\n "type": "boolean"\n },\n "title": {\n "type": "string"\n },\n "subject": {\n "type": "string"\n },\n "message": {\n "type": "string"\n },\n "fix": {\n "type": "string"\n },\n "references": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "evidence": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "hash": {\n "type": "string"\n },\n "excerpt": {\n "type": "string",\n "maxLength": 240\n }\n }\n }\n }\n }\n }\n}\n', "test-cases.schema.json": '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://saktum.dev/schemas/test-cases/0.1.json",\n "title": "Saktum Trust Check functional test cases (saktum.tests.yaml)",\n "type": "object",\n "required": ["testsFormat", "tests"],\n "additionalProperties": false,\n "properties": {\n "testsFormat": { "const": "0.1" },\n "tests": {\n "type": "array",\n "items": {\n "type": "object",\n "required": ["id", "tool", "input", "expect"],\n "additionalProperties": false,\n "properties": {\n "id": { "type": "string" },\n "tool": { "type": "string" },\n "input": { "type": "object" },\n "sideEffects": { "type": "boolean", "default": false, "description": "Tests with side effects run only against owned targets." },\n "expect": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "isError": { "type": "boolean" },\n "textContains": { "type": "string" },\n "structured": { "type": "object" },\n "outputSchema": { "type": "boolean" },\n "latencyMs": { "type": "object", "properties": { "lt": { "type": "integer" } }, "additionalProperties": false }\n }\n }\n }\n }\n }\n }\n}\n' };
|
|
19808
19864
|
var EMBEDDED_PACKS = { "agent-experience.yaml": 'packFormat: "0.1"\nid: agent-experience\nversion: 0.1.0\ncategory: agent-experience\ndescription: How easily and cheaply agents can use the server. Reported, never part of the trust score.\nchecks:\n - id: ax.context-cost\n title: Context cost of tool definitions\n severity: info\n safety: passive\n scored: false\n steps: [{ action: analyse, analyser: context-cost }]\n fix: Shorten long descriptions, split large servers, and drop tools agents rarely need.\n - id: ax.annotations\n title: Tools declare annotations\n severity: low\n safety: passive\n steps: [{ action: analyse, analyser: annotations-present }]\n fix: Set readOnlyHint, destructiveHint, idempotentHint and openWorldHint on every tool so clients can warn before risky actions.\n references: ["MCP specification: tool annotations", "OWASP MCP Top 10: MCP02 Privilege Escalation via Scope Creep (undeclared write and destructive tools)"]\n - id: ax.short-descriptions\n title: Tools have usable descriptions\n severity: low\n safety: passive\n steps: [{ action: analyse, analyser: short-descriptions }]\n fix: Describe what the tool does, when to use it and when not to, in at least a full sentence.\n', "auth.yaml": `packFormat: "0.1"
|
|
19809
19865
|
id: auth
|
|
19810
19866
|
version: 0.1.0
|
|
@@ -25534,7 +25590,7 @@ var optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
25534
25590
|
seen.ref = def.innerType;
|
|
25535
25591
|
};
|
|
25536
25592
|
|
|
25537
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
25593
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
25538
25594
|
function isZ4Schema(s) {
|
|
25539
25595
|
const schema = s;
|
|
25540
25596
|
return !!schema._zod;
|
|
@@ -26746,7 +26802,7 @@ function date3(params) {
|
|
|
26746
26802
|
return _coercedDate(ZodDate, params);
|
|
26747
26803
|
}
|
|
26748
26804
|
|
|
26749
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
26805
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
26750
26806
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
26751
26807
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
26752
26808
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -28266,7 +28322,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
28266
28322
|
}
|
|
28267
28323
|
};
|
|
28268
28324
|
|
|
28269
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
28325
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
28270
28326
|
function isTerminal(status) {
|
|
28271
28327
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
28272
28328
|
}
|
|
@@ -28274,7 +28330,7 @@ function isTerminal(status) {
|
|
|
28274
28330
|
// node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.6.7/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
28275
28331
|
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
28276
28332
|
|
|
28277
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
28333
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
28278
28334
|
function getMethodLiteral(schema) {
|
|
28279
28335
|
const shape = getObjectShape(schema);
|
|
28280
28336
|
const methodSchema = shape?.method;
|
|
@@ -28295,7 +28351,7 @@ function parseWithCompat(schema, data) {
|
|
|
28295
28351
|
return result.data;
|
|
28296
28352
|
}
|
|
28297
28353
|
|
|
28298
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
28354
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
28299
28355
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
28300
28356
|
var Protocol = class {
|
|
28301
28357
|
constructor(_options) {
|
|
@@ -29272,7 +29328,7 @@ function mergeCapabilities(base, additional) {
|
|
|
29272
29328
|
return result;
|
|
29273
29329
|
}
|
|
29274
29330
|
|
|
29275
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
29331
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
29276
29332
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
29277
29333
|
var import_ajv_formats = __toESM(require_dist2(), 1);
|
|
29278
29334
|
function createDefaultAjvInstance() {
|
|
@@ -29340,7 +29396,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
29340
29396
|
}
|
|
29341
29397
|
};
|
|
29342
29398
|
|
|
29343
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
29399
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js
|
|
29344
29400
|
var ExperimentalClientTasks = class {
|
|
29345
29401
|
constructor(_client) {
|
|
29346
29402
|
this._client = _client;
|
|
@@ -29494,7 +29550,7 @@ var ExperimentalClientTasks = class {
|
|
|
29494
29550
|
}
|
|
29495
29551
|
};
|
|
29496
29552
|
|
|
29497
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
29553
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
29498
29554
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
29499
29555
|
if (!requests) {
|
|
29500
29556
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -29529,7 +29585,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
29529
29585
|
}
|
|
29530
29586
|
}
|
|
29531
29587
|
|
|
29532
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
29588
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
|
|
29533
29589
|
function applyElicitationDefaults(schema, data) {
|
|
29534
29590
|
if (!schema || data === null || typeof data !== "object")
|
|
29535
29591
|
return;
|
|
@@ -30040,12 +30096,12 @@ var Client = class extends Protocol {
|
|
|
30040
30096
|
}
|
|
30041
30097
|
};
|
|
30042
30098
|
|
|
30043
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30099
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
30044
30100
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
30045
30101
|
import process2 from "node:process";
|
|
30046
30102
|
import { PassThrough } from "node:stream";
|
|
30047
30103
|
|
|
30048
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30104
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
30049
30105
|
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
30050
30106
|
var ReadBuffer = class {
|
|
30051
30107
|
constructor(options) {
|
|
@@ -30082,7 +30138,7 @@ function serializeMessage(message) {
|
|
|
30082
30138
|
return JSON.stringify(message) + "\n";
|
|
30083
30139
|
}
|
|
30084
30140
|
|
|
30085
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30141
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
30086
30142
|
var DEFAULT_INHERITED_ENV_VARS = process2.platform === "win32" ? [
|
|
30087
30143
|
"APPDATA",
|
|
30088
30144
|
"HOMEDRIVE",
|
|
@@ -30253,7 +30309,7 @@ var StdioClientTransport = class {
|
|
|
30253
30309
|
}
|
|
30254
30310
|
};
|
|
30255
30311
|
|
|
30256
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30312
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
|
|
30257
30313
|
var import_content_type = __toESM(require_content_type(), 1);
|
|
30258
30314
|
function mediaTypeEssence(header) {
|
|
30259
30315
|
if (!header) {
|
|
@@ -30270,7 +30326,7 @@ function mediaTypeEssence(header) {
|
|
|
30270
30326
|
}
|
|
30271
30327
|
}
|
|
30272
30328
|
|
|
30273
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30329
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js
|
|
30274
30330
|
function normalizeHeaders(headers) {
|
|
30275
30331
|
if (!headers)
|
|
30276
30332
|
return {};
|
|
@@ -30402,7 +30458,7 @@ async function pkceChallenge(length) {
|
|
|
30402
30458
|
};
|
|
30403
30459
|
}
|
|
30404
30460
|
|
|
30405
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30461
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
30406
30462
|
var SafeUrlSchema = url().superRefine((val, ctx) => {
|
|
30407
30463
|
if (!URL.canParse(val)) {
|
|
30408
30464
|
ctx.addIssue({
|
|
@@ -30556,7 +30612,7 @@ var OAuthTokenRevocationRequestSchema = object2({
|
|
|
30556
30612
|
token_type_hint: string2().optional()
|
|
30557
30613
|
}).strip();
|
|
30558
30614
|
|
|
30559
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30615
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
30560
30616
|
function resourceUrlFromServerUrl(url2) {
|
|
30561
30617
|
const resourceURL = typeof url2 === "string" ? new URL(url2) : new URL(url2.href);
|
|
30562
30618
|
resourceURL.hash = "";
|
|
@@ -30576,7 +30632,7 @@ function checkResourceAllowed({ requestedResource, configuredResource }) {
|
|
|
30576
30632
|
return requestedPath.startsWith(configuredPath);
|
|
30577
30633
|
}
|
|
30578
30634
|
|
|
30579
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30635
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
|
|
30580
30636
|
var OAuthError = class extends Error {
|
|
30581
30637
|
constructor(message, errorUri) {
|
|
30582
30638
|
super(message);
|
|
@@ -30671,7 +30727,7 @@ var OAUTH_ERRORS = {
|
|
|
30671
30727
|
[InvalidTargetError.errorCode]: InvalidTargetError
|
|
30672
30728
|
};
|
|
30673
30729
|
|
|
30674
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
30730
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
|
|
30675
30731
|
var UnauthorizedError = class extends Error {
|
|
30676
30732
|
constructor(message) {
|
|
30677
30733
|
super(message ?? "Unauthorized");
|
|
@@ -31464,7 +31520,7 @@ var EventSourceParserStream = class extends TransformStream {
|
|
|
31464
31520
|
}
|
|
31465
31521
|
};
|
|
31466
31522
|
|
|
31467
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.
|
|
31523
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
|
|
31468
31524
|
var DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {
|
|
31469
31525
|
initialReconnectionDelay: 1e3,
|
|
31470
31526
|
maxReconnectionDelay: 3e4,
|
|
@@ -31874,7 +31930,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
31874
31930
|
};
|
|
31875
31931
|
|
|
31876
31932
|
// packages/transports/dist/index.js
|
|
31877
|
-
var USER_AGENT = "saktum-check/0.1.
|
|
31933
|
+
var USER_AGENT = "saktum-check/0.1.4 (+https://saktum.dev/check)";
|
|
31878
31934
|
var LIMITS = { requestTimeoutMs: 1e4, connectTimeoutMs: 6e4, maxResponseChars: 5e6 };
|
|
31879
31935
|
var LimitError = class extends Error {
|
|
31880
31936
|
};
|
|
@@ -32004,7 +32060,7 @@ var INIT_BODY = JSON.stringify({
|
|
|
32004
32060
|
jsonrpc: "2.0",
|
|
32005
32061
|
id: 1,
|
|
32006
32062
|
method: "initialize",
|
|
32007
|
-
params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.1.
|
|
32063
|
+
params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.1.4" } }
|
|
32008
32064
|
});
|
|
32009
32065
|
async function httpRequest(url2, init = {}) {
|
|
32010
32066
|
const t0 = Date.now();
|
|
@@ -32634,10 +32690,11 @@ function gradeFor(overall, capped) {
|
|
|
32634
32690
|
return "C";
|
|
32635
32691
|
return "D";
|
|
32636
32692
|
}
|
|
32637
|
-
function summarise(r, noGrade) {
|
|
32693
|
+
function summarise(r, noGrade, isTrust = () => true) {
|
|
32638
32694
|
const signInRequired = noGrade?.kind === "sign-in";
|
|
32639
|
-
const
|
|
32640
|
-
const
|
|
32695
|
+
const trust = r.findings.filter(isTrust);
|
|
32696
|
+
const fails = trust.filter((f) => f.status === "fail" && f.scored).sort((a, b) => ORDER.indexOf(a.severity) - ORDER.indexOf(b.severity));
|
|
32697
|
+
const passed = trust.filter((f) => f.status === "pass" && f.scored).length;
|
|
32641
32698
|
const counts = ORDER.slice(0, 4).map((s) => [s, fails.filter((f) => f.severity === s).length]).filter(([, n]) => n > 0);
|
|
32642
32699
|
const lines = [];
|
|
32643
32700
|
if (signInRequired)
|
|
@@ -32649,16 +32706,22 @@ function summarise(r, noGrade) {
|
|
|
32649
32706
|
else if (r.grade === null || r.grade === void 0)
|
|
32650
32707
|
lines.push("No grade: too few checks could run against this server to grade it fairly.");
|
|
32651
32708
|
else if (fails.length === 0)
|
|
32652
|
-
lines.push(`
|
|
32709
|
+
lines.push(`Trust grade ${r.grade}: all ${passed} checks that apply passed.`);
|
|
32653
32710
|
else
|
|
32654
|
-
lines.push(`
|
|
32711
|
+
lines.push(`Trust grade ${r.grade}: ${fails.length} problem${fails.length === 1 ? "" : "s"} found (${counts.map(([s, n]) => `${n} ${s}`).join(", ")}); ${passed} checks passed.`);
|
|
32712
|
+
const rd = r.readiness;
|
|
32713
|
+
const readinessLine = rd && rd.grade && rd.topImprovement ? `Agent readiness ${rd.grade}: ${rd.topImprovement}.` : void 0;
|
|
32655
32714
|
if (fails[0]) {
|
|
32656
32715
|
const first = (fails[0].message ?? fails[0].title).split(/(?<=\.)\s/)[0].replace(/\.$/, "");
|
|
32657
32716
|
lines.push(`Fix first (${fails[0].severity}): ${first.charAt(0).toLowerCase()}${first.slice(1)}.`);
|
|
32658
|
-
} else
|
|
32717
|
+
} else if (readinessLine)
|
|
32718
|
+
lines.push(readinessLine);
|
|
32719
|
+
else
|
|
32659
32720
|
lines.push("Nothing to fix in this run; keep running it in CI to catch regressions.");
|
|
32660
32721
|
if (signInRequired)
|
|
32661
32722
|
lines.push('Most checks need sign-in: re-run with --header "Authorization: Bearer <token>" to test the tools themselves.');
|
|
32723
|
+
else if (readinessLine && fails[0])
|
|
32724
|
+
lines.push(readinessLine);
|
|
32662
32725
|
else if (r.metrics.contextCostTokens !== void 0) {
|
|
32663
32726
|
const money = r.metrics.contextCostPer1kTurnsUsd !== void 0 ? `, about $${r.metrics.contextCostPer1kTurnsUsd.toFixed(2)} per 1,000 turns` : "";
|
|
32664
32727
|
lines.push(`Agents spend about ${r.metrics.contextCostTokens.toLocaleString("en-US")} tokens reading these tools on every turn${money}.`);
|
|
@@ -32666,8 +32729,46 @@ function summarise(r, noGrade) {
|
|
|
32666
32729
|
return lines;
|
|
32667
32730
|
}
|
|
32668
32731
|
|
|
32732
|
+
// packages/testkit-core/dist/readiness.js
|
|
32733
|
+
var READINESS = {
|
|
32734
|
+
weights: { annotations: 0.3, descriptions: 0.4, cost: 0.3 },
|
|
32735
|
+
/** Full credit for context cost up to this many tokens per turn, falling linearly to zero at zeroCreditTokens. */
|
|
32736
|
+
fullCreditTokens: 1e4,
|
|
32737
|
+
zeroCreditTokens: 6e4,
|
|
32738
|
+
/** Same threshold as the ax.short-descriptions check. */
|
|
32739
|
+
minDescriptionChars: 20
|
|
32740
|
+
};
|
|
32741
|
+
var hasAnnotations = (t) => Boolean(t.annotations && Object.keys(t.annotations).length > 0);
|
|
32742
|
+
var usableDescription = (t) => (t.description ?? "").trim().length >= READINESS.minDescriptionChars;
|
|
32743
|
+
var fmt = (n) => n.toLocaleString("en-US");
|
|
32744
|
+
function readinessFor(tools) {
|
|
32745
|
+
if (tools.length === 0)
|
|
32746
|
+
return null;
|
|
32747
|
+
const annotated = tools.filter(hasAnnotations).length;
|
|
32748
|
+
const described = tools.filter(usableDescription).length;
|
|
32749
|
+
const tokens = contextCost(tools).contextCostTokens;
|
|
32750
|
+
const { fullCreditTokens: full, zeroCreditTokens: zero, weights: w } = READINESS;
|
|
32751
|
+
const costCredit = tokens <= full ? 1 : tokens >= zero ? 0 : 1 - (tokens - full) / (zero - full);
|
|
32752
|
+
const parts = { annotations: annotated / tools.length, descriptions: described / tools.length, cost: costCredit };
|
|
32753
|
+
const score2 = Math.round(100 * (w.annotations * parts.annotations + w.descriptions * parts.descriptions + w.cost * parts.cost));
|
|
32754
|
+
const losses = [
|
|
32755
|
+
{ lost: w.annotations * (1 - parts.annotations), text: `declare danger annotations (readOnlyHint, destructiveHint) on ${tools.length - annotated} of ${tools.length} tools` },
|
|
32756
|
+
{ lost: w.descriptions * (1 - parts.descriptions), text: `write usable descriptions for ${tools.length - described} of ${tools.length} tools` },
|
|
32757
|
+
{ lost: w.cost * (1 - parts.cost), text: `trim tool definitions: agents read ${fmt(tokens)} tokens of them on every turn` }
|
|
32758
|
+
].sort((a, b) => b.lost - a.lost);
|
|
32759
|
+
return {
|
|
32760
|
+
score: score2,
|
|
32761
|
+
grade: gradeFor(score2, false) ?? null,
|
|
32762
|
+
toolsAnnotated: annotated,
|
|
32763
|
+
toolsDescribed: described,
|
|
32764
|
+
toolCount: tools.length,
|
|
32765
|
+
contextTokens: tokens,
|
|
32766
|
+
topImprovement: losses[0].lost > 5e-3 ? losses[0].text : void 0
|
|
32767
|
+
};
|
|
32768
|
+
}
|
|
32769
|
+
|
|
32669
32770
|
// packages/testkit-core/dist/engine.js
|
|
32670
|
-
var ENGINE_VERSION = "0.1.
|
|
32771
|
+
var ENGINE_VERSION = "0.1.4";
|
|
32671
32772
|
var UNKNOWN_TOOL = "saktum_trust_check_no_such_tool";
|
|
32672
32773
|
var INVALID_TOKEN = "saktum-check-deliberately-invalid-token";
|
|
32673
32774
|
var BURST_REQUESTS = 20;
|
|
@@ -32685,10 +32786,10 @@ var baseOf = (pack, check) => ({
|
|
|
32685
32786
|
references: check.references
|
|
32686
32787
|
});
|
|
32687
32788
|
var MIN_GRADED_CHECKS = 5;
|
|
32688
|
-
function finish(target, opts, startedAt, findings, extra, metrics, sandbox, noGrade) {
|
|
32789
|
+
function finish(target, opts, startedAt, findings, extra, metrics, sandbox, noGrade, readiness = null) {
|
|
32689
32790
|
const categoryOf = (id) => opts.packs.find((p) => p.pack.id === id)?.pack.category ?? "other";
|
|
32690
32791
|
const scores = score(findings, categoryOf);
|
|
32691
|
-
const ran = findings.filter((f) => f.scored && (f.status === "pass" || f.status === "fail")).length;
|
|
32792
|
+
const ran = findings.filter((f) => f.scored && (f.status === "pass" || f.status === "fail") && categoryOf(f.pack) in TRUST_WEIGHTS).length;
|
|
32692
32793
|
const reason = noGrade ?? (ran < MIN_GRADED_CHECKS ? { kind: "too-few" } : void 0);
|
|
32693
32794
|
const grade = reason ? null : gradeFor(scores.overall, scores.capped);
|
|
32694
32795
|
const r = {
|
|
@@ -32701,9 +32802,11 @@ function finish(target, opts, startedAt, findings, extra, metrics, sandbox, noGr
|
|
|
32701
32802
|
grade,
|
|
32702
32803
|
assuranceLevel: "L1",
|
|
32703
32804
|
metrics,
|
|
32805
|
+
readiness,
|
|
32806
|
+
coverage: { trustChecksRun: ran },
|
|
32704
32807
|
run: { startedAt: startedAt.toISOString(), durationMs: Date.now() - startedAt.getTime(), mode: opts.mode ?? "passive", runner: "self", sandbox }
|
|
32705
32808
|
};
|
|
32706
|
-
r.summary = summarise(r, reason);
|
|
32809
|
+
r.summary = summarise(r, reason, (f) => categoryOf(f.pack) in TRUST_WEIGHTS);
|
|
32707
32810
|
return r;
|
|
32708
32811
|
}
|
|
32709
32812
|
async function burst(session) {
|
|
@@ -32823,7 +32926,7 @@ async function runTrustCheck(target, opts) {
|
|
|
32823
32926
|
delete metrics.contextCostPer1kTurnsUsd;
|
|
32824
32927
|
}
|
|
32825
32928
|
const noGrade = signInRequired ? { kind: "sign-in" } : listError ? { kind: "list-failed", error: sanitizeText(listError, 160) } : tools.length === 0 ? { kind: "no-tools", toolsCapability: Boolean(session?.capabilities?.tools) } : void 0;
|
|
32826
|
-
return finish(target, { ...opts, mode }, startedAt, findings, session ? { protocolVersion: session.protocolVersion, serverInfo: session.serverInfo, toolsFingerprint: fingerprint, toolCount: tools.length } : { toolCount: 0 }, metrics, session?.sandbox ?? "none", noGrade);
|
|
32929
|
+
return finish(target, { ...opts, mode }, startedAt, findings, session ? { protocolVersion: session.protocolVersion, serverInfo: session.serverInfo, toolsFingerprint: fingerprint, toolCount: tools.length } : { toolCount: 0 }, metrics, session?.sandbox ?? "none", noGrade, session && !listError ? readinessFor(tools) : null);
|
|
32827
32930
|
} finally {
|
|
32828
32931
|
if (session && !opts.session)
|
|
32829
32932
|
await session.close();
|
|
@@ -32835,6 +32938,7 @@ var SEV_ORDER = ["critical", "high", "medium", "low", "info"];
|
|
|
32835
32938
|
var rank = (s) => SEV_ORDER.indexOf(s);
|
|
32836
32939
|
var SYMBOL = { fail: "\u2717 FAIL", inconclusive: "! INCONCLUSIVE", pass: "\u2713 PASS", skipped: "- SKIPPED", info: "i INFO" };
|
|
32837
32940
|
var FEEDBACK_URL = "https://github.com/soodhere/saktum-check/discussions";
|
|
32941
|
+
var COVERAGE_NOTE = "v0.1 tests conformance, sign-in basics and security hygiene; deeper sign-in, injection and supply-chain checks arrive in v0.2 to v0.6.";
|
|
32838
32942
|
var DISCLAIMER = "Findings describe this server at the time of the run. They are not a guarantee of security or correctness.";
|
|
32839
32943
|
var SELF_SIGNED_NOTE = "Assurance level L1 (self-tested): the signature proves this report was not changed after the run, not that it was run independently.";
|
|
32840
32944
|
var OWASP_MCP = [
|
|
@@ -32887,7 +32991,13 @@ function renderTerminal(r) {
|
|
|
32887
32991
|
if (r.run.sandbox === "none" && r.target.transport === "stdio")
|
|
32888
32992
|
lines.push("Note: the local server ran without a sandbox. Only run servers you trust this way.");
|
|
32889
32993
|
lines.push("");
|
|
32890
|
-
|
|
32994
|
+
const ran = r.coverage?.trustChecksRun;
|
|
32995
|
+
lines.push(` TRUST ${r.grade ?? "-"}${r.scores.overall !== null ? ` (score ${r.scores.overall}${r.scores.capped ? ", capped: a critical check failed" : ""}${ran !== void 0 ? ` \xB7 ${ran} checks` : ""})` : ""}`);
|
|
32996
|
+
if (r.readiness) {
|
|
32997
|
+
const rd = r.readiness;
|
|
32998
|
+
lines.push(` AGENT READINESS ${rd.grade ?? "-"} (score ${rd.score} \xB7 annotations ${rd.toolsAnnotated}/${rd.toolCount} tools \xB7 ${rd.contextTokens.toLocaleString("en-US")} tokens per turn)`);
|
|
32999
|
+
}
|
|
33000
|
+
lines.push(` ${COVERAGE_NOTE}`);
|
|
32891
33001
|
for (const line of r.summary ?? [])
|
|
32892
33002
|
lines.push(` ${s(line, 300)}`);
|
|
32893
33003
|
lines.push("");
|
|
@@ -32937,7 +33047,8 @@ function renderHtml(r) {
|
|
|
32937
33047
|
<style>body{font:15px/1.5 system-ui,sans-serif;max-width:960px;margin:2rem auto;padding:0 1rem}table{border-collapse:collapse;width:100%;margin:1rem 0}td{border-top:1px solid #ddd;padding:.5rem;vertical-align:top}.grade{font-size:3rem;font-weight:700}.fail td:first-child{font-weight:600}code{font-size:13px}</style></head><body>
|
|
32938
33048
|
<h1>Saktum Check report</h1>
|
|
32939
33049
|
<p>${e(r.target.description)} · ${e(r.target.serverInfo?.["name"] ?? "")} ${e(r.target.serverInfo?.["version"] ?? "")} · ${r.target.toolCount ?? 0} tools</p>
|
|
32940
|
-
<p class="grade">
|
|
33050
|
+
<p class="grade">Trust ${e(r.grade ?? "-")}${r.readiness ? ` · Agent readiness ${e(r.readiness.grade ?? "-")}` : ""}</p>
|
|
33051
|
+
<p><small>${e(COVERAGE_NOTE)}</small></p>
|
|
32941
33052
|
${(r.summary ?? []).map((l) => `<p>${e(l)}</p>`).join("")}
|
|
32942
33053
|
<table>${rows}</table>
|
|
32943
33054
|
<h2>OWASP MCP Top 10 coverage</h2><table>${cov}</table>
|