@highflame/policy 2.2.35 → 2.2.36
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/_schemas/agent_ops/context.json +30 -0
- package/_schemas/agent_ops/schema.cedarschema +7 -0
- package/_schemas/ai_gateway/context.json +30 -0
- package/_schemas/ai_gateway/schema.cedarschema +7 -0
- package/_schemas/guardrails/context.json +30 -0
- package/_schemas/guardrails/schema.cedarschema +7 -0
- package/_schemas/overwatch/context.json +30 -0
- package/_schemas/overwatch/schema.cedarschema +7 -0
- package/dist/agent_ops-context.gen.d.ts +6 -1
- package/dist/agent_ops-context.gen.js +10 -0
- package/dist/ai_gateway-context.gen.d.ts +6 -1
- package/dist/ai_gateway-context.gen.js +10 -0
- package/dist/ai_gateway-detectors.gen.js +6 -1
- package/dist/guardrails-context.gen.d.ts +6 -1
- package/dist/guardrails-context.gen.js +10 -0
- package/dist/guardrails-detectors.gen.js +6 -1
- package/dist/overwatch-context.gen.d.ts +6 -1
- package/dist/overwatch-context.gen.js +10 -0
- package/dist/overwatch-detectors.gen.js +6 -1
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +48 -0
- package/package.json +1 -1
|
@@ -1229,6 +1229,36 @@
|
|
|
1229
1229
|
"required": false,
|
|
1230
1230
|
"description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: 'readonly', 'write_enabling', 'execute_enabling', 'network_access', 'unknown'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). 'unknown' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy."
|
|
1231
1231
|
},
|
|
1232
|
+
{
|
|
1233
|
+
"key": "resolved_target_paths",
|
|
1234
|
+
"type": "string",
|
|
1235
|
+
"required": false,
|
|
1236
|
+
"description": "Newline-delimited (leading+trailing \\n) union of the statically-resolved absolute target paths a shell command touches, any capability, emitted by the bash AST detector. Cedar like is full-string anchored and every value starts with the \\n delimiter, so patterns must begin with '*': anchored sub-tree \"*\\n/etc/*\" (matches only paths under /etc, unlike the loose \"*/etc/*\" which also hits a project etc/ dir at any depth), bare directory \"*\\n/etc\\n*\" (e.g. rm -rf /etc, no trailing slash), exact file \"*\\n/etc/passwd\\n*\". Resolution is purely lexical (cwd-join + path.Clean; quoting, escapes, wrappers, cd/VAR/bash -c normalized); remote endpoints and dynamic operands are never fabricated."
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"key": "read_target_paths",
|
|
1240
|
+
"type": "string",
|
|
1241
|
+
"required": false,
|
|
1242
|
+
"description": "Newline-delimited resolved absolute paths a shell command reads or enumerates, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"key": "write_target_paths",
|
|
1246
|
+
"type": "string",
|
|
1247
|
+
"required": false,
|
|
1248
|
+
"description": "Newline-delimited resolved absolute paths a shell command writes, creates, or destroys (redirects, cp/mv/dd, curl/wget -o, scp/rsync local dest, tar/unzip/cpio extraction, yq -i), emitted by the bash AST detector. \\n-anchored: e.g. write_target_paths like \"*\\n/etc/cron.d/*\"."
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"key": "exec_target_paths",
|
|
1252
|
+
"type": "string",
|
|
1253
|
+
"required": false,
|
|
1254
|
+
"description": "Newline-delimited resolved absolute paths a shell command executes as a script, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"key": "unresolved_target",
|
|
1258
|
+
"type": "boolean",
|
|
1259
|
+
"required": false,
|
|
1260
|
+
"description": "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments."
|
|
1261
|
+
},
|
|
1232
1262
|
{
|
|
1233
1263
|
"key": "path",
|
|
1234
1264
|
"type": "string",
|
|
@@ -421,6 +421,13 @@ namespace AgentOps {
|
|
|
421
421
|
// Tool Operation Classifier (optional)
|
|
422
422
|
"tool_operation_classes"?: Set<String>,
|
|
423
423
|
|
|
424
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
425
|
+
"resolved_target_paths"?: String, // union of resolved absolute target paths, any capability
|
|
426
|
+
"read_target_paths"?: String, // paths the command reads or enumerates
|
|
427
|
+
"write_target_paths"?: String, // paths the command writes, creates, or destroys
|
|
428
|
+
"exec_target_paths"?: String, // paths executed as a script
|
|
429
|
+
"unresolved_target"?: Bool, // a target hid behind a variable/glob/$()/inline code, or the path-list cap truncated
|
|
430
|
+
|
|
424
431
|
// Agentic - Multi-Turn Context (optional)
|
|
425
432
|
"conversation_turn"?: Long,
|
|
426
433
|
"multi_turn_detection"?: Boolean,
|
|
@@ -187,6 +187,36 @@
|
|
|
187
187
|
"required": false,
|
|
188
188
|
"description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: 'readonly', 'write_enabling', 'execute_enabling', 'network_access', 'unknown'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). 'unknown' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy."
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"key": "resolved_target_paths",
|
|
192
|
+
"type": "string",
|
|
193
|
+
"required": false,
|
|
194
|
+
"description": "Newline-delimited (leading+trailing \\n) union of the statically-resolved absolute target paths a shell command touches, any capability, emitted by the bash AST detector. Cedar like is full-string anchored and every value starts with the \\n delimiter, so patterns must begin with '*': anchored sub-tree \"*\\n/etc/*\" (matches only paths under /etc, unlike the loose \"*/etc/*\" which also hits a project etc/ dir at any depth), bare directory \"*\\n/etc\\n*\" (e.g. rm -rf /etc, no trailing slash), exact file \"*\\n/etc/passwd\\n*\". Resolution is purely lexical (cwd-join + path.Clean; quoting, escapes, wrappers, cd/VAR/bash -c normalized); remote endpoints and dynamic operands are never fabricated. NOTE (AI Gateway): declared ahead of runtime emission — the gateway does not populate this until the bash classifier is wired (#173); policies validate now but will not match in the interim."
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"key": "read_target_paths",
|
|
198
|
+
"type": "string",
|
|
199
|
+
"required": false,
|
|
200
|
+
"description": "Newline-delimited resolved absolute paths a shell command reads or enumerates, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths). NOTE (AI Gateway): declared ahead of runtime emission — the gateway does not populate this until the bash classifier is wired (#173); policies validate now but will not match in the interim."
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"key": "write_target_paths",
|
|
204
|
+
"type": "string",
|
|
205
|
+
"required": false,
|
|
206
|
+
"description": "Newline-delimited resolved absolute paths a shell command writes, creates, or destroys (redirects, cp/mv/dd, curl/wget -o, scp/rsync local dest, tar/unzip/cpio extraction, yq -i), emitted by the bash AST detector. \\n-anchored: e.g. write_target_paths like \"*\\n/etc/cron.d/*\". NOTE (AI Gateway): declared ahead of runtime emission — the gateway does not populate this until the bash classifier is wired (#173); policies validate now but will not match in the interim."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"key": "exec_target_paths",
|
|
210
|
+
"type": "string",
|
|
211
|
+
"required": false,
|
|
212
|
+
"description": "Newline-delimited resolved absolute paths a shell command executes as a script, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths). NOTE (AI Gateway): declared ahead of runtime emission — the gateway does not populate this until the bash classifier is wired (#173); policies validate now but will not match in the interim."
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"key": "unresolved_target",
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"required": false,
|
|
218
|
+
"description": "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments. NOTE (AI Gateway): declared ahead of runtime emission — the gateway does not populate this until the bash classifier is wired (#173); policies validate now but will not match in the interim."
|
|
219
|
+
},
|
|
190
220
|
{
|
|
191
221
|
"key": "mcp_server_verified",
|
|
192
222
|
"type": "boolean",
|
|
@@ -122,6 +122,13 @@ action call_tool appliesTo {
|
|
|
122
122
|
// --- Tool Operation Classifier ---
|
|
123
123
|
tool_operation_classes?: Set<String>, // subset of {"readonly", "write_enabling", "execute_enabling", "network_access", "unknown"}
|
|
124
124
|
|
|
125
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
126
|
+
resolved_target_paths?: String, // union of resolved absolute target paths, any capability
|
|
127
|
+
read_target_paths?: String, // paths the command reads or enumerates
|
|
128
|
+
write_target_paths?: String, // paths the command writes, creates, or destroys
|
|
129
|
+
exec_target_paths?: String, // paths executed as a script
|
|
130
|
+
unresolved_target?: Bool, // a target hid behind a variable/glob/$()/inline code, or the path-list cap truncated
|
|
131
|
+
|
|
125
132
|
// --- MCP Trust ---
|
|
126
133
|
mcp_server_verified?: Bool, // Whether server is from verified registry
|
|
127
134
|
|
|
@@ -1066,6 +1066,36 @@
|
|
|
1066
1066
|
"required": false,
|
|
1067
1067
|
"description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: 'readonly', 'write_enabling', 'execute_enabling', 'network_access', 'unknown'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). 'unknown' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy."
|
|
1068
1068
|
},
|
|
1069
|
+
{
|
|
1070
|
+
"key": "resolved_target_paths",
|
|
1071
|
+
"type": "string",
|
|
1072
|
+
"required": false,
|
|
1073
|
+
"description": "Newline-delimited (leading+trailing \\n) union of the statically-resolved absolute target paths a shell command touches, any capability, emitted by the bash AST detector. Cedar like is full-string anchored and every value starts with the \\n delimiter, so patterns must begin with '*': anchored sub-tree \"*\\n/etc/*\" (matches only paths under /etc, unlike the loose \"*/etc/*\" which also hits a project etc/ dir at any depth), bare directory \"*\\n/etc\\n*\" (e.g. rm -rf /etc, no trailing slash), exact file \"*\\n/etc/passwd\\n*\". Resolution is purely lexical (cwd-join + path.Clean; quoting, escapes, wrappers, cd/VAR/bash -c normalized); remote endpoints and dynamic operands are never fabricated."
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"key": "read_target_paths",
|
|
1077
|
+
"type": "string",
|
|
1078
|
+
"required": false,
|
|
1079
|
+
"description": "Newline-delimited resolved absolute paths a shell command reads or enumerates, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"key": "write_target_paths",
|
|
1083
|
+
"type": "string",
|
|
1084
|
+
"required": false,
|
|
1085
|
+
"description": "Newline-delimited resolved absolute paths a shell command writes, creates, or destroys (redirects, cp/mv/dd, curl/wget -o, scp/rsync local dest, tar/unzip/cpio extraction, yq -i), emitted by the bash AST detector. \\n-anchored: e.g. write_target_paths like \"*\\n/etc/cron.d/*\"."
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"key": "exec_target_paths",
|
|
1089
|
+
"type": "string",
|
|
1090
|
+
"required": false,
|
|
1091
|
+
"description": "Newline-delimited resolved absolute paths a shell command executes as a script, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"key": "unresolved_target",
|
|
1095
|
+
"type": "boolean",
|
|
1096
|
+
"required": false,
|
|
1097
|
+
"description": "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments."
|
|
1098
|
+
},
|
|
1069
1099
|
{
|
|
1070
1100
|
"key": "cross_origin_detected",
|
|
1071
1101
|
"type": "boolean",
|
|
@@ -405,6 +405,13 @@ namespace Guardrails {
|
|
|
405
405
|
// Tool Operation Classifier (optional) — populated by AST-based classifiers (bash, python, etc.)
|
|
406
406
|
"tool_operation_classes"?: Set<String>, // subset of {"readonly", "write_enabling", "execute_enabling", "network_access", "unknown"}
|
|
407
407
|
|
|
408
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
409
|
+
"resolved_target_paths"?: String, // union of resolved absolute target paths, any capability
|
|
410
|
+
"read_target_paths"?: String, // paths the command reads or enumerates
|
|
411
|
+
"write_target_paths"?: String, // paths the command writes, creates, or destroys
|
|
412
|
+
"exec_target_paths"?: String, // paths executed as a script
|
|
413
|
+
"unresolved_target"?: Bool, // a target hid behind a variable/glob/$()/inline code, or the path-list cap truncated
|
|
414
|
+
|
|
408
415
|
// Agentic - Multi-Turn Context (optional)
|
|
409
416
|
"conversation_turn"?: Long,
|
|
410
417
|
"multi_turn_detection"?: Bool,
|
|
@@ -680,6 +680,36 @@
|
|
|
680
680
|
"required": false,
|
|
681
681
|
"description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: 'readonly', 'write_enabling', 'execute_enabling', 'network_access', 'unknown'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). Used by the Bash Operation Classes template. 'unknown' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy."
|
|
682
682
|
},
|
|
683
|
+
{
|
|
684
|
+
"key": "resolved_target_paths",
|
|
685
|
+
"type": "string",
|
|
686
|
+
"required": false,
|
|
687
|
+
"description": "Newline-delimited (leading+trailing \\n) union of the statically-resolved absolute target paths a shell command touches, any capability, emitted by the bash AST detector. Cedar like is full-string anchored and every value starts with the \\n delimiter, so patterns must begin with '*': anchored sub-tree \"*\\n/etc/*\" (matches only paths under /etc, unlike the loose \"*/etc/*\" which also hits a project etc/ dir at any depth), bare directory \"*\\n/etc\\n*\" (e.g. rm -rf /etc, no trailing slash), exact file \"*\\n/etc/passwd\\n*\". Resolution is purely lexical (cwd-join + path.Clean; quoting, escapes, wrappers, cd/VAR/bash -c normalized); remote endpoints and dynamic operands are never fabricated."
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"key": "read_target_paths",
|
|
691
|
+
"type": "string",
|
|
692
|
+
"required": false,
|
|
693
|
+
"description": "Newline-delimited resolved absolute paths a shell command reads or enumerates, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"key": "write_target_paths",
|
|
697
|
+
"type": "string",
|
|
698
|
+
"required": false,
|
|
699
|
+
"description": "Newline-delimited resolved absolute paths a shell command writes, creates, or destroys (redirects, cp/mv/dd, curl/wget -o, scp/rsync local dest, tar/unzip/cpio extraction, yq -i), emitted by the bash AST detector. \\n-anchored: e.g. write_target_paths like \"*\\n/etc/cron.d/*\"."
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"key": "exec_target_paths",
|
|
703
|
+
"type": "string",
|
|
704
|
+
"required": false,
|
|
705
|
+
"description": "Newline-delimited resolved absolute paths a shell command executes as a script, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"key": "unresolved_target",
|
|
709
|
+
"type": "boolean",
|
|
710
|
+
"required": false,
|
|
711
|
+
"description": "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments."
|
|
712
|
+
},
|
|
683
713
|
{
|
|
684
714
|
"key": "package_install_detected",
|
|
685
715
|
"type": "boolean",
|
|
@@ -246,6 +246,13 @@ action call_tool appliesTo {
|
|
|
246
246
|
// --- Tool Operation Classifier ---
|
|
247
247
|
tool_operation_classes?: Set<String>, // subset of {"readonly", "write_enabling", "execute_enabling", "network_access", "unknown"}
|
|
248
248
|
|
|
249
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
250
|
+
resolved_target_paths?: String, // union of resolved absolute target paths, any capability
|
|
251
|
+
read_target_paths?: String, // paths the command reads or enumerates
|
|
252
|
+
write_target_paths?: String, // paths the command writes, creates, or destroys
|
|
253
|
+
exec_target_paths?: String, // paths executed as a script
|
|
254
|
+
unresolved_target?: Bool, // a target hid behind a variable/glob/$()/inline code
|
|
255
|
+
|
|
249
256
|
// --- Session Detection History (cross-turn sticky flags) ---
|
|
250
257
|
session_pii_detected?: Bool,
|
|
251
258
|
session_pii_types?: Set<String>,
|
|
@@ -41,6 +41,7 @@ export declare const AgentOpsContextKey: {
|
|
|
41
41
|
readonly EncodedTypes: "encoded_types";
|
|
42
42
|
readonly Event: "event";
|
|
43
43
|
readonly ExecAllowlist: "exec_allowlist";
|
|
44
|
+
readonly ExecTargetPaths: "exec_target_paths";
|
|
44
45
|
readonly FactualityScore: "factuality_score";
|
|
45
46
|
readonly FlowCompartments: "flow_compartments";
|
|
46
47
|
readonly FlowConfidentiality: "flow_confidentiality";
|
|
@@ -108,7 +109,9 @@ export declare const AgentOpsContextKey: {
|
|
|
108
109
|
readonly PrincipalCompartments: "principal_compartments";
|
|
109
110
|
readonly PrivilegeScope: "privilege_scope";
|
|
110
111
|
readonly ProfanityScore: "profanity_score";
|
|
112
|
+
readonly ReadTargetPaths: "read_target_paths";
|
|
111
113
|
readonly RequestId: "request_id";
|
|
114
|
+
readonly ResolvedTargetPaths: "resolved_target_paths";
|
|
112
115
|
readonly Role: "role";
|
|
113
116
|
readonly RpmExceeded: "rpm_exceeded";
|
|
114
117
|
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
@@ -158,15 +161,17 @@ export declare const AgentOpsContextKey: {
|
|
|
158
161
|
readonly TopicConfidence: "topic_confidence";
|
|
159
162
|
readonly TpmExceeded: "tpm_exceeded";
|
|
160
163
|
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
164
|
+
readonly UnresolvedTarget: "unresolved_target";
|
|
161
165
|
readonly UserEmail: "user_email";
|
|
162
166
|
readonly ViolenceScore: "violence_score";
|
|
163
167
|
readonly WeaponsScore: "weapons_score";
|
|
164
168
|
readonly WorkspaceRoot: "workspace_root";
|
|
165
169
|
readonly WritablePaths: "writable_paths";
|
|
170
|
+
readonly WriteTargetPaths: "write_target_paths";
|
|
166
171
|
};
|
|
167
172
|
export type AgentOpsContextKey = (typeof AgentOpsContextKey)[keyof typeof AgentOpsContextKey];
|
|
168
173
|
/**
|
|
169
174
|
* The full set of authorable context attribute keys for AgentOps.
|
|
170
175
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
171
176
|
*/
|
|
172
|
-
export declare const AgentOpsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "cwd", "detected_language", "detected_script", "detected_threats", "detector_count", "direction", "egress_hosts", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "event", "exec_allowlist", "factuality_score", "flow_compartments", "flow_confidentiality", "flow_data_types", "flow_integrity", "flow_origins", "flow_resolution_status", "flow_sink", "flow_sink_effects", "flow_sink_is_external", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "isolation_tier", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "mechanism_capabilities", "model_name", "model_provider", "multi_turn_detection", "network_egress", "package_check_status", "package_install_detected", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "principal_clearances", "principal_compartments", "privilege_scope", "profanity_score", "request_id", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "surface", "suspicious_pattern", "threat_categories", "threat_count", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "user_email", "violence_score", "weapons_score", "workspace_root", "writable_paths"];
|
|
177
|
+
export declare const AgentOpsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "cwd", "detected_language", "detected_script", "detected_threats", "detector_count", "direction", "egress_hosts", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "event", "exec_allowlist", "exec_target_paths", "factuality_score", "flow_compartments", "flow_confidentiality", "flow_data_types", "flow_integrity", "flow_origins", "flow_resolution_status", "flow_sink", "flow_sink_effects", "flow_sink_is_external", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "isolation_tier", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "mechanism_capabilities", "model_name", "model_provider", "multi_turn_detection", "network_egress", "package_check_status", "package_install_detected", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "principal_clearances", "principal_compartments", "privilege_scope", "profanity_score", "read_target_paths", "request_id", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "surface", "suspicious_pattern", "threat_categories", "threat_count", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "user_email", "violence_score", "weapons_score", "workspace_root", "writable_paths", "write_target_paths"];
|
|
@@ -43,6 +43,7 @@ export const AgentOpsContextKey = {
|
|
|
43
43
|
EncodedTypes: 'encoded_types',
|
|
44
44
|
Event: 'event',
|
|
45
45
|
ExecAllowlist: 'exec_allowlist',
|
|
46
|
+
ExecTargetPaths: 'exec_target_paths',
|
|
46
47
|
FactualityScore: 'factuality_score',
|
|
47
48
|
FlowCompartments: 'flow_compartments',
|
|
48
49
|
FlowConfidentiality: 'flow_confidentiality',
|
|
@@ -110,7 +111,9 @@ export const AgentOpsContextKey = {
|
|
|
110
111
|
PrincipalCompartments: 'principal_compartments',
|
|
111
112
|
PrivilegeScope: 'privilege_scope',
|
|
112
113
|
ProfanityScore: 'profanity_score',
|
|
114
|
+
ReadTargetPaths: 'read_target_paths',
|
|
113
115
|
RequestId: 'request_id',
|
|
116
|
+
ResolvedTargetPaths: 'resolved_target_paths',
|
|
114
117
|
Role: 'role',
|
|
115
118
|
RpmExceeded: 'rpm_exceeded',
|
|
116
119
|
RpmRemainingPct: 'rpm_remaining_pct',
|
|
@@ -160,11 +163,13 @@ export const AgentOpsContextKey = {
|
|
|
160
163
|
TopicConfidence: 'topic_confidence',
|
|
161
164
|
TpmExceeded: 'tpm_exceeded',
|
|
162
165
|
TpmRemainingPct: 'tpm_remaining_pct',
|
|
166
|
+
UnresolvedTarget: 'unresolved_target',
|
|
163
167
|
UserEmail: 'user_email',
|
|
164
168
|
ViolenceScore: 'violence_score',
|
|
165
169
|
WeaponsScore: 'weapons_score',
|
|
166
170
|
WorkspaceRoot: 'workspace_root',
|
|
167
171
|
WritablePaths: 'writable_paths',
|
|
172
|
+
WriteTargetPaths: 'write_target_paths',
|
|
168
173
|
};
|
|
169
174
|
/**
|
|
170
175
|
* The full set of authorable context attribute keys for AgentOps.
|
|
@@ -207,6 +212,7 @@ export const AgentOpsContextKeys = [
|
|
|
207
212
|
AgentOpsContextKey.EncodedTypes,
|
|
208
213
|
AgentOpsContextKey.Event,
|
|
209
214
|
AgentOpsContextKey.ExecAllowlist,
|
|
215
|
+
AgentOpsContextKey.ExecTargetPaths,
|
|
210
216
|
AgentOpsContextKey.FactualityScore,
|
|
211
217
|
AgentOpsContextKey.FlowCompartments,
|
|
212
218
|
AgentOpsContextKey.FlowConfidentiality,
|
|
@@ -274,7 +280,9 @@ export const AgentOpsContextKeys = [
|
|
|
274
280
|
AgentOpsContextKey.PrincipalCompartments,
|
|
275
281
|
AgentOpsContextKey.PrivilegeScope,
|
|
276
282
|
AgentOpsContextKey.ProfanityScore,
|
|
283
|
+
AgentOpsContextKey.ReadTargetPaths,
|
|
277
284
|
AgentOpsContextKey.RequestId,
|
|
285
|
+
AgentOpsContextKey.ResolvedTargetPaths,
|
|
278
286
|
AgentOpsContextKey.Role,
|
|
279
287
|
AgentOpsContextKey.RpmExceeded,
|
|
280
288
|
AgentOpsContextKey.RpmRemainingPct,
|
|
@@ -324,9 +332,11 @@ export const AgentOpsContextKeys = [
|
|
|
324
332
|
AgentOpsContextKey.TopicConfidence,
|
|
325
333
|
AgentOpsContextKey.TpmExceeded,
|
|
326
334
|
AgentOpsContextKey.TpmRemainingPct,
|
|
335
|
+
AgentOpsContextKey.UnresolvedTarget,
|
|
327
336
|
AgentOpsContextKey.UserEmail,
|
|
328
337
|
AgentOpsContextKey.ViolenceScore,
|
|
329
338
|
AgentOpsContextKey.WeaponsScore,
|
|
330
339
|
AgentOpsContextKey.WorkspaceRoot,
|
|
331
340
|
AgentOpsContextKey.WritablePaths,
|
|
341
|
+
AgentOpsContextKey.WriteTargetPaths,
|
|
332
342
|
];
|
|
@@ -8,6 +8,7 @@ export declare const AiGatewayContextKey: {
|
|
|
8
8
|
readonly Content: "content";
|
|
9
9
|
readonly CrimeScore: "crime_score";
|
|
10
10
|
readonly DetectedThreats: "detected_threats";
|
|
11
|
+
readonly ExecTargetPaths: "exec_target_paths";
|
|
11
12
|
readonly HateSpeechScore: "hate_speech_score";
|
|
12
13
|
readonly HighestSeverity: "highest_severity";
|
|
13
14
|
readonly IndirectInjectionScore: "indirect_injection_score";
|
|
@@ -42,6 +43,8 @@ export declare const AiGatewayContextKey: {
|
|
|
42
43
|
readonly PiiTypes: "pii_types";
|
|
43
44
|
readonly PrivilegeScope: "privilege_scope";
|
|
44
45
|
readonly ProfanityScore: "profanity_score";
|
|
46
|
+
readonly ReadTargetPaths: "read_target_paths";
|
|
47
|
+
readonly ResolvedTargetPaths: "resolved_target_paths";
|
|
45
48
|
readonly Role: "role";
|
|
46
49
|
readonly RpmExceeded: "rpm_exceeded";
|
|
47
50
|
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
@@ -78,12 +81,14 @@ export declare const AiGatewayContextKey: {
|
|
|
78
81
|
readonly ToolRiskScore: "tool_risk_score";
|
|
79
82
|
readonly TpmExceeded: "tpm_exceeded";
|
|
80
83
|
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
84
|
+
readonly UnresolvedTarget: "unresolved_target";
|
|
81
85
|
readonly ViolenceScore: "violence_score";
|
|
82
86
|
readonly WeaponsScore: "weapons_score";
|
|
87
|
+
readonly WriteTargetPaths: "write_target_paths";
|
|
83
88
|
};
|
|
84
89
|
export type AiGatewayContextKey = (typeof AiGatewayContextKey)[keyof typeof AiGatewayContextKey];
|
|
85
90
|
/**
|
|
86
91
|
* The full set of authorable context attribute keys for AiGateway.
|
|
87
92
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
88
93
|
*/
|
|
89
|
-
export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
|
|
94
|
+
export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "exec_target_paths", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "read_target_paths", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "violence_score", "weapons_score", "write_target_paths"];
|
|
@@ -10,6 +10,7 @@ export const AiGatewayContextKey = {
|
|
|
10
10
|
Content: 'content',
|
|
11
11
|
CrimeScore: 'crime_score',
|
|
12
12
|
DetectedThreats: 'detected_threats',
|
|
13
|
+
ExecTargetPaths: 'exec_target_paths',
|
|
13
14
|
HateSpeechScore: 'hate_speech_score',
|
|
14
15
|
HighestSeverity: 'highest_severity',
|
|
15
16
|
IndirectInjectionScore: 'indirect_injection_score',
|
|
@@ -44,6 +45,8 @@ export const AiGatewayContextKey = {
|
|
|
44
45
|
PiiTypes: 'pii_types',
|
|
45
46
|
PrivilegeScope: 'privilege_scope',
|
|
46
47
|
ProfanityScore: 'profanity_score',
|
|
48
|
+
ReadTargetPaths: 'read_target_paths',
|
|
49
|
+
ResolvedTargetPaths: 'resolved_target_paths',
|
|
47
50
|
Role: 'role',
|
|
48
51
|
RpmExceeded: 'rpm_exceeded',
|
|
49
52
|
RpmRemainingPct: 'rpm_remaining_pct',
|
|
@@ -80,8 +83,10 @@ export const AiGatewayContextKey = {
|
|
|
80
83
|
ToolRiskScore: 'tool_risk_score',
|
|
81
84
|
TpmExceeded: 'tpm_exceeded',
|
|
82
85
|
TpmRemainingPct: 'tpm_remaining_pct',
|
|
86
|
+
UnresolvedTarget: 'unresolved_target',
|
|
83
87
|
ViolenceScore: 'violence_score',
|
|
84
88
|
WeaponsScore: 'weapons_score',
|
|
89
|
+
WriteTargetPaths: 'write_target_paths',
|
|
85
90
|
};
|
|
86
91
|
/**
|
|
87
92
|
* The full set of authorable context attribute keys for AiGateway.
|
|
@@ -91,6 +96,7 @@ export const AiGatewayContextKeys = [
|
|
|
91
96
|
AiGatewayContextKey.Content,
|
|
92
97
|
AiGatewayContextKey.CrimeScore,
|
|
93
98
|
AiGatewayContextKey.DetectedThreats,
|
|
99
|
+
AiGatewayContextKey.ExecTargetPaths,
|
|
94
100
|
AiGatewayContextKey.HateSpeechScore,
|
|
95
101
|
AiGatewayContextKey.HighestSeverity,
|
|
96
102
|
AiGatewayContextKey.IndirectInjectionScore,
|
|
@@ -125,6 +131,8 @@ export const AiGatewayContextKeys = [
|
|
|
125
131
|
AiGatewayContextKey.PiiTypes,
|
|
126
132
|
AiGatewayContextKey.PrivilegeScope,
|
|
127
133
|
AiGatewayContextKey.ProfanityScore,
|
|
134
|
+
AiGatewayContextKey.ReadTargetPaths,
|
|
135
|
+
AiGatewayContextKey.ResolvedTargetPaths,
|
|
128
136
|
AiGatewayContextKey.Role,
|
|
129
137
|
AiGatewayContextKey.RpmExceeded,
|
|
130
138
|
AiGatewayContextKey.RpmRemainingPct,
|
|
@@ -161,6 +169,8 @@ export const AiGatewayContextKeys = [
|
|
|
161
169
|
AiGatewayContextKey.ToolRiskScore,
|
|
162
170
|
AiGatewayContextKey.TpmExceeded,
|
|
163
171
|
AiGatewayContextKey.TpmRemainingPct,
|
|
172
|
+
AiGatewayContextKey.UnresolvedTarget,
|
|
164
173
|
AiGatewayContextKey.ViolenceScore,
|
|
165
174
|
AiGatewayContextKey.WeaponsScore,
|
|
175
|
+
AiGatewayContextKey.WriteTargetPaths,
|
|
166
176
|
];
|
|
@@ -107,7 +107,7 @@ export const AI_GATEWAY_DETECTORS = [
|
|
|
107
107
|
inhouse: false,
|
|
108
108
|
model: null,
|
|
109
109
|
latencyP50Ms: 1,
|
|
110
|
-
emits: [{ name: "tool_name", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_category", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_is_builtin", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_is_sensitive", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_operation_classes", type: "Set<String>", modifiable: false, semantic: "category_set" }, { name: "tool_risk_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "Tool-call risk score (0-100)." }],
|
|
110
|
+
emits: [{ name: "tool_name", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_category", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_is_builtin", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_is_sensitive", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_operation_classes", type: "Set<String>", modifiable: false, semantic: "category_set" }, { name: "resolved_target_paths", type: "String", modifiable: false, description: "Newline-delimited (leading+trailing \\n) union of statically-resolved absolute target paths, any capability. Cedar `like` is anchored so patterns start with `*`: sub-tree `*\\n/etc/*`, bare dir `*\\n/etc\\n*`, exact `*\\n/etc/passwd\\n*`." }, { name: "read_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths the command reads or enumerates. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "write_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths the command writes, creates, or destroys. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "exec_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths executed as a script. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "unresolved_target", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments." }, { name: "tool_risk_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "Tool-call risk score (0-100)." }],
|
|
111
111
|
supportedModes: ["enforce", "monitor", "alert"],
|
|
112
112
|
defendsAgainst: ["excessive_agency", "unauthorized_access", "tool_hijacking"],
|
|
113
113
|
exampleAttacks: [],
|
|
@@ -187,6 +187,7 @@ export const AI_GATEWAY_DETECTORS = [
|
|
|
187
187
|
// resolved at codegen). Used by the client field→detector resolver — no Shield round-trip.
|
|
188
188
|
export const AI_GATEWAY_FIELD_TO_DETECTORS = {
|
|
189
189
|
"crime_score": ["toxicity"],
|
|
190
|
+
"exec_target_paths": ["tool_risk"],
|
|
190
191
|
"hate_speech_score": ["toxicity"],
|
|
191
192
|
"indirect_injection_score": ["deepcontext"],
|
|
192
193
|
"injection_score": ["injection"],
|
|
@@ -216,6 +217,8 @@ export const AI_GATEWAY_FIELD_TO_DETECTORS = {
|
|
|
216
217
|
"pii_score": ["pii"],
|
|
217
218
|
"pii_types": ["pii"],
|
|
218
219
|
"profanity_score": ["toxicity"],
|
|
220
|
+
"read_target_paths": ["tool_risk"],
|
|
221
|
+
"resolved_target_paths": ["tool_risk"],
|
|
219
222
|
"rug_pull_detected": ["rug_pull"],
|
|
220
223
|
"rug_pull_score": ["rug_pull"],
|
|
221
224
|
"secret_count": ["secrets"],
|
|
@@ -241,8 +244,10 @@ export const AI_GATEWAY_FIELD_TO_DETECTORS = {
|
|
|
241
244
|
"tool_poisoning_detected": ["tool_poisoning"],
|
|
242
245
|
"tool_poisoning_score": ["tool_poisoning"],
|
|
243
246
|
"tool_risk_score": ["tool_risk"],
|
|
247
|
+
"unresolved_target": ["tool_risk"],
|
|
244
248
|
"violence_score": ["toxicity"],
|
|
245
249
|
"weapons_score": ["toxicity"],
|
|
250
|
+
"write_target_paths": ["tool_risk"],
|
|
246
251
|
};
|
|
247
252
|
export function aiGatewayDetectorById(id) {
|
|
248
253
|
return AI_GATEWAY_DETECTORS.find((d) => d.id === id);
|
|
@@ -36,6 +36,7 @@ export declare const GuardrailsContextKey: {
|
|
|
36
36
|
readonly EncodedCount: "encoded_count";
|
|
37
37
|
readonly EncodedScore: "encoded_score";
|
|
38
38
|
readonly EncodedTypes: "encoded_types";
|
|
39
|
+
readonly ExecTargetPaths: "exec_target_paths";
|
|
39
40
|
readonly FactualityScore: "factuality_score";
|
|
40
41
|
readonly HallucinationScore: "hallucination_score";
|
|
41
42
|
readonly HateSpeechScore: "hate_speech_score";
|
|
@@ -97,7 +98,9 @@ export declare const GuardrailsContextKey: {
|
|
|
97
98
|
readonly Principal: "principal";
|
|
98
99
|
readonly PrivilegeScope: "privilege_scope";
|
|
99
100
|
readonly ProfanityScore: "profanity_score";
|
|
101
|
+
readonly ReadTargetPaths: "read_target_paths";
|
|
100
102
|
readonly RequestId: "request_id";
|
|
103
|
+
readonly ResolvedTargetPaths: "resolved_target_paths";
|
|
101
104
|
readonly Role: "role";
|
|
102
105
|
readonly RpmExceeded: "rpm_exceeded";
|
|
103
106
|
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
@@ -143,12 +146,14 @@ export declare const GuardrailsContextKey: {
|
|
|
143
146
|
readonly TopicConfidence: "topic_confidence";
|
|
144
147
|
readonly TpmExceeded: "tpm_exceeded";
|
|
145
148
|
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
149
|
+
readonly UnresolvedTarget: "unresolved_target";
|
|
146
150
|
readonly ViolenceScore: "violence_score";
|
|
147
151
|
readonly WeaponsScore: "weapons_score";
|
|
152
|
+
readonly WriteTargetPaths: "write_target_paths";
|
|
148
153
|
};
|
|
149
154
|
export type GuardrailsContextKey = (typeof GuardrailsContextKey)[keyof typeof GuardrailsContextKey];
|
|
150
155
|
/**
|
|
151
156
|
* The full set of authorable context attribute keys for Guardrails.
|
|
152
157
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
153
158
|
*/
|
|
154
|
-
export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "mcp_config_risk", "mcp_input_request_detected", "mcp_input_request_methods", "mcp_input_request_score", "mcp_input_request_types", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "request_id", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
|
|
159
|
+
export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "exec_target_paths", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "mcp_config_risk", "mcp_input_request_detected", "mcp_input_request_methods", "mcp_input_request_score", "mcp_input_request_types", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "read_target_paths", "request_id", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "violence_score", "weapons_score", "write_target_paths"];
|
|
@@ -38,6 +38,7 @@ export const GuardrailsContextKey = {
|
|
|
38
38
|
EncodedCount: 'encoded_count',
|
|
39
39
|
EncodedScore: 'encoded_score',
|
|
40
40
|
EncodedTypes: 'encoded_types',
|
|
41
|
+
ExecTargetPaths: 'exec_target_paths',
|
|
41
42
|
FactualityScore: 'factuality_score',
|
|
42
43
|
HallucinationScore: 'hallucination_score',
|
|
43
44
|
HateSpeechScore: 'hate_speech_score',
|
|
@@ -99,7 +100,9 @@ export const GuardrailsContextKey = {
|
|
|
99
100
|
Principal: 'principal',
|
|
100
101
|
PrivilegeScope: 'privilege_scope',
|
|
101
102
|
ProfanityScore: 'profanity_score',
|
|
103
|
+
ReadTargetPaths: 'read_target_paths',
|
|
102
104
|
RequestId: 'request_id',
|
|
105
|
+
ResolvedTargetPaths: 'resolved_target_paths',
|
|
103
106
|
Role: 'role',
|
|
104
107
|
RpmExceeded: 'rpm_exceeded',
|
|
105
108
|
RpmRemainingPct: 'rpm_remaining_pct',
|
|
@@ -145,8 +148,10 @@ export const GuardrailsContextKey = {
|
|
|
145
148
|
TopicConfidence: 'topic_confidence',
|
|
146
149
|
TpmExceeded: 'tpm_exceeded',
|
|
147
150
|
TpmRemainingPct: 'tpm_remaining_pct',
|
|
151
|
+
UnresolvedTarget: 'unresolved_target',
|
|
148
152
|
ViolenceScore: 'violence_score',
|
|
149
153
|
WeaponsScore: 'weapons_score',
|
|
154
|
+
WriteTargetPaths: 'write_target_paths',
|
|
150
155
|
};
|
|
151
156
|
/**
|
|
152
157
|
* The full set of authorable context attribute keys for Guardrails.
|
|
@@ -184,6 +189,7 @@ export const GuardrailsContextKeys = [
|
|
|
184
189
|
GuardrailsContextKey.EncodedCount,
|
|
185
190
|
GuardrailsContextKey.EncodedScore,
|
|
186
191
|
GuardrailsContextKey.EncodedTypes,
|
|
192
|
+
GuardrailsContextKey.ExecTargetPaths,
|
|
187
193
|
GuardrailsContextKey.FactualityScore,
|
|
188
194
|
GuardrailsContextKey.HallucinationScore,
|
|
189
195
|
GuardrailsContextKey.HateSpeechScore,
|
|
@@ -245,7 +251,9 @@ export const GuardrailsContextKeys = [
|
|
|
245
251
|
GuardrailsContextKey.Principal,
|
|
246
252
|
GuardrailsContextKey.PrivilegeScope,
|
|
247
253
|
GuardrailsContextKey.ProfanityScore,
|
|
254
|
+
GuardrailsContextKey.ReadTargetPaths,
|
|
248
255
|
GuardrailsContextKey.RequestId,
|
|
256
|
+
GuardrailsContextKey.ResolvedTargetPaths,
|
|
249
257
|
GuardrailsContextKey.Role,
|
|
250
258
|
GuardrailsContextKey.RpmExceeded,
|
|
251
259
|
GuardrailsContextKey.RpmRemainingPct,
|
|
@@ -291,6 +299,8 @@ export const GuardrailsContextKeys = [
|
|
|
291
299
|
GuardrailsContextKey.TopicConfidence,
|
|
292
300
|
GuardrailsContextKey.TpmExceeded,
|
|
293
301
|
GuardrailsContextKey.TpmRemainingPct,
|
|
302
|
+
GuardrailsContextKey.UnresolvedTarget,
|
|
294
303
|
GuardrailsContextKey.ViolenceScore,
|
|
295
304
|
GuardrailsContextKey.WeaponsScore,
|
|
305
|
+
GuardrailsContextKey.WriteTargetPaths,
|
|
296
306
|
];
|