@agent-inspect/mcp-server 6.17.2 → 6.17.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 +6 -0
- package/dist/{chunk-RAYFTVFK.mjs → chunk-PPA3VJQG.mjs} +16 -6
- package/dist/chunk-PPA3VJQG.mjs.map +1 -0
- package/dist/cli.cjs +14 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-RAYFTVFK.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2632,8 +2632,11 @@ function formatProgrammaticDiagnostic(code, detail) {
|
|
|
2632
2632
|
}
|
|
2633
2633
|
|
|
2634
2634
|
// packages/core/src/safety/sensitive-key.ts
|
|
2635
|
+
function keyHasExplicitSeparator(value) {
|
|
2636
|
+
return /[_\-.]/.test(value);
|
|
2637
|
+
}
|
|
2635
2638
|
function normalizeSensitiveKey(value) {
|
|
2636
|
-
return value.toLowerCase().replace(/[^a-z0-
|
|
2639
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
2637
2640
|
}
|
|
2638
2641
|
var NON_CREDENTIAL_TOKEN_CONFIG_KEYS = new Set(
|
|
2639
2642
|
[
|
|
@@ -2685,6 +2688,7 @@ function isCredentialSensitiveKey(key, sensitiveKeys = DEFAULT_CREDENTIAL_SENSIT
|
|
|
2685
2688
|
const normalized = normalizeSensitiveKey(key);
|
|
2686
2689
|
if (!normalized) return false;
|
|
2687
2690
|
if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS.has(normalized)) return false;
|
|
2691
|
+
const allowPrefixCompound = keyHasExplicitSeparator(key);
|
|
2688
2692
|
for (const sensitive of sensitiveKeys) {
|
|
2689
2693
|
const s = normalizeSensitiveKey(sensitive);
|
|
2690
2694
|
if (!s) continue;
|
|
@@ -2693,7 +2697,8 @@ function isCredentialSensitiveKey(key, sensitiveKeys = DEFAULT_CREDENTIAL_SENSIT
|
|
|
2693
2697
|
continue;
|
|
2694
2698
|
}
|
|
2695
2699
|
if (normalized === s) return true;
|
|
2696
|
-
if (normalized.endsWith(`_${s}`)
|
|
2700
|
+
if (normalized.endsWith(`_${s}`)) return true;
|
|
2701
|
+
if (allowPrefixCompound && normalized.startsWith(`${s}_`)) return true;
|
|
2697
2702
|
}
|
|
2698
2703
|
return false;
|
|
2699
2704
|
}
|
|
@@ -6644,8 +6649,11 @@ function exportRunTree(tree, options) {
|
|
|
6644
6649
|
}
|
|
6645
6650
|
|
|
6646
6651
|
// packages/redact/src/sensitive-key.ts
|
|
6652
|
+
function keyHasExplicitSeparator2(value) {
|
|
6653
|
+
return /[_\-.]/.test(value);
|
|
6654
|
+
}
|
|
6647
6655
|
function normalizeSensitiveKey2(value) {
|
|
6648
|
-
return value.toLowerCase().replace(/[^a-z0-
|
|
6656
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
6649
6657
|
}
|
|
6650
6658
|
var NON_CREDENTIAL_TOKEN_CONFIG_KEYS2 = new Set(
|
|
6651
6659
|
[
|
|
@@ -6675,6 +6683,7 @@ function isCredentialSensitiveKey2(key, sensitiveKeys) {
|
|
|
6675
6683
|
const normalized = normalizeSensitiveKey2(key);
|
|
6676
6684
|
if (!normalized) return false;
|
|
6677
6685
|
if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS2.has(normalized)) return false;
|
|
6686
|
+
const allowPrefixCompound = keyHasExplicitSeparator2(key);
|
|
6678
6687
|
for (const sensitive of sensitiveKeys) {
|
|
6679
6688
|
const s = normalizeSensitiveKey2(sensitive);
|
|
6680
6689
|
if (!s) continue;
|
|
@@ -6683,7 +6692,8 @@ function isCredentialSensitiveKey2(key, sensitiveKeys) {
|
|
|
6683
6692
|
continue;
|
|
6684
6693
|
}
|
|
6685
6694
|
if (normalized === s) return true;
|
|
6686
|
-
if (normalized.endsWith(`_${s}`)
|
|
6695
|
+
if (normalized.endsWith(`_${s}`)) return true;
|
|
6696
|
+
if (allowPrefixCompound && normalized.startsWith(`${s}_`)) return true;
|
|
6687
6697
|
}
|
|
6688
6698
|
return false;
|
|
6689
6699
|
}
|