sentinelayer-cli 0.32.3 → 0.32.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/package.json +1 -1
- package/src/mcp/cli-command-tools.js +48 -1
package/package.json
CHANGED
|
@@ -29,7 +29,41 @@ const SENSITIVE_COMMAND_PATHS = new Set([
|
|
|
29
29
|
"session.kill",
|
|
30
30
|
"session.listen",
|
|
31
31
|
"session.provision-emails",
|
|
32
|
+
"daemon.control.stop",
|
|
33
|
+
"omargate.investor-dd",
|
|
34
|
+
// Token-handling (same class as auth.*): writes the live SentinelLayer token into a
|
|
35
|
+
// caller-specified GitHub repo's secrets — a token-misplacement/exfil vector via the bridge.
|
|
36
|
+
"scan.setup-secrets",
|
|
37
|
+
// Bulk session-content exfil (same rationale that blocks config.*): full transcript dumps
|
|
38
|
+
// can carry arbitrary sensitive content that output-redaction does not mask. `session read`
|
|
39
|
+
// (normal recent-message reads) stays available for legitimate agent use.
|
|
40
|
+
"session.export",
|
|
41
|
+
"session.download",
|
|
42
|
+
"review.show",
|
|
43
|
+
"review.export",
|
|
44
|
+
// Identity/state mutation (same class as session.kill): create/revoke/kill AIdenIDs +
|
|
45
|
+
// provision emails (cost + side effects) should not be driven by an untrusted LLM via the bridge.
|
|
46
|
+
"ai.identity.provision",
|
|
47
|
+
"ai.identity.revoke",
|
|
48
|
+
"ai.identity.kill-all",
|
|
49
|
+
"ai.identity.create-child",
|
|
50
|
+
"ai.identity.revoke-children",
|
|
51
|
+
"ai.provision-email",
|
|
52
|
+
// Inbound AIdenID extraction surfaces can expose OTPs, action links, or raw events.
|
|
53
|
+
"ai.identity.events",
|
|
54
|
+
"ai.identity.latest",
|
|
55
|
+
"ai.identity.wait-for-otp",
|
|
32
56
|
]);
|
|
57
|
+
|
|
58
|
+
// Whole governance sub-trees under ai.identity (domain/target/site/legal-hold) are live
|
|
59
|
+
// identity-governance mutations (create/verify/freeze/etc.); block the entire prefix so the
|
|
60
|
+
// bridge stays complete + future-proof as new leaves are added. Operators use the direct CLI.
|
|
61
|
+
const SENSITIVE_COMMAND_PREFIXES = [
|
|
62
|
+
"ai.identity.domain.",
|
|
63
|
+
"ai.identity.target.",
|
|
64
|
+
"ai.identity.site.",
|
|
65
|
+
"ai.identity.legal-hold.",
|
|
66
|
+
];
|
|
33
67
|
const REDACTION_MARKER = "[REDACTED]";
|
|
34
68
|
|
|
35
69
|
function normalizeString(value) {
|
|
@@ -129,6 +163,9 @@ function blockedReasonForCommandPath(commandPathKey) {
|
|
|
129
163
|
if (SENSITIVE_COMMAND_PATHS.has(commandPathKey)) {
|
|
130
164
|
return "blocked_sensitive_cli_command";
|
|
131
165
|
}
|
|
166
|
+
if (SENSITIVE_COMMAND_PREFIXES.some((prefix) => commandPathKey.startsWith(prefix))) {
|
|
167
|
+
return "blocked_sensitive_cli_command";
|
|
168
|
+
}
|
|
132
169
|
return "";
|
|
133
170
|
}
|
|
134
171
|
|
|
@@ -164,7 +201,17 @@ function validateCliOptionSpecs(optionSpecs = []) {
|
|
|
164
201
|
|
|
165
202
|
function validateBridgeToolDefinition(tool = {}) {
|
|
166
203
|
const metadata = tool.metadata || {};
|
|
167
|
-
|
|
204
|
+
const shapeError = validateCliPathSegments(metadata.cliPath) || validateCliOptionSpecs(metadata.options);
|
|
205
|
+
if (shapeError) return shapeError;
|
|
206
|
+
if (metadata.generated_from !== "commander" || metadata.execution !== "bridge") {
|
|
207
|
+
return "untrusted_cli_bridge_definition";
|
|
208
|
+
}
|
|
209
|
+
const commandPathKey = metadata.cliPath.map(normalizeString).filter(Boolean).join(".");
|
|
210
|
+
const namePathKey = registryToolNameToCliPath(tool.name).join(".");
|
|
211
|
+
if (namePathKey && namePathKey !== commandPathKey) {
|
|
212
|
+
return "cli_path_name_mismatch";
|
|
213
|
+
}
|
|
214
|
+
return "";
|
|
168
215
|
}
|
|
169
216
|
|
|
170
217
|
function isAllowedInputValue(value) {
|