@agent-inspect/eval 6.31.15 → 6.31.17
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/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -277,7 +277,7 @@ function isCredentialSensitiveKey(key, sensitiveKeys) {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
// packages/redact/src/key-value-secret.ts
|
|
280
|
-
var KEY_VALUE_SECRET_PATTERN_SOURCE = String.raw`\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED
|
|
280
|
+
var KEY_VALUE_SECRET_PATTERN_SOURCE = String.raw`\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED|HASH:(?:[0-9a-f]{8}|unknown))\](?![^\s"'\\&#?]))([^\s"'\\]{8,})`;
|
|
281
281
|
var KEY_VALUE_SECRET_PATTERN = new RegExp(
|
|
282
282
|
KEY_VALUE_SECRET_PATTERN_SOURCE,
|
|
283
283
|
"i"
|
|
@@ -734,8 +734,8 @@ function isCompleteRedactionMarker(value, replacement = "[REDACTED]") {
|
|
|
734
734
|
const trimmed = value.trim();
|
|
735
735
|
if (trimmed.length === 0) return false;
|
|
736
736
|
if (trimmed === replacement) return true;
|
|
737
|
-
if (
|
|
738
|
-
if (/^\[
|
|
737
|
+
if (trimmed === "[HASH:unknown]") return true;
|
|
738
|
+
if (/^\[HASH:[0-9a-f]{8}\]$/.test(trimmed)) return true;
|
|
739
739
|
return false;
|
|
740
740
|
}
|
|
741
741
|
function applyRule(rule, value, replacement) {
|