@agent-inspect/mcp-server 6.29.5 → 6.29.6
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/dist/{chunk-7O3WIPKQ.mjs → chunk-O7IT6DMO.mjs} +16 -2
- package/dist/chunk-O7IT6DMO.mjs.map +1 -0
- package/dist/cli.cjs +14 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-7O3WIPKQ.mjs.map +0 -1
|
@@ -3639,6 +3639,18 @@ function limitFindings(findings, maxFindings) {
|
|
|
3639
3639
|
function hasRedactionMarker(value, markers) {
|
|
3640
3640
|
return markers.some((marker) => value.includes(marker)) || /^\[HASH:[A-Za-z0-9_-]+\]$/.test(value);
|
|
3641
3641
|
}
|
|
3642
|
+
function isFullyRedactedValue(value, markers = ["[REDACTED]", "[REDACTED:"]) {
|
|
3643
|
+
if (typeof value !== "string") return false;
|
|
3644
|
+
const trimmed = value.trim();
|
|
3645
|
+
if (trimmed.length === 0) return false;
|
|
3646
|
+
if (/^\[HASH:[A-Za-z0-9_-]+\]$/.test(trimmed)) return true;
|
|
3647
|
+
if (/^\[REDACTED:[^\]]*\]$/.test(trimmed)) return true;
|
|
3648
|
+
for (const marker of markers) {
|
|
3649
|
+
if (marker.endsWith(":")) continue;
|
|
3650
|
+
if (trimmed === marker) return true;
|
|
3651
|
+
}
|
|
3652
|
+
return false;
|
|
3653
|
+
}
|
|
3642
3654
|
function isSensitiveKey(key, sensitiveKeys) {
|
|
3643
3655
|
return isCredentialSensitiveKey(key, sensitiveKeys);
|
|
3644
3656
|
}
|
|
@@ -3736,6 +3748,7 @@ function createSafetyRedactionRule(options = {}) {
|
|
|
3736
3748
|
function createSafetyRawContentRule(options = {}) {
|
|
3737
3749
|
const forbiddenKeys = options.forbiddenKeys ?? DEFAULT_RAW_CONTENT_KEYS;
|
|
3738
3750
|
const safePathPrefixes = options.safePathPrefixes ?? DEFAULT_SAFE_RAW_CONTENT_PATH_PREFIXES;
|
|
3751
|
+
const markers = options.redactedMarkers ?? ["[REDACTED]", "[REDACTED:"];
|
|
3739
3752
|
return {
|
|
3740
3753
|
id: "safety.rawPrompt",
|
|
3741
3754
|
category: "safety",
|
|
@@ -3746,6 +3759,7 @@ function createSafetyRawContentRule(options = {}) {
|
|
|
3746
3759
|
for (const entry of eventValueEntries(event, { includeSummaries: options.includeSummaries })) {
|
|
3747
3760
|
const key = entry.key ?? lastPathSegment(entry.path);
|
|
3748
3761
|
if (!isRawContentPath(entry.path, key, forbiddenKeys, safePathPrefixes)) continue;
|
|
3762
|
+
if (isFullyRedactedValue(entry.value, markers)) continue;
|
|
3749
3763
|
findings.push(
|
|
3750
3764
|
failFinding(
|
|
3751
3765
|
"safety.rawPrompt",
|
|
@@ -8731,5 +8745,5 @@ async function runReadOnlyMcpServer(options = {}) {
|
|
|
8731
8745
|
}
|
|
8732
8746
|
|
|
8733
8747
|
export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, MCP_SERVER_INSTRUCTIONS, READ_ONLY_TOOLS, TRACE_DATA_UNTRUSTED_WARNING, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
|
|
8734
|
-
//# sourceMappingURL=chunk-
|
|
8735
|
-
//# sourceMappingURL=chunk-
|
|
8748
|
+
//# sourceMappingURL=chunk-O7IT6DMO.mjs.map
|
|
8749
|
+
//# sourceMappingURL=chunk-O7IT6DMO.mjs.map
|