@agent-inspect/eval 6.31.16 → 6.31.18
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.cjs
CHANGED
|
@@ -283,7 +283,7 @@ function isCredentialSensitiveKey(key, sensitiveKeys) {
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
// packages/redact/src/key-value-secret.ts
|
|
286
|
-
var KEY_VALUE_SECRET_PATTERN_SOURCE = String.raw`\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED
|
|
286
|
+
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,})`;
|
|
287
287
|
var KEY_VALUE_SECRET_PATTERN = new RegExp(
|
|
288
288
|
KEY_VALUE_SECRET_PATTERN_SOURCE,
|
|
289
289
|
"i"
|
|
@@ -740,8 +740,8 @@ function isCompleteRedactionMarker(value, replacement = "[REDACTED]") {
|
|
|
740
740
|
const trimmed = value.trim();
|
|
741
741
|
if (trimmed.length === 0) return false;
|
|
742
742
|
if (trimmed === replacement) return true;
|
|
743
|
-
if (
|
|
744
|
-
if (/^\[
|
|
743
|
+
if (trimmed === "[HASH:unknown]") return true;
|
|
744
|
+
if (/^\[HASH:[0-9a-f]{8}\]$/.test(trimmed)) return true;
|
|
745
745
|
return false;
|
|
746
746
|
}
|
|
747
747
|
function applyRule(rule, value, replacement) {
|