nexus-agents 5.0.1 → 5.0.3
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-LFAIB5MG.js → chunk-26PZ2652.js} +7 -7
- package/dist/{chunk-LFAIB5MG.js.map → chunk-26PZ2652.js.map} +1 -1
- package/dist/{chunk-GQXDNAMB.js → chunk-AU6N4HZR.js} +2 -2
- package/dist/{chunk-DDUZI6OD.js → chunk-FTIJ4V4A.js} +2 -2
- package/dist/{chunk-BZRUZSJ6.js → chunk-O6TCROTE.js} +25 -20
- package/dist/chunk-O6TCROTE.js.map +1 -0
- package/dist/{chunk-AYJNW7JN.js → chunk-OLCMDKQE.js} +3 -3
- package/dist/chunk-RXJHAUJY.js +7 -0
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-X2EF47XM.js → consensus-vote-3PGPRVOV.js} +4 -4
- package/dist/{improvement-review-VBLDRXFP.js → improvement-review-NVIZXYSX.js} +4 -4
- package/dist/index.js +7 -7
- package/dist/{setup-data-dir-RQCYL3D3.js → setup-data-dir-YJU7MPS5.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-7A63AX2A.js +0 -7
- package/dist/chunk-BZRUZSJ6.js.map +0 -1
- /package/dist/{chunk-GQXDNAMB.js.map → chunk-AU6N4HZR.js.map} +0 -0
- /package/dist/{chunk-DDUZI6OD.js.map → chunk-FTIJ4V4A.js.map} +0 -0
- /package/dist/{chunk-AYJNW7JN.js.map → chunk-OLCMDKQE.js.map} +0 -0
- /package/dist/{chunk-7A63AX2A.js.map → chunk-RXJHAUJY.js.map} +0 -0
- /package/dist/{consensus-vote-X2EF47XM.js.map → consensus-vote-3PGPRVOV.js.map} +0 -0
- /package/dist/{improvement-review-VBLDRXFP.js.map → improvement-review-NVIZXYSX.js.map} +0 -0
- /package/dist/{setup-data-dir-RQCYL3D3.js.map → setup-data-dir-YJU7MPS5.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-O6TCROTE.js";
|
|
11
11
|
import {
|
|
12
12
|
JsonlStore,
|
|
13
13
|
SECURITY_KEYWORDS,
|
|
@@ -2159,4 +2159,4 @@ export {
|
|
|
2159
2159
|
runImprovementReview,
|
|
2160
2160
|
registerImprovementReviewTool
|
|
2161
2161
|
};
|
|
2162
|
-
//# sourceMappingURL=chunk-
|
|
2162
|
+
//# sourceMappingURL=chunk-AU6N4HZR.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-O6TCROTE.js";
|
|
27
27
|
import {
|
|
28
28
|
assessPanelIndependence,
|
|
29
29
|
countDistinctModels,
|
|
@@ -6848,4 +6848,4 @@ export {
|
|
|
6848
6848
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6849
6849
|
registerConsensusVoteTool
|
|
6850
6850
|
};
|
|
6851
|
-
//# sourceMappingURL=chunk-
|
|
6851
|
+
//# sourceMappingURL=chunk-FTIJ4V4A.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RXJHAUJY.js";
|
|
4
4
|
import {
|
|
5
5
|
emitClawGuardViolation
|
|
6
6
|
} from "./chunk-ZSNWRX2B.js";
|
|
@@ -649,24 +649,27 @@ function measuredTrustTier(context) {
|
|
|
649
649
|
|
|
650
650
|
// src/mcp/middleware/tool-input-sanitizer.ts
|
|
651
651
|
var XML_INJECTION_PATTERN = /<\/?(system|human|assistant|instructions|user|prompt|context|tool_use|tool_result)\b[^>]*>/gi;
|
|
652
|
+
var HIDDEN_INSTRUCTION_TRIGGER = /execute|delete|merge|apply/i;
|
|
653
|
+
function hasHiddenInstruction(value) {
|
|
654
|
+
const OPEN = "<!--";
|
|
655
|
+
const CLOSE = "-->";
|
|
656
|
+
let from = 0;
|
|
657
|
+
for (; ; ) {
|
|
658
|
+
const open = value.indexOf(OPEN, from);
|
|
659
|
+
if (open === -1) return false;
|
|
660
|
+
const close = value.indexOf(CLOSE, open + OPEN.length);
|
|
661
|
+
if (close === -1) return false;
|
|
662
|
+
if (HIDDEN_INSTRUCTION_TRIGGER.test(value.slice(open + OPEN.length, close))) {
|
|
663
|
+
return true;
|
|
664
|
+
}
|
|
665
|
+
from = close + CLOSE.length;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
652
668
|
var INJECTION_DETECTORS = [
|
|
653
669
|
{ name: "system_prompt_override", pattern: /ignore (?:all )?previous (?:instructions|rules)/i },
|
|
654
670
|
{ name: "role_impersonation", pattern: /i(?:'m| am) the (?:repo |project )?(?:owner|admin)/i },
|
|
655
|
-
//
|
|
656
|
-
|
|
657
|
-
// anywhere in ordinary prose, and a later closing comment matched — a real
|
|
658
|
-
// PR body like "<!-- header -->\nsafe to merge after CI\n<!-- footer -->"
|
|
659
|
-
// was flagged (#5258). `(?:(?!-->)[\s\S])*?` is the standard tempered-dot
|
|
660
|
-
// form: consume any character that does not begin the terminator.
|
|
661
|
-
//
|
|
662
|
-
// KNOWN RESIDUAL: GitHub's default PR template contains
|
|
663
|
-
// "<!-- Please delete options that are not relevant -->", where the trigger
|
|
664
|
-
// genuinely is inside a single comment. Containment cannot help there; the
|
|
665
|
-
// trigger vocabulary overlaps ordinary English. Tracked in #5258.
|
|
666
|
-
{
|
|
667
|
-
name: "hidden_instruction",
|
|
668
|
-
pattern: /<!--(?:(?!-->)[\s\S])*?(?:execute|delete|merge|apply)(?:(?!-->)[\s\S])*?-->/i
|
|
669
|
-
}
|
|
671
|
+
// `hidden_instruction` is a scan, not a pattern — see hasHiddenInstruction.
|
|
672
|
+
{ name: "hidden_instruction", match: hasHiddenInstruction }
|
|
670
673
|
];
|
|
671
674
|
function sanitizeString(value) {
|
|
672
675
|
const MAX_PASSES = 5;
|
|
@@ -681,9 +684,11 @@ function sanitizeString(value) {
|
|
|
681
684
|
}
|
|
682
685
|
function detectPatterns(value) {
|
|
683
686
|
const detected = [];
|
|
684
|
-
for (const { name, pattern } of INJECTION_DETECTORS) {
|
|
685
|
-
pattern
|
|
686
|
-
|
|
687
|
+
for (const { name, pattern, match } of INJECTION_DETECTORS) {
|
|
688
|
+
if (pattern !== void 0) {
|
|
689
|
+
pattern.lastIndex = 0;
|
|
690
|
+
if (pattern.test(value)) detected.push(name);
|
|
691
|
+
} else if (match?.(value) === true) {
|
|
687
692
|
detected.push(name);
|
|
688
693
|
}
|
|
689
694
|
}
|
|
@@ -2130,4 +2135,4 @@ export {
|
|
|
2130
2135
|
VOTING_THRESHOLDS,
|
|
2131
2136
|
ConsensusMetricsSchema
|
|
2132
2137
|
};
|
|
2133
|
-
//# sourceMappingURL=chunk-
|
|
2138
|
+
//# sourceMappingURL=chunk-O6TCROTE.js.map
|