@highflame/policy 2.1.35 → 2.1.37
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/ai_gateway/context.json +431 -11
- package/_schemas/ai_gateway/schema.cedarschema +91 -11
- package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +66 -43
- package/_schemas/ai_gateway/templates/defaults/baseline.cedar +9 -11
- package/_schemas/ai_gateway/templates/defaults/semantic.cedar +63 -40
- package/_schemas/ai_gateway/templates/defaults/tools.cedar +48 -36
- package/_schemas/ai_gateway/templates/llm_default_allow.cedar +9 -10
- package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +22 -14
- package/_schemas/ai_gateway/templates/mcp_tool_permissions.cedar +29 -27
- package/_schemas/ai_gateway/templates/pii_redaction.cedar +38 -33
- package/_schemas/ai_gateway/templates/templates.json +52 -50
- package/_schemas/guardrails/context.json +12 -12
- package/_schemas/guardrails/schema.cedarschema +12 -12
- package/_schemas/guardrails/templates/defaults/agent_identity.cedar +60 -56
- package/_schemas/guardrails/templates/defaults/agentic_safety.cedar +83 -58
- package/_schemas/guardrails/templates/defaults/baseline.cedar +9 -12
- package/_schemas/guardrails/templates/defaults/injection.cedar +48 -36
- package/_schemas/guardrails/templates/defaults/pii.cedar +27 -20
- package/_schemas/guardrails/templates/defaults/secrets.cedar +39 -22
- package/_schemas/guardrails/templates/defaults/security_patterns.cedar +38 -25
- package/_schemas/guardrails/templates/defaults/semantic.cedar +47 -31
- package/_schemas/guardrails/templates/defaults/tool_risk.cedar +34 -26
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +57 -47
- package/_schemas/guardrails/templates/mcp_tool_permissions.cedar +60 -43
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +29 -42
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +43 -57
- package/_schemas/guardrails/templates/profiles/a2a_security/identity_enforcement.cedar +40 -57
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +48 -62
- package/_schemas/guardrails/templates/profiles/a2a_security/supply_chain.cedar +40 -56
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +24 -34
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +45 -37
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +11 -16
- package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +22 -9
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +27 -15
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +37 -22
- package/_schemas/guardrails/templates/profiles/code_agent/agentic_security.cedar +68 -47
- package/_schemas/guardrails/templates/profiles/code_agent/encoding.cedar +17 -21
- package/_schemas/guardrails/templates/profiles/code_agent/path_security.cedar +74 -73
- package/_schemas/guardrails/templates/profiles/code_agent/security.cedar +13 -9
- package/_schemas/guardrails/templates/profiles/code_agent/supply_chain.cedar +36 -58
- package/_schemas/guardrails/templates/profiles/data_pipeline/agentic_security.cedar +22 -15
- package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +52 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +41 -18
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +18 -36
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_safety.cedar +86 -79
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +73 -70
- package/_schemas/guardrails/templates/templates.json +198 -217
- package/_schemas/overwatch/context.json +14 -14
- package/_schemas/overwatch/schema.cedarschema +12 -12
- package/_schemas/sentry/context.json +11 -11
- package/_schemas/sentry/schema.cedarschema +11 -11
- package/_schemas/sentry/templates/defaults/baseline.cedar +8 -12
- package/_schemas/sentry/templates/defaults/clipboard.cedar +43 -42
- package/_schemas/sentry/templates/defaults/content_safety.cedar +38 -68
- package/_schemas/sentry/templates/defaults/file_safety.cedar +18 -26
- package/_schemas/sentry/templates/defaults/organization.cedar +10 -17
- package/_schemas/sentry/templates/defaults/pii.cedar +52 -73
- package/_schemas/sentry/templates/defaults/secrets.cedar +65 -58
- package/_schemas/sentry/templates/defaults/semantic.cedar +40 -59
- package/_schemas/sentry/templates/templates.json +53 -43
- package/dist/ai_gateway-context.gen.d.ts +18 -4
- package/dist/ai_gateway-context.gen.js +18 -4
- package/dist/ai_gateway-defaults.gen.d.ts +4 -1
- package/dist/ai_gateway-defaults.gen.js +398 -320
- package/dist/builder.d.ts +2 -1
- package/dist/builder.js +5 -2
- package/dist/guardrails-context.gen.d.ts +5 -5
- package/dist/guardrails-context.gen.js +5 -5
- package/dist/guardrails-defaults.gen.d.ts +4 -1
- package/dist/guardrails-defaults.gen.js +2130 -1903
- package/dist/overwatch-context.gen.d.ts +5 -5
- package/dist/overwatch-context.gen.js +5 -5
- package/dist/overwatch-defaults.gen.d.ts +4 -1
- package/dist/overwatch-defaults.gen.js +560 -566
- package/dist/sentry-context.gen.d.ts +3 -3
- package/dist/sentry-context.gen.js +3 -3
- package/dist/sentry-defaults.gen.d.ts +4 -1
- package/dist/sentry-defaults.gen.js +392 -453
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +249 -99
- package/package.json +1 -1
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
"key": "
|
|
77
|
+
"key": "secrets_detected",
|
|
78
78
|
"type": "boolean",
|
|
79
79
|
"required": true,
|
|
80
80
|
"description": "Whether secrets or credentials were detected"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"description": "Number of PII pattern matches"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
"key": "
|
|
113
|
+
"key": "invisible_chars_detected",
|
|
114
114
|
"type": "boolean",
|
|
115
115
|
"required": false,
|
|
116
116
|
"description": "Whether invisible Unicode characters (zero-width, bidi overrides, tag chars) were detected"
|
|
@@ -170,19 +170,19 @@
|
|
|
170
170
|
"description": "Profanity detection score (0-100)"
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
|
-
"key": "
|
|
173
|
+
"key": "pii_score",
|
|
174
174
|
"type": "number",
|
|
175
175
|
"required": true,
|
|
176
176
|
"description": "PII detection ML classifier confidence (0-100)"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
"key": "
|
|
179
|
+
"key": "injection_score",
|
|
180
180
|
"type": "number",
|
|
181
181
|
"required": true,
|
|
182
182
|
"description": "Combined prompt injection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use injection_pulse_score / injection_deep_context_score for individual detector control"
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
"key": "
|
|
185
|
+
"key": "jailbreak_score",
|
|
186
186
|
"type": "number",
|
|
187
187
|
"required": true,
|
|
188
188
|
"description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use jailbreak_pulse_score / jailbreak_deep_context_score for individual detector control"
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
|
-
"key": "
|
|
395
|
+
"key": "secrets_detected",
|
|
396
396
|
"type": "boolean",
|
|
397
397
|
"required": false,
|
|
398
398
|
"description": "Whether secrets or credentials were detected"
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
"description": "Number of PII pattern matches"
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
|
-
"key": "
|
|
431
|
+
"key": "invisible_chars_detected",
|
|
432
432
|
"type": "boolean",
|
|
433
433
|
"required": false,
|
|
434
434
|
"description": "Whether invisible Unicode characters were detected"
|
|
@@ -482,19 +482,19 @@
|
|
|
482
482
|
"description": "Profanity detection score (0-100)"
|
|
483
483
|
},
|
|
484
484
|
{
|
|
485
|
-
"key": "
|
|
485
|
+
"key": "pii_score",
|
|
486
486
|
"type": "number",
|
|
487
487
|
"required": false,
|
|
488
488
|
"description": "PII detection ML classifier confidence (0-100)"
|
|
489
489
|
},
|
|
490
490
|
{
|
|
491
|
-
"key": "
|
|
491
|
+
"key": "injection_score",
|
|
492
492
|
"type": "number",
|
|
493
493
|
"required": false,
|
|
494
494
|
"description": "Combined prompt injection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use injection_pulse_score / injection_deep_context_score for individual detector control"
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
|
-
"key": "
|
|
497
|
+
"key": "jailbreak_score",
|
|
498
498
|
"type": "number",
|
|
499
499
|
"required": false,
|
|
500
500
|
"description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use jailbreak_pulse_score / jailbreak_deep_context_score for individual detector control"
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
759
759
|
},
|
|
760
760
|
{
|
|
761
|
-
"key": "
|
|
761
|
+
"key": "invisible_chars_detected",
|
|
762
762
|
"type": "boolean",
|
|
763
763
|
"required": false,
|
|
764
764
|
"description": "Whether invisible Unicode characters were detected in server data"
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
969
969
|
},
|
|
970
970
|
{
|
|
971
|
-
"key": "
|
|
971
|
+
"key": "secrets_detected",
|
|
972
972
|
"type": "boolean",
|
|
973
973
|
"required": false,
|
|
974
974
|
"description": "Whether secrets or credentials were detected in file content"
|
|
@@ -1160,7 +1160,7 @@
|
|
|
1160
1160
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
1161
1161
|
},
|
|
1162
1162
|
{
|
|
1163
|
-
"key": "
|
|
1163
|
+
"key": "secrets_detected",
|
|
1164
1164
|
"type": "boolean",
|
|
1165
1165
|
"required": false,
|
|
1166
1166
|
"description": "Whether secrets or credentials were detected in content being written"
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
"description": "Number of PII pattern matches"
|
|
1197
1197
|
},
|
|
1198
1198
|
{
|
|
1199
|
-
"key": "
|
|
1199
|
+
"key": "invisible_chars_detected",
|
|
1200
1200
|
"type": "boolean",
|
|
1201
1201
|
"required": false,
|
|
1202
1202
|
"description": "Whether invisible Unicode characters were detected in content being written"
|
|
@@ -95,7 +95,7 @@ action process_prompt appliesTo {
|
|
|
95
95
|
threat_categories: Set<String>, // Threat category names
|
|
96
96
|
detected_threats: Set<String>, // Detection rule names that matched
|
|
97
97
|
max_threat_severity: Long, // Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)
|
|
98
|
-
|
|
98
|
+
secrets_detected: Bool, // Whether secrets/credentials detected
|
|
99
99
|
|
|
100
100
|
// --- Secrets (granular) ---
|
|
101
101
|
secret_types?: Set<String>, // Types: "aws_access_key", "github_token", "ssh_private_key", etc.
|
|
@@ -107,7 +107,7 @@ action process_prompt appliesTo {
|
|
|
107
107
|
pii_count?: Long, // Number of PII matches
|
|
108
108
|
|
|
109
109
|
// --- Encoding & Unicode Attacks ---
|
|
110
|
-
|
|
110
|
+
invisible_chars_detected?: Bool, // Zero-width chars, bidi overrides, tag chars detected
|
|
111
111
|
invisible_chars_score?: Long, // Unicode attack severity (0-100)
|
|
112
112
|
|
|
113
113
|
// --- Content Safety Scores (0-100, from ML classifiers) ---
|
|
@@ -119,9 +119,9 @@ action process_prompt appliesTo {
|
|
|
119
119
|
profanity_score: Long,
|
|
120
120
|
|
|
121
121
|
// --- ML Detector Confidence Scores (0-100) ---
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
pii_score: Long, // PII detection classifier confidence
|
|
123
|
+
injection_score: Long, // Combined injection confidence: MAX(pulse, deep_context)
|
|
124
|
+
jailbreak_score: Long, // Combined jailbreak confidence: MAX(pulse, deep_context)
|
|
125
125
|
injection_pulse_score?: Long, // 0-100 Pulse single-turn classifier
|
|
126
126
|
injection_deep_context_score?: Long, // 0-100 DeepContext multi-turn
|
|
127
127
|
jailbreak_pulse_score?: Long, // 0-100 Pulse single-turn classifier
|
|
@@ -181,7 +181,7 @@ action call_tool appliesTo {
|
|
|
181
181
|
threat_categories?: Set<String>,
|
|
182
182
|
detected_threats?: Set<String>,
|
|
183
183
|
max_threat_severity?: Long,
|
|
184
|
-
|
|
184
|
+
secrets_detected?: Bool,
|
|
185
185
|
|
|
186
186
|
// --- Secrets (granular) ---
|
|
187
187
|
secret_types?: Set<String>,
|
|
@@ -193,7 +193,7 @@ action call_tool appliesTo {
|
|
|
193
193
|
pii_count?: Long,
|
|
194
194
|
|
|
195
195
|
// --- Encoding & Unicode Attacks ---
|
|
196
|
-
|
|
196
|
+
invisible_chars_detected?: Bool,
|
|
197
197
|
invisible_chars_score?: Long,
|
|
198
198
|
|
|
199
199
|
// --- Content Safety Scores (0-100) ---
|
|
@@ -205,9 +205,9 @@ action call_tool appliesTo {
|
|
|
205
205
|
profanity_score?: Long,
|
|
206
206
|
|
|
207
207
|
// --- ML Detector Confidence Scores (0-100) ---
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
pii_score?: Long,
|
|
209
|
+
injection_score?: Long, // Combined injection confidence: MAX(pulse, deep_context)
|
|
210
|
+
jailbreak_score?: Long, // Combined jailbreak confidence: MAX(pulse, deep_context)
|
|
211
211
|
injection_pulse_score?: Long, // 0-100 Pulse single-turn classifier
|
|
212
212
|
injection_deep_context_score?: Long, // 0-100 DeepContext multi-turn
|
|
213
213
|
jailbreak_pulse_score?: Long, // 0-100 Pulse single-turn classifier
|
|
@@ -324,7 +324,7 @@ action read_file appliesTo {
|
|
|
324
324
|
threat_categories?: Set<String>,
|
|
325
325
|
detected_threats?: Set<String>,
|
|
326
326
|
max_threat_severity?: Long,
|
|
327
|
-
|
|
327
|
+
secrets_detected?: Bool,
|
|
328
328
|
|
|
329
329
|
// --- Secrets (granular) ---
|
|
330
330
|
secret_types?: Set<String>,
|
|
@@ -375,7 +375,7 @@ action write_file appliesTo {
|
|
|
375
375
|
threat_categories?: Set<String>,
|
|
376
376
|
detected_threats?: Set<String>,
|
|
377
377
|
max_threat_severity?: Long,
|
|
378
|
-
|
|
378
|
+
secrets_detected?: Bool,
|
|
379
379
|
|
|
380
380
|
// --- Secrets (granular) ---
|
|
381
381
|
secret_types?: Set<String>,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"description": "Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
"key": "
|
|
77
|
+
"key": "secrets_detected",
|
|
78
78
|
"type": "boolean",
|
|
79
79
|
"required": true,
|
|
80
80
|
"description": "Whether secrets or credentials were detected in the message"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"description": "Number of PII pattern matches"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
"key": "
|
|
113
|
+
"key": "pii_score",
|
|
114
114
|
"type": "number",
|
|
115
115
|
"required": false,
|
|
116
116
|
"description": "PII detection confidence (0-100). Fixed 80 when regex PII detected, else 0"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"description": "Topic classifier confidence (0-100)"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
"key": "
|
|
179
|
+
"key": "invisible_chars_detected",
|
|
180
180
|
"type": "boolean",
|
|
181
181
|
"required": false,
|
|
182
182
|
"description": "Whether invisible Unicode characters (zero-width, bidi overrides, tag chars) were detected"
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
"description": "Numeric severity (0-4)"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
|
-
"key": "
|
|
401
|
+
"key": "secrets_detected",
|
|
402
402
|
"type": "boolean",
|
|
403
403
|
"required": true,
|
|
404
404
|
"description": "Whether secrets detected in AI response"
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
"description": "Number of PII matches in response"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
|
-
"key": "
|
|
437
|
+
"key": "pii_score",
|
|
438
438
|
"type": "number",
|
|
439
439
|
"required": false,
|
|
440
440
|
"description": "PII detection confidence (0-100)"
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
"description": "Numeric severity (0-4)"
|
|
651
651
|
},
|
|
652
652
|
{
|
|
653
|
-
"key": "
|
|
653
|
+
"key": "secrets_detected",
|
|
654
654
|
"type": "boolean",
|
|
655
655
|
"required": true,
|
|
656
656
|
"description": "Whether secrets detected in pasted content"
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
"description": "PII match count"
|
|
687
687
|
},
|
|
688
688
|
{
|
|
689
|
-
"key": "
|
|
689
|
+
"key": "pii_score",
|
|
690
690
|
"type": "number",
|
|
691
691
|
"required": false,
|
|
692
692
|
"description": "PII detection confidence (0-100)"
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
"description": "Code ratio (0-100)"
|
|
759
759
|
},
|
|
760
760
|
{
|
|
761
|
-
"key": "
|
|
761
|
+
"key": "invisible_chars_detected",
|
|
762
762
|
"type": "boolean",
|
|
763
763
|
"required": false,
|
|
764
764
|
"description": "Whether invisible Unicode characters detected"
|
|
@@ -974,7 +974,7 @@
|
|
|
974
974
|
"description": "Numeric severity (0-4)"
|
|
975
975
|
},
|
|
976
976
|
{
|
|
977
|
-
"key": "
|
|
977
|
+
"key": "secrets_detected",
|
|
978
978
|
"type": "boolean",
|
|
979
979
|
"required": true,
|
|
980
980
|
"description": "Whether secrets detected in file content"
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
"description": "PII match count"
|
|
1011
1011
|
},
|
|
1012
1012
|
{
|
|
1013
|
-
"key": "
|
|
1013
|
+
"key": "pii_score",
|
|
1014
1014
|
"type": "number",
|
|
1015
1015
|
"required": false,
|
|
1016
1016
|
"description": "PII confidence (0-100)"
|
|
@@ -1088,7 +1088,7 @@
|
|
|
1088
1088
|
"description": "Whether phishing URLs detected in file"
|
|
1089
1089
|
},
|
|
1090
1090
|
{
|
|
1091
|
-
"key": "
|
|
1091
|
+
"key": "invisible_chars_detected",
|
|
1092
1092
|
"type": "boolean",
|
|
1093
1093
|
"required": false,
|
|
1094
1094
|
"description": "Whether invisible chars detected in file"
|
|
@@ -94,7 +94,7 @@ action process_prompt appliesTo {
|
|
|
94
94
|
max_threat_severity: Long, // Numeric severity (0=none, 1=low, 2=medium, 3=high, 4=critical)
|
|
95
95
|
|
|
96
96
|
// --- Secrets Detection (from SecretsDetector) ---
|
|
97
|
-
|
|
97
|
+
secrets_detected: Bool, // Whether secrets/credentials detected
|
|
98
98
|
secret_types?: Set<String>, // Types: "aws_access_key", "github_token", "ssh_private_key", etc.
|
|
99
99
|
secret_count?: Long, // Number of distinct secrets found
|
|
100
100
|
|
|
@@ -102,7 +102,7 @@ action process_prompt appliesTo {
|
|
|
102
102
|
pii_detected?: Bool, // Whether any PII patterns matched
|
|
103
103
|
pii_types?: Set<String>, // Types: "ssn", "credit_card", "email", "phone", etc.
|
|
104
104
|
pii_count?: Long, // Number of PII matches
|
|
105
|
-
|
|
105
|
+
pii_score?: Long, // PII detection confidence (0-100)
|
|
106
106
|
|
|
107
107
|
// --- Content Safety Scores (from ToxicityDetector, 0-100) ---
|
|
108
108
|
violence_score: Long,
|
|
@@ -121,7 +121,7 @@ action process_prompt appliesTo {
|
|
|
121
121
|
topic_confidence?: Long, // Topic classifier confidence (0-100)
|
|
122
122
|
|
|
123
123
|
// --- Encoding & Unicode Attacks (from SecurityFiltersDetector, EncodedInjectionDetector) ---
|
|
124
|
-
|
|
124
|
+
invisible_chars_detected?: Bool, // Zero-width chars, bidi overrides, tag chars
|
|
125
125
|
invisible_chars_score?: Long, // Unicode attack severity (0-100)
|
|
126
126
|
encoded_content_detected?: Bool, // Base64, hex, unicode, URL encoded content
|
|
127
127
|
encoded_types?: Set<String>, // Encoding types detected
|
|
@@ -181,7 +181,7 @@ action receive_response appliesTo {
|
|
|
181
181
|
max_threat_severity: Long,
|
|
182
182
|
|
|
183
183
|
// --- Secrets Detection ---
|
|
184
|
-
|
|
184
|
+
secrets_detected: Bool,
|
|
185
185
|
secret_types?: Set<String>,
|
|
186
186
|
secret_count?: Long,
|
|
187
187
|
|
|
@@ -189,7 +189,7 @@ action receive_response appliesTo {
|
|
|
189
189
|
pii_detected?: Bool,
|
|
190
190
|
pii_types?: Set<String>,
|
|
191
191
|
pii_count?: Long,
|
|
192
|
-
|
|
192
|
+
pii_score?: Long,
|
|
193
193
|
|
|
194
194
|
// --- Content Safety Scores (0-100) ---
|
|
195
195
|
violence_score: Long,
|
|
@@ -252,7 +252,7 @@ action paste_content appliesTo {
|
|
|
252
252
|
max_threat_severity: Long,
|
|
253
253
|
|
|
254
254
|
// --- Secrets Detection ---
|
|
255
|
-
|
|
255
|
+
secrets_detected: Bool,
|
|
256
256
|
secret_types?: Set<String>,
|
|
257
257
|
secret_count?: Long,
|
|
258
258
|
|
|
@@ -260,7 +260,7 @@ action paste_content appliesTo {
|
|
|
260
260
|
pii_detected?: Bool,
|
|
261
261
|
pii_types?: Set<String>,
|
|
262
262
|
pii_count?: Long,
|
|
263
|
-
|
|
263
|
+
pii_score?: Long,
|
|
264
264
|
|
|
265
265
|
// --- Content Safety Scores (0-100) ---
|
|
266
266
|
violence_score: Long,
|
|
@@ -280,7 +280,7 @@ action paste_content appliesTo {
|
|
|
280
280
|
code_ratio?: Long,
|
|
281
281
|
|
|
282
282
|
// --- Encoding Attacks ---
|
|
283
|
-
|
|
283
|
+
invisible_chars_detected?: Bool,
|
|
284
284
|
invisible_chars_score?: Long,
|
|
285
285
|
encoded_content_detected?: Bool,
|
|
286
286
|
encoded_types?: Set<String>,
|
|
@@ -337,7 +337,7 @@ action upload_file appliesTo {
|
|
|
337
337
|
max_threat_severity: Long,
|
|
338
338
|
|
|
339
339
|
// --- Secrets Detection ---
|
|
340
|
-
|
|
340
|
+
secrets_detected: Bool,
|
|
341
341
|
secret_types?: Set<String>,
|
|
342
342
|
secret_count?: Long,
|
|
343
343
|
|
|
@@ -345,7 +345,7 @@ action upload_file appliesTo {
|
|
|
345
345
|
pii_detected?: Bool,
|
|
346
346
|
pii_types?: Set<String>,
|
|
347
347
|
pii_count?: Long,
|
|
348
|
-
|
|
348
|
+
pii_score?: Long,
|
|
349
349
|
|
|
350
350
|
// --- Content Safety Scores (0-100) ---
|
|
351
351
|
violence_score: Long,
|
|
@@ -368,7 +368,7 @@ action upload_file appliesTo {
|
|
|
368
368
|
phishing_detected?: Bool,
|
|
369
369
|
|
|
370
370
|
// --- Encoding Attacks ---
|
|
371
|
-
|
|
371
|
+
invisible_chars_detected?: Bool,
|
|
372
372
|
invisible_chars_score?: Long,
|
|
373
373
|
encoded_content_detected?: Bool,
|
|
374
374
|
encoded_types?: Set<String>,
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// Baseline Permit
|
|
2
|
+
// Baseline Permit (Default)
|
|
3
3
|
// =============================================================================
|
|
4
|
-
// Permits all actions by default. Threat-specific forbid policies
|
|
5
|
-
// this
|
|
4
|
+
// Permits all Sentry actions by default. Threat-specific forbid policies
|
|
5
|
+
// override this when detectors fire.
|
|
6
6
|
//
|
|
7
|
-
//
|
|
8
|
-
// is denied regardless of forbid rules. This baseline ensures the system
|
|
9
|
-
// is "allow unless blocked" rather than "block everything".
|
|
10
|
-
//
|
|
11
|
-
// Category: organization
|
|
7
|
+
// Category: organization
|
|
12
8
|
// Namespace: Sentry
|
|
13
9
|
// =============================================================================
|
|
14
10
|
|
|
15
|
-
@id("
|
|
16
|
-
@name("Permit
|
|
17
|
-
@description("
|
|
11
|
+
@id("organization.permit-baseline")
|
|
12
|
+
@name("Permit baseline")
|
|
13
|
+
@description("Permits all Sentry actions.")
|
|
18
14
|
@severity("low")
|
|
19
|
-
@tags("
|
|
15
|
+
@tags("category:organization,posture:permit-default")
|
|
20
16
|
permit (
|
|
21
17
|
principal,
|
|
22
18
|
action,
|
|
@@ -1,98 +1,99 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
2
|
// Clipboard Policy (Default)
|
|
3
3
|
// =============================================================================
|
|
4
|
-
// Controls
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// - Paste-with-PII blocking
|
|
8
|
-
// - Paste-with-source-code blocking
|
|
9
|
-
// - Large-paste threat blocking
|
|
10
|
-
// - Paste-with-encoded-payload blocking
|
|
11
|
-
// - Paste-with-invisible-character blocking
|
|
4
|
+
// Controls paste operations into AI chat services. Covers blanket paste
|
|
5
|
+
// blocking, paste-with-secrets, paste-with-PII, encoded payload pastes, and
|
|
6
|
+
// pastes containing invisible Unicode characters.
|
|
12
7
|
//
|
|
13
|
-
// All
|
|
14
|
-
//
|
|
15
|
-
//
|
|
8
|
+
// All rules scope to action == "paste_content". Other templates
|
|
9
|
+
// (semantic, content_safety, pii, secrets) cover process_prompt and
|
|
10
|
+
// upload_file for the same threat categories.
|
|
16
11
|
//
|
|
17
|
-
//
|
|
12
|
+
// Context keys consumed:
|
|
13
|
+
// - secrets_detected: Bool
|
|
14
|
+
// - pii_detected: Bool
|
|
15
|
+
// - encoded_content_detected: Bool
|
|
16
|
+
// - encoded_score: Long (0-100)
|
|
17
|
+
// - invisible_chars_detected: Bool
|
|
18
|
+
// - invisible_chars_score: Long (0-100)
|
|
19
|
+
//
|
|
20
|
+
// Compliance:
|
|
21
|
+
// - NIST 800-53 SC-28; GDPR Art. 32
|
|
22
|
+
//
|
|
23
|
+
// Category: clipboard
|
|
18
24
|
// Namespace: Sentry
|
|
19
25
|
// =============================================================================
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
@id("sentry-org-block-all-paste")
|
|
27
|
+
@id("clipboard.block-all-paste")
|
|
23
28
|
@name("Block all paste operations")
|
|
24
|
-
@description("
|
|
29
|
+
@description("Blocks paste_content unconditionally.")
|
|
25
30
|
@severity("high")
|
|
26
|
-
@tags("
|
|
27
|
-
@reject_message("Paste blocked: your organization does not allow pasting content into AI services.
|
|
31
|
+
@tags("category:clipboard,detection:rule,posture:deny-default,scope:org-wide")
|
|
32
|
+
@reject_message("Paste blocked: your organization does not allow pasting content into AI services.")
|
|
28
33
|
forbid (
|
|
29
34
|
principal,
|
|
30
35
|
action == Sentry::Action::"paste_content",
|
|
31
36
|
resource
|
|
32
37
|
);
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
@id("sentry-org-block-secrets-paste")
|
|
39
|
+
@id("clipboard.block-paste-secrets")
|
|
36
40
|
@name("Block paste with secrets")
|
|
37
|
-
@description("
|
|
41
|
+
@description("Blocks paste_content when secrets_detected is true.")
|
|
38
42
|
@severity("critical")
|
|
39
|
-
@tags("secrets,
|
|
40
|
-
@reject_message("Paste blocked: secrets or credentials detected in pasted content
|
|
43
|
+
@tags("category:clipboard,threat:secrets,detection:rule,owasp:llm06")
|
|
44
|
+
@reject_message("Paste blocked: secrets or credentials detected in pasted content — remove before pasting.")
|
|
41
45
|
forbid (
|
|
42
46
|
principal,
|
|
43
47
|
action == Sentry::Action::"paste_content",
|
|
44
48
|
resource
|
|
45
49
|
)
|
|
46
50
|
when {
|
|
47
|
-
context has
|
|
51
|
+
context has secrets_detected && context.secrets_detected == true
|
|
48
52
|
};
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
@id("sentry-pii-block-paste")
|
|
54
|
+
@id("clipboard.block-paste-pii")
|
|
52
55
|
@name("Block paste with PII")
|
|
53
|
-
@description("
|
|
56
|
+
@description("Blocks paste_content when pii_detected is true.")
|
|
54
57
|
@severity("critical")
|
|
55
|
-
@tags("pii,
|
|
56
|
-
@reject_message("Paste blocked: personally identifiable information detected in pasted content.
|
|
58
|
+
@tags("category:clipboard,threat:pii,detection:rule,compliance:gdpr")
|
|
59
|
+
@reject_message("Paste blocked: personally identifiable information detected in pasted content.")
|
|
57
60
|
forbid (
|
|
58
61
|
principal,
|
|
59
62
|
action == Sentry::Action::"paste_content",
|
|
60
63
|
resource
|
|
61
64
|
)
|
|
62
65
|
when {
|
|
63
|
-
context has pii_detected && context.pii_detected
|
|
66
|
+
context has pii_detected && context.pii_detected == true
|
|
64
67
|
};
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
@
|
|
68
|
-
@
|
|
69
|
-
@description("Block paste operations when encoded injection payloads (base64, hex, unicode) are detected. Attackers use encoding to smuggle injection payloads via clipboard transfer.")
|
|
69
|
+
@id("clipboard.block-paste-encoded")
|
|
70
|
+
@name("Block paste with encoded payloads")
|
|
71
|
+
@description("Blocks paste_content when encoded_content_detected is true and encoded_score >= 60.")
|
|
70
72
|
@severity("high")
|
|
71
|
-
@tags("
|
|
72
|
-
@reject_message("Paste blocked: encoded
|
|
73
|
+
@tags("category:clipboard,threat:encoded-payload,threat:injection,detection:pattern,owasp:llm01")
|
|
74
|
+
@reject_message("Paste blocked: encoded payloads (base64, hex, unicode) detected — possible injection evasion.")
|
|
73
75
|
forbid (
|
|
74
76
|
principal,
|
|
75
77
|
action == Sentry::Action::"paste_content",
|
|
76
78
|
resource
|
|
77
79
|
)
|
|
78
80
|
when {
|
|
79
|
-
context has encoded_content_detected && context.encoded_content_detected &&
|
|
81
|
+
context has encoded_content_detected && context.encoded_content_detected == true &&
|
|
80
82
|
context has encoded_score && context.encoded_score >= 60
|
|
81
83
|
};
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
@id("sentry-clipboard-block-paste-invisible")
|
|
85
|
+
@id("clipboard.block-paste-invisible")
|
|
85
86
|
@name("Block paste with invisible characters")
|
|
86
|
-
@description("
|
|
87
|
+
@description("Blocks paste_content when invisible_chars_detected is true and invisible_chars_score >= 50.")
|
|
87
88
|
@severity("high")
|
|
88
|
-
@tags("
|
|
89
|
-
@reject_message("Paste blocked: invisible Unicode characters detected
|
|
89
|
+
@tags("category:clipboard,threat:invisible-chars,threat:injection,detection:pattern,owasp:llm01")
|
|
90
|
+
@reject_message("Paste blocked: invisible Unicode characters detected — hidden characters can disguise malicious instructions.")
|
|
90
91
|
forbid (
|
|
91
92
|
principal,
|
|
92
93
|
action == Sentry::Action::"paste_content",
|
|
93
94
|
resource
|
|
94
95
|
)
|
|
95
96
|
when {
|
|
96
|
-
context has
|
|
97
|
+
context has invisible_chars_detected && context.invisible_chars_detected == true &&
|
|
97
98
|
context has invisible_chars_score && context.invisible_chars_score >= 50
|
|
98
99
|
};
|