@highflame/policy 2.1.36 → 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.
Files changed (79) hide show
  1. package/_schemas/ai_gateway/context.json +431 -11
  2. package/_schemas/ai_gateway/schema.cedarschema +91 -11
  3. package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +66 -43
  4. package/_schemas/ai_gateway/templates/defaults/baseline.cedar +9 -11
  5. package/_schemas/ai_gateway/templates/defaults/semantic.cedar +63 -40
  6. package/_schemas/ai_gateway/templates/defaults/tools.cedar +48 -36
  7. package/_schemas/ai_gateway/templates/llm_default_allow.cedar +9 -10
  8. package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +22 -14
  9. package/_schemas/ai_gateway/templates/mcp_tool_permissions.cedar +29 -27
  10. package/_schemas/ai_gateway/templates/pii_redaction.cedar +38 -33
  11. package/_schemas/ai_gateway/templates/templates.json +42 -47
  12. package/_schemas/guardrails/context.json +12 -12
  13. package/_schemas/guardrails/schema.cedarschema +12 -12
  14. package/_schemas/guardrails/templates/defaults/agent_identity.cedar +60 -56
  15. package/_schemas/guardrails/templates/defaults/agentic_safety.cedar +83 -58
  16. package/_schemas/guardrails/templates/defaults/baseline.cedar +9 -12
  17. package/_schemas/guardrails/templates/defaults/injection.cedar +48 -36
  18. package/_schemas/guardrails/templates/defaults/pii.cedar +27 -20
  19. package/_schemas/guardrails/templates/defaults/secrets.cedar +39 -22
  20. package/_schemas/guardrails/templates/defaults/security_patterns.cedar +38 -25
  21. package/_schemas/guardrails/templates/defaults/semantic.cedar +47 -31
  22. package/_schemas/guardrails/templates/defaults/tool_risk.cedar +34 -26
  23. package/_schemas/guardrails/templates/defaults/toxicity.cedar +57 -47
  24. package/_schemas/guardrails/templates/mcp_tool_permissions.cedar +60 -43
  25. package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +29 -42
  26. package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +43 -57
  27. package/_schemas/guardrails/templates/profiles/a2a_security/identity_enforcement.cedar +40 -57
  28. package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +48 -62
  29. package/_schemas/guardrails/templates/profiles/a2a_security/supply_chain.cedar +40 -56
  30. package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +24 -34
  31. package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +45 -37
  32. package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +11 -16
  33. package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +22 -9
  34. package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +27 -15
  35. package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +37 -22
  36. package/_schemas/guardrails/templates/profiles/code_agent/agentic_security.cedar +68 -47
  37. package/_schemas/guardrails/templates/profiles/code_agent/encoding.cedar +17 -21
  38. package/_schemas/guardrails/templates/profiles/code_agent/path_security.cedar +74 -73
  39. package/_schemas/guardrails/templates/profiles/code_agent/security.cedar +13 -9
  40. package/_schemas/guardrails/templates/profiles/code_agent/supply_chain.cedar +36 -58
  41. package/_schemas/guardrails/templates/profiles/data_pipeline/agentic_security.cedar +22 -15
  42. package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +52 -0
  43. package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +41 -18
  44. package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +18 -36
  45. package/_schemas/guardrails/templates/profiles/multi_agent/agent_safety.cedar +86 -79
  46. package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +73 -70
  47. package/_schemas/guardrails/templates/templates.json +188 -210
  48. package/_schemas/overwatch/context.json +14 -14
  49. package/_schemas/overwatch/schema.cedarschema +12 -12
  50. package/_schemas/sentry/context.json +11 -11
  51. package/_schemas/sentry/schema.cedarschema +11 -11
  52. package/_schemas/sentry/templates/defaults/baseline.cedar +8 -12
  53. package/_schemas/sentry/templates/defaults/clipboard.cedar +43 -42
  54. package/_schemas/sentry/templates/defaults/content_safety.cedar +38 -68
  55. package/_schemas/sentry/templates/defaults/file_safety.cedar +18 -26
  56. package/_schemas/sentry/templates/defaults/organization.cedar +10 -17
  57. package/_schemas/sentry/templates/defaults/pii.cedar +52 -73
  58. package/_schemas/sentry/templates/defaults/secrets.cedar +65 -58
  59. package/_schemas/sentry/templates/defaults/semantic.cedar +40 -59
  60. package/_schemas/sentry/templates/templates.json +46 -46
  61. package/dist/ai_gateway-context.gen.d.ts +18 -4
  62. package/dist/ai_gateway-context.gen.js +18 -4
  63. package/dist/ai_gateway-defaults.gen.d.ts +1 -1
  64. package/dist/ai_gateway-defaults.gen.js +377 -313
  65. package/dist/guardrails-context.gen.d.ts +5 -5
  66. package/dist/guardrails-context.gen.js +5 -5
  67. package/dist/guardrails-defaults.gen.d.ts +1 -1
  68. package/dist/guardrails-defaults.gen.js +2070 -1849
  69. package/dist/overwatch-context.gen.d.ts +5 -5
  70. package/dist/overwatch-context.gen.js +5 -5
  71. package/dist/overwatch-defaults.gen.d.ts +1 -1
  72. package/dist/overwatch-defaults.gen.js +547 -573
  73. package/dist/sentry-context.gen.d.ts +3 -3
  74. package/dist/sentry-context.gen.js +3 -3
  75. package/dist/sentry-defaults.gen.d.ts +1 -1
  76. package/dist/sentry-defaults.gen.js +379 -460
  77. package/dist/service-schemas.gen.d.ts +4 -4
  78. package/dist/service-schemas.gen.js +249 -99
  79. package/package.json +1 -1
@@ -7,109 +7,92 @@
7
7
  // =============================================================================
8
8
  // EMBEDDED CEDAR POLICY TEXT
9
9
  // =============================================================================
10
- const OVERWATCH_BASELINE_DEFAULT_CEDAR = `// =============================================================================
11
- // Baseline Permit Policy (Default)
10
+ const OVERWATCH_ORGANIZATION_PERMIT_BASELINE_CEDAR = `// =============================================================================
11
+ // Baseline Permit (Default)
12
12
  // =============================================================================
13
- // Permits all actions by default. Threat-specific forbid policies override
14
- // this to block when detection engines identify issues.
13
+ // Permits all Overwatch actions by default. Threat-specific forbid policies
14
+ // override this when detectors fire. Cedar is default-deny: without at least
15
+ // one permit rule, every request is denied regardless of forbid rules.
15
16
  //
16
- // Cedar is default-deny: without at least one permit rule, every request
17
- // is denied regardless of forbid rules. This baseline ensures the system
18
- // is "allow unless blocked" rather than "block everything".
19
- //
20
- // Category: organization
17
+ // Category: organization
21
18
  // Namespace: Overwatch
22
19
  // =============================================================================
23
20
 
24
- @id("baseline-permit-all")
25
- @name("Permit all actions by default")
26
- @description("Baseline permit for all actions — threat-specific forbid policies override this when threats are detected")
21
+ @id("organization.permit-baseline")
22
+ @name("Permit baseline")
23
+ @description("Permits all Overwatch actions.")
27
24
  @severity("low")
28
- @tags("baseline,permit-default,organization")
25
+ @tags("category:organization,posture:permit-default")
29
26
  permit (
30
27
  principal,
31
28
  action,
32
29
  resource
33
30
  );
34
31
  `;
35
- const OVERWATCH_SECRETS_DEFAULT_CEDAR = `// =============================================================================
36
- // Secrets Detection Policy (Default)
32
+ const OVERWATCH_DATA_PROTECTION_DEFAULTS_CEDAR = `// =============================================================================
33
+ // Secrets Detection (Default)
37
34
  // =============================================================================
38
- // Detects and blocks credential leakage across prompts, tool calls, and file
39
- // operations using Shield's secrets detector context keys and file path patterns.
40
- //
41
- // Detection:
42
- // Shield's secrets detector (Tier Fast) populates:
43
- // contains_secrets (bool) — true if any secret found
44
- // secret_types (Set<String>) — types found: "aws_access_key", "ssh_key",
45
- // "pem_certificate", "environment_variable", "github_token", etc.
46
- // secret_count (long) — total secret matches
35
+ // Blocks credential leakage across prompts, tool calls, and file operations
36
+ // using Shield's secrets detector outputs and file path patterns.
47
37
  //
48
- // Policies reference secret_types directly for per-category granularity.
49
- // This works with both built-in and user-configured secret types.
38
+ // Context keys consumed:
39
+ // - secrets_detected: Bool
40
+ // - secret_types: Set<String>
41
+ // - secret_count: Long
42
+ // - path: String
50
43
  //
51
44
  // Compliance:
52
- // NIST 800-53 SC-28 (Protection of Information at Rest)
53
- // NIST 800-53 IA-5 (Authenticator Management)
54
- // OWASP LLM07 (Insecure Plugin Design) — secrets in tool args
55
- // MITRE ATT&CK T1552 (Unsecured Credentials)
56
- // CIS Benchmark 1.4 (Secrets Management)
45
+ // - NIST 800-53 SC-28, IA-5
46
+ // - OWASP LLM07; MITRE ATT&CK T1552; CIS 1.4
57
47
  //
58
- // Category: secrets
48
+ // Category: data-protection
59
49
  // Namespace: Overwatch
60
50
  // =============================================================================
61
51
 
62
52
  // ---------------------------------------------------------------------------
63
- // Section 1: General Secret Leakage
64
- // Detects AWS access keys, GitHub tokens, private key headers, API key
65
- // assignments, and bearer tokens in content.
53
+ // Section 1: Detected secrets in prompts and tool calls
66
54
  // ---------------------------------------------------------------------------
67
55
 
68
- // Block prompts containing any detected secrets
69
- @id("secrets-block-leakage-prompt")
56
+ @id("data-protection.block-secrets-prompt")
70
57
  @name("Block secrets in prompts")
71
- @description("Block prompts when secrets are detected — AWS access keys (AKIA...), GitHub tokens (ghp_...), private key headers, bearer tokens, or API key assignments.")
58
+ @description("Blocks process_prompt when secrets_detected is true.")
72
59
  @severity("high")
73
- @tags("secrets,credentials,process-prompt,nist-sc-28,nist-ia-5")
74
- @reject_message("Prompt blocked: exposed secrets detected (AWS keys, tokens, private keys, or API key assignments). Remove sensitive credentials before submitting.")
60
+ @tags("category:data-protection,threat:secrets,detection:rule,surface:process-prompt,owasp:llm06")
61
+ @reject_message("Prompt blocked: exposed secrets detected (AWS keys, tokens, private keys, or API key assignments).")
75
62
  forbid (
76
63
  principal,
77
64
  action == Overwatch::Action::"process_prompt",
78
65
  resource
79
66
  )
80
67
  when {
81
- context.contains_secrets == true
68
+ context has secrets_detected && context.secrets_detected == true
82
69
  };
83
70
 
84
- // Block tool calls containing detected secrets
85
- @id("secrets-block-leakage-tool")
71
+ @id("data-protection.block-secrets-tool")
86
72
  @name("Block secrets in tool calls")
87
- @description("Block tool execution when secrets are detected in tool arguments or command content.")
73
+ @description("Blocks call_tool when secrets_detected is true.")
88
74
  @severity("high")
89
- @tags("secrets,credentials,call-tool,nist-sc-28,mitre-t1552")
90
- @reject_message("Tool execution blocked: exposed secrets detected in command or arguments. Remove sensitive credentials before executing.")
75
+ @tags("category:data-protection,threat:secrets,detection:rule,surface:call-tool,owasp:llm06")
76
+ @reject_message("Tool execution blocked: exposed secrets detected in command or arguments.")
91
77
  forbid (
92
78
  principal,
93
79
  action == Overwatch::Action::"call_tool",
94
80
  resource
95
81
  )
96
82
  when {
97
- context has contains_secrets && context.contains_secrets == true
83
+ context has secrets_detected && context.secrets_detected == true
98
84
  };
99
85
 
100
86
  // ---------------------------------------------------------------------------
101
- // Section 2: SSH Key Exposure
102
- // Detects SSH private key content (BEGIN OPENSSH/RSA PRIVATE KEY) and
103
- // SSH key file paths (/.ssh/id_rsa, id_ed25519).
87
+ // Section 2: SSH key exposure
104
88
  // ---------------------------------------------------------------------------
105
89
 
106
- // Block SSH key exposure across tool calls and file operations
107
- @id("secrets-block-ssh-keys")
90
+ @id("data-protection.block-ssh-keys")
108
91
  @name("Block SSH key exposure")
109
- @description("Block when SSH private key content or SSH key file paths are detected. Covers tool calls, file reads, and file writes. AI agents must not access SSH credentials.")
92
+ @description("Blocks call_tool, read_file, and write_file when secret_types contains \\"ssh_key\\".")
110
93
  @severity("critical")
111
- @tags("secrets,ssh,credentials,nist-ia-5,mitre-t1552")
112
- @reject_message("Blocked: SSH private key content or key file path detected. AI agents must not access SSH credentials.")
94
+ @tags("category:data-protection,threat:secrets,detection:rule,compliance:nist-si-3")
95
+ @reject_message("Request blocked: SSH private key content or key file path detected AI agents must not access SSH credentials.")
113
96
  forbid (
114
97
  principal,
115
98
  action in [Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -120,18 +103,15 @@ when {
120
103
  };
121
104
 
122
105
  // ---------------------------------------------------------------------------
123
- // Section 3: PEM / Certificate Key Exposure
124
- // Detects PEM private key content (BEGIN ENCRYPTED/RSA/EC/DSA PRIVATE KEY)
125
- // and key file paths (.pem, .key, .p12, .pfx).
106
+ // Section 3: PEM / certificate key exposure
126
107
  // ---------------------------------------------------------------------------
127
108
 
128
- // Block PEM/certificate key exposure
129
- @id("secrets-block-pem-keys")
130
- @name("Block PEM/certificate key exposure")
131
- @description("Block when PEM private key content or certificate key file paths (.pem, .key, .p12, .pfx) are detected. AI agents must not access certificate credentials.")
109
+ @id("data-protection.block-pem-keys")
110
+ @name("Block PEM and certificate keys")
111
+ @description("Blocks call_tool, read_file, and write_file when secret_types contains \\"pem_certificate\\".")
132
112
  @severity("critical")
133
- @tags("secrets,certificates,pem,nist-ia-5,mitre-t1552")
134
- @reject_message("Blocked: PEM private key or certificate key file detected. AI agents must not access certificate credentials.")
113
+ @tags("category:data-protection,threat:secrets,detection:rule,compliance:nist-si-3")
114
+ @reject_message("Request blocked: PEM private key or certificate key file detected AI agents must not access certificate credentials.")
135
115
  forbid (
136
116
  principal,
137
117
  action in [Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -142,18 +122,15 @@ when {
142
122
  };
143
123
 
144
124
  // ---------------------------------------------------------------------------
145
- // Section 4: Environment Variable Leakage
146
- // Detects OPENAI_API_KEY=sk-..., HF_TOKEN=hf_..., and generic
147
- // <NAME>_API_KEY=<value> (16+ chars) patterns.
125
+ // Section 4: Environment variable leakage
148
126
  // ---------------------------------------------------------------------------
149
127
 
150
- // Block environment variable secret exposure
151
- @id("secrets-block-env-vars")
152
- @name("Block environment variable leakage")
153
- @description("Block when environment variable secret assignments are detected — OPENAI_API_KEY, HF_TOKEN, or generic <NAME>_API_KEY=<value> patterns with 16+ character values.")
128
+ @id("data-protection.block-env-vars")
129
+ @name("Block environment variable secrets")
130
+ @description("Blocks process_prompt and call_tool when secret_types contains \\"environment_variable\\".")
154
131
  @severity("high")
155
- @tags("secrets,environment,nist-ia-5")
156
- @reject_message("Blocked: environment variable secret detected (API keys, tokens). Remove sensitive values before proceeding.")
132
+ @tags("category:data-protection,threat:secrets,detection:rule,compliance:nist-si-3")
133
+ @reject_message("Request blocked: environment variable secret assignment detected (API key, token).")
157
134
  forbid (
158
135
  principal,
159
136
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -164,20 +141,15 @@ when {
164
141
  };
165
142
 
166
143
  // ---------------------------------------------------------------------------
167
- // Section 5: Sensitive File Path Protection
168
- // Blocks file read/write access to credential directories and .env files.
169
- // NOTE: Targets read_file/write_file only — NOT call_tool. The path field
170
- // is empty for Bash commands (extractor reads tool_input.file_path which is
171
- // undefined for Bash). SSH key access via Bash is caught by rules above.
144
+ // Section 5: Credential directories and key material paths
172
145
  // ---------------------------------------------------------------------------
173
146
 
174
- // Block access to credential directories
175
- @id("secrets-block-credential-paths")
147
+ @id("data-protection.block-credential-paths")
176
148
  @name("Block credential directory access")
177
- @description("Block file read/write to SSH keys, cloud credentials, GPG keys, and certificate files. Only applies to Read/Write/Edit tools (path is not populated for Bash commands).")
149
+ @description("Blocks read_file and write_file when path matches an SSH, cloud-provider, GPG, or key-material directory.")
178
150
  @severity("critical")
179
- @tags("secrets,credentials,path,file-access,nist-sc-28,mitre-t1552")
180
- @reject_message("Blocked: access to credential directory or key file. AI agents must not access .ssh, .aws, .gnupg, .gcloud, or .azure directories.")
151
+ @tags("category:data-protection,threat:secrets,detection:pattern,compliance:nist-si-3")
152
+ @reject_message("File access blocked: SSH, cloud-provider, or GPG key material targeted.")
181
153
  forbid (
182
154
  principal,
183
155
  action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -185,23 +157,24 @@ forbid (
185
157
  )
186
158
  when {
187
159
  context has path &&
188
- (context.path like "*/.ssh/*" ||
189
- context.path like "*/.aws/*" ||
190
- context.path like "*/.gnupg/*" ||
191
- context.path like "*/.config/gcloud/*" ||
192
- context.path like "*/.azure/*" ||
193
- context.path like "*/id_rsa*" ||
194
- context.path like "*/id_ed25519*" ||
195
- context.path like "*/id_ecdsa*")
160
+ (
161
+ context.path like "*/.ssh/*" ||
162
+ context.path like "*/.aws/*" ||
163
+ context.path like "*/.gnupg/*" ||
164
+ context.path like "*/.config/gcloud/*" ||
165
+ context.path like "*/.azure/*" ||
166
+ context.path like "*/id_rsa*" ||
167
+ context.path like "*/id_ed25519*" ||
168
+ context.path like "*/id_ecdsa*"
169
+ )
196
170
  };
197
171
 
198
- // Block .env file access
199
- @id("secrets-block-env-file-paths")
200
- @name("Block .env file access")
201
- @description("Block file read/write to .env files which typically contain secrets, API keys, and database credentials.")
172
+ @id("data-protection.block-env-file-paths")
173
+ @name("Block dotenv file access")
174
+ @description("Blocks read_file and write_file when path matches *.env*.")
202
175
  @severity("high")
203
- @tags("secrets,environment,path,file-access,nist-sc-28,cis-1.4")
204
- @reject_message("Blocked: .env file access. These files typically contain secrets and should not be accessed by AI agents.")
176
+ @tags("category:data-protection,threat:secrets,detection:pattern,compliance:nist-si-3")
177
+ @reject_message("File access blocked: .env file targeted these files typically contain secrets and database credentials.")
205
178
  forbid (
206
179
  principal,
207
180
  action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -211,51 +184,44 @@ when {
211
184
  context has path && context.path like "*.env*"
212
185
  };
213
186
  `;
214
- const OVERWATCH_SEMANTIC_DEFAULT_CEDAR = `// =============================================================================
215
- // Semantic Threat Detection Policy (Default)
187
+ const OVERWATCH_SEMANTIC_DEFAULTS_CEDAR = `// =============================================================================
188
+ // Semantic Threat Detection (Default)
216
189
  // =============================================================================
217
- // Detects and blocks injection attacks, prompt injection, jailbreak attempts,
218
- // and unsafe content using multi-layered detection:
190
+ // Blocks injection attacks (command, SQL, path traversal), prompt injection,
191
+ // jailbreak attempts, and encoded payloads using two detection tiers:
219
192
  //
220
- // Tier 1 — Pattern-based detection (always available, no external dependency):
193
+ // Tier 1 — Pattern-based (always available, no external dependency)
221
194
  // command_injection, sql_injection, path_traversal, detect_encoded
222
195
  //
223
- // Tier 2 — Injection and jailbreak classifiers (require Highflame API token):
224
- // injection_confidence, jailbreak_confidence
196
+ // Tier 2 — ML classifiers (require Highflame API token)
197
+ // injection_score, jailbreak_score
225
198
  //
226
- // Tier 3 — Content safety scores (require Highflame API token):
227
- // violence, weapons, hate_speech, crime, sexual, profanity
199
+ // Content-safety rules (violence, hate, sexual, etc.) live in content_safety.cedar.
228
200
  //
201
+ // Context keys consumed:
202
+ // - detected_threats: Set<String>
203
+ // - injection_score: Long (0-100)
204
+ // - jailbreak_score: Long (0-100)
229
205
  //
230
206
  // Compliance:
231
- // OWASP LLM01 (Prompt Injection) direct + indirect
232
- // OWASP LLM02 (Insecure Output Handling) response manipulation
233
- // OWASP ASI01 (Agent Goal Hijack) — behavioral manipulation
234
- // MITRE ATLAS AML.T0051 (LLM Prompt Injection)
235
- // MITRE ATLAS AML.T0054 (LLM Jailbreak)
236
- // NIST 800-53 SI-3 (Malicious Code Protection)
237
- // NIST 800-53 SI-4 (Information System Monitoring)
238
- // EU AI Act Art. 52 (Transparency for AI Systems)
239
- // ISO 42001 (AI Management System)
207
+ // - OWASP LLM01, LLM02; OWASP ASI01, ASI02
208
+ // - MITRE ATLAS AML.T0051, AML.T0054; MITRE ATT&CK T1059, T1005
209
+ // - NIST 800-53 SI-3, SI-4
240
210
  //
241
- // Category: semantic
211
+ // Category: semantic
242
212
  // Namespace: Overwatch
243
213
  // =============================================================================
244
214
 
245
-
246
215
  // ---------------------------------------------------------------------------
247
- // Tier 1: Pattern-Based Injection Detection (always available)
248
- // These fire on detected threat names from the detection engine.
249
- // No external API dependency — works offline with local scanning.
216
+ // Tier 1: Pattern-based injection detection
250
217
  // ---------------------------------------------------------------------------
251
218
 
252
- // Block command injection in tool calls
253
- @id("semantic-block-command-injection-tool")
219
+ @id("semantic.block-command-injection-tool")
254
220
  @name("Block command injection in tool calls")
255
- @description("Block tool execution when command injection is detected — reverse shells, rm -rf, privilege escalation, code execution, pipe-to-shell, or encoding evasion. Ref: AIShellJack (41-84% success rate).")
221
+ @description("Blocks call_tool when detected_threats contains \\"command_injection\\".")
256
222
  @severity("critical")
257
- @tags("command-injection,call-tool,mitre-t1059,owasp-asi02")
258
- @reject_message("Tool execution blocked: command injection pattern detected — reverse shell, destructive command, privilege escalation, or code execution attempt.")
223
+ @tags("category:semantic,threat:command-injection,detection:pattern,surface:call-tool,mitre:t1059,owasp:asi02")
224
+ @reject_message("Tool execution blocked: command injection pattern detected — reverse shell, destructive command, or privilege escalation.")
259
225
  forbid (
260
226
  principal,
261
227
  action == Overwatch::Action::"call_tool",
@@ -265,29 +231,27 @@ when {
265
231
  context has detected_threats && context.detected_threats.contains("command_injection")
266
232
  };
267
233
 
268
- // Block command injection in prompts
269
- @id("semantic-block-command-injection-prompt")
234
+ @id("semantic.block-command-injection-prompt")
270
235
  @name("Block command injection in prompts")
271
- @description("Block prompts when command injection patterns are detected. Catches prompt-level injection where the user or injected content includes shell commands.")
236
+ @description("Blocks process_prompt when detected_threats contains \\"command_injection\\".")
272
237
  @severity("critical")
273
- @tags("command-injection,process-prompt,mitre-t1059")
274
- @reject_message("Prompt blocked: command injection pattern detected. The prompt contains shell commands, reverse shells, or code execution patterns.")
238
+ @tags("category:semantic,threat:command-injection,detection:pattern,surface:process-prompt,mitre:t1059")
239
+ @reject_message("Prompt blocked: command injection pattern detected.")
275
240
  forbid (
276
241
  principal,
277
242
  action == Overwatch::Action::"process_prompt",
278
243
  resource
279
244
  )
280
245
  when {
281
- context.detected_threats.contains("command_injection")
246
+ context has detected_threats && context.detected_threats.contains("command_injection")
282
247
  };
283
248
 
284
- // Block SQL injection in tool calls
285
- @id("semantic-block-sql-injection-tool")
249
+ @id("semantic.block-sql-injection-tool")
286
250
  @name("Block SQL injection in tool calls")
287
- @description("Block tool execution when SQL injection is detected — tautologies (OR 1=1), UNION SELECT, DROP TABLE, time-based attacks (SLEEP, WAITFOR), or system object access (information_schema).")
251
+ @description("Blocks call_tool when detected_threats contains \\"sql_injection\\".")
288
252
  @severity("high")
289
- @tags("sql-injection,call-tool,database")
290
- @reject_message("Tool execution blocked: SQL injection pattern detected — tautology, UNION attack, destructive SQL, or system object access.")
253
+ @tags("category:semantic,threat:sql-injection,detection:pattern,surface:call-tool")
254
+ @reject_message("Tool execution blocked: SQL injection pattern detected — tautology, UNION attack, or destructive query.")
291
255
  forbid (
292
256
  principal,
293
257
  action == Overwatch::Action::"call_tool",
@@ -297,12 +261,11 @@ when {
297
261
  context has detected_threats && context.detected_threats.contains("sql_injection")
298
262
  };
299
263
 
300
- // Block SQL injection in prompts
301
- @id("semantic-block-sql-injection-prompt")
264
+ @id("semantic.block-sql-injection-prompt")
302
265
  @name("Block SQL injection in prompts")
303
- @description("Block prompts when SQL injection patterns are detected.")
266
+ @description("Blocks process_prompt when detected_threats contains \\"sql_injection\\".")
304
267
  @severity("high")
305
- @tags("sql-injection,process-prompt,database")
268
+ @tags("category:semantic,threat:sql-injection,detection:pattern,surface:process-prompt")
306
269
  @reject_message("Prompt blocked: SQL injection pattern detected.")
307
270
  forbid (
308
271
  principal,
@@ -310,16 +273,15 @@ forbid (
310
273
  resource
311
274
  )
312
275
  when {
313
- context.detected_threats.contains("sql_injection")
276
+ context has detected_threats && context.detected_threats.contains("sql_injection")
314
277
  };
315
278
 
316
- // Block path traversal attacks
317
- @id("semantic-block-path-traversal")
318
- @name("Block path traversal attacks")
319
- @description("Block when path traversal is detected — 2+ levels of ../ combined with sensitive file targets (/etc/passwd, /etc/shadow) or file read/include operations with traversal.")
279
+ @id("semantic.block-path-traversal")
280
+ @name("Block path traversal")
281
+ @description("Blocks call_tool, read_file, and write_file when detected_threats contains \\"path_traversal\\".")
320
282
  @severity("high")
321
- @tags("path-traversal,file-access,mitre-t1005")
322
- @reject_message("Blocked: path traversal attack detected — directory traversal sequences targeting sensitive system files.")
283
+ @tags("category:semantic,threat:path-traversal,detection:pattern,mitre:t1005")
284
+ @reject_message("Request blocked: path traversal pattern detected — sensitive system files or deep directory traversal.")
323
285
  forbid (
324
286
  principal,
325
287
  action in [Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -329,13 +291,12 @@ when {
329
291
  context has detected_threats && context.detected_threats.contains("path_traversal")
330
292
  };
331
293
 
332
- // Block encoded/obfuscated payloads in tool calls
333
- @id("semantic-block-encoded")
294
+ @id("semantic.block-encoded")
334
295
  @name("Block encoded payloads in tool calls")
335
- @description("Block tool calls when base64-encoded payloads (30+ chars) or hash IOCs are detected. Base64 detection excludes npm package paths to reduce false positives.")
296
+ @description("Blocks call_tool when detected_threats contains \\"detect_encoded\\".")
336
297
  @severity("medium")
337
- @tags("encoded,obfuscation,call-tool")
338
- @reject_message("Tool execution blocked: encoded or obfuscated payload detected. Base64-encoded content or hash IOCs found in tool arguments.")
298
+ @tags("category:semantic,threat:encoded-payload,detection:pattern,surface:call-tool")
299
+ @reject_message("Tool execution blocked: encoded or obfuscated payload detected (base64 or hash IOCs in tool arguments).")
339
300
  forbid (
340
301
  principal,
341
302
  action == Overwatch::Action::"call_tool",
@@ -345,60 +306,68 @@ when {
345
306
  context has detected_threats && context.detected_threats.contains("detect_encoded")
346
307
  };
347
308
 
348
-
349
309
  // ---------------------------------------------------------------------------
350
- // Tier 2: Classifier-Based Detection (require Highflame API token)
351
- // Prompt injection and jailbreak classifiers. These are inert without
352
- // the API token — scores default to 0 (prompts) or are absent (tools).
310
+ // Tier 2: ML classifier detection
353
311
  // ---------------------------------------------------------------------------
354
312
 
355
- // Block ML-detected prompt injection
356
- @id("semantic-block-injection-ml")
357
- @name("Block ML-detected prompt injection")
358
- @description("Block when Javelin's ML classifier scores prompt injection confidence >= 75/100. Catches sophisticated injection that pattern matching misses — authority hijack, instruction override, polymorphic payloads.")
313
+ @id("semantic.block-injection-ml")
314
+ @name("Block injection (ML)")
315
+ @description("Blocks process_prompt and call_tool when injection_score >= 75.")
359
316
  @severity("critical")
360
- @tags("prompt-injection,ml,javelin,owasp-llm01,mitre-aml-t0051")
361
- @reject_message("Blocked: prompt injection detected by ML classifier (confidence 75+). The content attempts to override agent instructions.")
317
+ @tags("category:semantic,threat:injection,detection:ml,owasp:llm01,mitre:atlas-t0051")
318
+ @reject_message("Request blocked: prompt injection detected by ML classifier with high confidence.")
362
319
  forbid (
363
320
  principal,
364
321
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
365
322
  resource
366
323
  )
367
324
  when {
368
- context has injection_confidence && context.injection_confidence >= 75
325
+ context has injection_score && context.injection_score >= 75
369
326
  };
370
327
 
371
- // Block ML-detected jailbreak attempts
372
- @id("semantic-block-jailbreak-ml")
373
- @name("Block ML-detected jailbreak attempts")
374
- @description("Block when Javelin's ML classifier scores jailbreak confidence >= 75/100. Catches DAN prompts, role-playing bypasses, and safety guideline override attempts.")
328
+ @id("semantic.block-jailbreak-ml")
329
+ @name("Block jailbreak (ML)")
330
+ @description("Blocks process_prompt and call_tool when jailbreak_score >= 75.")
375
331
  @severity("critical")
376
- @tags("jailbreak,ml,javelin,owasp-llm02,mitre-aml-t0054")
377
- @reject_message("Blocked: jailbreak attempt detected by ML classifier (confidence 75+). The content attempts to bypass agent safety guidelines.")
332
+ @tags("category:semantic,threat:jailbreak,detection:ml,owasp:llm02,mitre:atlas-t0054")
333
+ @reject_message("Request blocked: jailbreak attempt detected by ML classifier with high confidence.")
378
334
  forbid (
379
335
  principal,
380
336
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
381
337
  resource
382
338
  )
383
339
  when {
384
- context has jailbreak_confidence && context.jailbreak_confidence >= 75
340
+ context has jailbreak_score && context.jailbreak_score >= 75
385
341
  };
342
+ `;
343
+ const OVERWATCH_TRUST_SAFETY_DEFAULTS_CEDAR = `// =============================================================================
344
+ // Content Safety (Default)
345
+ // =============================================================================
346
+ // Blocks unsafe content using ML classifier scores: violence, weapons, hate
347
+ // speech, criminal activity, sexual content, and excessive profanity.
348
+ //
349
+ // Thresholds:
350
+ // - violence, weapons, sexual, crime: >= 80 (critical/high)
351
+ // - hate_speech: >= 75 (lower threshold, zero tolerance)
352
+ // - profanity: >= 90 (higher threshold, allows normal expression)
353
+ //
354
+ // Context keys consumed:
355
+ // - violence_score, weapons_score, hate_speech_score: Long (0-100)
356
+ // - crime_score, sexual_score, profanity_score: Long (0-100)
357
+ //
358
+ // Compliance:
359
+ // - NIST 800-53 SI-4; ISO 42001; EU AI Act Art. 52
360
+ //
361
+ // Category: trust-safety
362
+ // Namespace: Overwatch
363
+ // =============================================================================
386
364
 
387
-
388
- // ---------------------------------------------------------------------------
389
- // Tier 3: Content Safety (classifier scores, require API token)
390
- // Trust & safety classification scores for violence, weapons, hate speech,
391
- // crime, sexual content, and profanity. Ensures enterprise-appropriate
392
- // content thresholds.
393
- // ---------------------------------------------------------------------------
394
-
395
- // Block violent content
396
- @id("semantic-block-violence")
365
+ @id("trust-safety.block-violence")
397
366
  @name("Block violent content")
398
- @description("Block content when the ML violence detection score exceeds threshold (80/100). Catches graphic violence descriptions, instructions for causing harm, and violent threat language.")
367
+ @description("Blocks process_prompt and call_tool when violence_score >= 80.")
399
368
  @severity("critical")
400
- @tags("violence,content-safety,trust-safety,nist-si-4,iso-42001")
401
- @reject_message("Content blocked: violent content detected. AI agents in enterprise environments must not process or generate violent content.")
369
+ @tags("category:trust-safety,threat:violence,detection:ml,compliance:nist-si-4,compliance:iso-42001")
370
+ @reject_message("Content blocked: violent content detected.")
402
371
  forbid (
403
372
  principal,
404
373
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -408,13 +377,12 @@ when {
408
377
  context has violence_score && context.violence_score >= 80
409
378
  };
410
379
 
411
- // Block weapons content
412
- @id("semantic-block-weapons")
380
+ @id("trust-safety.block-weapons")
413
381
  @name("Block weapons content")
414
- @description("Block content when the ML weapons detection score exceeds threshold (80/100). Catches weapon manufacturing instructions, procurement guidance, and detailed specifications.")
382
+ @description("Blocks process_prompt and call_tool when weapons_score >= 80.")
415
383
  @severity("critical")
416
- @tags("weapons,content-safety,trust-safety,nist-si-4")
417
- @reject_message("Content blocked: weapons-related content detected. AI agents must not process weapons manufacturing, procurement, or detailed specification content.")
384
+ @tags("category:trust-safety,threat:weapons,detection:ml,compliance:nist-si-4")
385
+ @reject_message("Content blocked: weapons-related content detected (manufacturing, procurement, or specifications).")
418
386
  forbid (
419
387
  principal,
420
388
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -424,13 +392,12 @@ when {
424
392
  context has weapons_score && context.weapons_score >= 80
425
393
  };
426
394
 
427
- // Block hate speech (lower threshold — zero tolerance)
428
- @id("semantic-block-hate-speech")
395
+ @id("trust-safety.block-hate-speech")
429
396
  @name("Block hate speech")
430
- @description("Block content when the ML hate speech detection score exceeds threshold (75/100). Lower threshold than other categories — enterprises have zero tolerance for discriminatory content.")
397
+ @description("Blocks process_prompt and call_tool when hate_speech_score >= 75.")
431
398
  @severity("critical")
432
- @tags("hate-speech,content-safety,trust-safety,nist-si-4,eu-ai-act")
433
- @reject_message("Content blocked: hate speech or discriminatory content detected. AI agents must not process or generate hateful, discriminatory, or dehumanizing content.")
399
+ @tags("category:trust-safety,threat:hate-speech,detection:ml,compliance:nist-si-4,compliance:eu-ai-act")
400
+ @reject_message("Content blocked: hate speech or discriminatory content detected.")
434
401
  forbid (
435
402
  principal,
436
403
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -440,13 +407,12 @@ when {
440
407
  context has hate_speech_score && context.hate_speech_score >= 75
441
408
  };
442
409
 
443
- // Block criminal content
444
- @id("semantic-block-crime")
410
+ @id("trust-safety.block-crime")
445
411
  @name("Block criminal content")
446
- @description("Block content when the ML criminal activity detection score exceeds threshold (80/100). Catches illegal activity instructions, fraud techniques, and content promoting criminal behavior.")
412
+ @description("Blocks process_prompt and call_tool when crime_score >= 80.")
447
413
  @severity("high")
448
- @tags("crime,content-safety,trust-safety,nist-si-4")
449
- @reject_message("Content blocked: criminal activity content detected. AI agents must not process content related to illegal activities, fraud, or other criminal behavior.")
414
+ @tags("category:trust-safety,threat:crime,detection:ml,compliance:nist-si-4")
415
+ @reject_message("Content blocked: criminal activity content detected (illegal activity, fraud, or related).")
450
416
  forbid (
451
417
  principal,
452
418
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -456,13 +422,12 @@ when {
456
422
  context has crime_score && context.crime_score >= 80
457
423
  };
458
424
 
459
- // Block sexual content
460
- @id("semantic-block-sexual")
425
+ @id("trust-safety.block-sexual")
461
426
  @name("Block sexual content")
462
- @description("Block content when the ML sexual content detection score exceeds threshold (80/100). Ensures enterprise AI agents do not process sexually explicit material.")
427
+ @description("Blocks process_prompt and call_tool when sexual_score >= 80.")
463
428
  @severity("high")
464
- @tags("sexual,content-safety,trust-safety,eu-ai-act,iso-42001")
465
- @reject_message("Content blocked: sexual content detected. AI agents in enterprise environments must not process sexually explicit material.")
429
+ @tags("category:trust-safety,threat:sexual,detection:ml,compliance:eu-ai-act,compliance:iso-42001")
430
+ @reject_message("Content blocked: sexually explicit content detected.")
466
431
  forbid (
467
432
  principal,
468
433
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -472,13 +437,12 @@ when {
472
437
  context has sexual_score && context.sexual_score >= 80
473
438
  };
474
439
 
475
- // Block excessive profanity (higher threshold — allows normal expression)
476
- @id("semantic-block-profanity")
477
- @name("Block profanity")
478
- @description("Block content when the ML profanity detection score exceeds threshold (90/100). Higher threshold — allows normal expression while blocking abusive or harassing language patterns.")
440
+ @id("trust-safety.block-profanity")
441
+ @name("Block excessive profanity")
442
+ @description("Blocks process_prompt and call_tool when profanity_score >= 90.")
479
443
  @severity("medium")
480
- @tags("profanity,content-safety,trust-safety")
481
- @reject_message("Content blocked: excessive profanity detected. Please rephrase in a professional manner appropriate for enterprise AI interactions.")
444
+ @tags("category:trust-safety,threat:profanity,detection:ml")
445
+ @reject_message("Content blocked: excessive profanity detected please rephrase in professional language.")
482
446
  forbid (
483
447
  principal,
484
448
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -488,49 +452,37 @@ when {
488
452
  context has profanity_score && context.profanity_score >= 90
489
453
  };
490
454
  `;
491
- const OVERWATCH_TOOLS_DEFAULT_CEDAR = `// =============================================================================
492
- // Tool Permissioning Policy (Default)
455
+ const OVERWATCH_TOOLS_DEFAULTS_CEDAR = `// =============================================================================
456
+ // Tool Permissioning (Default)
493
457
  // =============================================================================
494
- // Controls access to IDE tools, shell execution, file system paths, and MCP
495
- // operations. Enforces least-privilege for agent tool usage with:
496
- //
497
- // 1. Shell/command execution blocking (opt-in — inactive by default)
498
- // 2. Destructive file operation blocking (opt-in — inactive by default)
499
- // 3. Sensitive system path protection (active)
500
- // 4. Threat-severity-based tool blocking (active)
458
+ // Controls IDE tool execution, shell access, sensitive file system paths, and
459
+ // threat-severity-based blocking. Sections 1–2 are opt-in (inactive unless
460
+ // explicitly enabled); sections 3–4 are active baseline.
501
461
  //
502
- // NOTE: Policies 1-2 are included in this file but classified as opt-in
503
- // templates in templates.json (not in the defaults array). They are shipped
504
- // as part of the tool permissioning category but must be explicitly enabled.
462
+ // Context keys consumed:
463
+ // - tool_name: String
464
+ // - path: String
465
+ // - max_threat_severity: Long (0-4)
505
466
  //
506
467
  // Compliance:
507
- // NIST 800-53 AC-3 (Access Enforcement)
508
- // NIST 800-53 AC-6 (Least Privilege)
509
- // NIST 800-53 CM-7 (Least Functionality)
510
- // OWASP LLM06 (Excessive Agency)
511
- // OWASP ASI02 (Tool Misuse)
512
- // MITRE ATT&CK T1059 (Command and Scripting Interpreter)
513
- // MITRE ATT&CK T1005 (Data from Local System)
468
+ // - NIST 800-53 AC-3, AC-6, CM-7
469
+ // - OWASP LLM06, OWASP ASI02
470
+ // - MITRE ATT&CK T1059, T1005
514
471
  //
515
- // Category: tools
472
+ // Category: tools
516
473
  // Namespace: Overwatch
517
474
  // =============================================================================
518
475
 
519
476
  // ---------------------------------------------------------------------------
520
- // Section 1: Shell Blocking (opt-in — inactive by default)
521
- // Blocks all shell/command execution tools. Enable for high-security
522
- // environments where shell access is explicitly prohibited.
523
- // WARNING: Blocks ALL shell use including safe commands (git, npm, echo).
524
- // Ref: OWASP LLM06, MITRE T1059
477
+ // Section 1: Shell execution (opt-in)
525
478
  // ---------------------------------------------------------------------------
526
479
 
527
- // Block shell and command execution tools
528
- @id("tools-block-shell")
480
+ @id("tools.block-shell")
529
481
  @name("Block shell and command execution")
530
- @description("Block direct shell, bash, and command execution tools. Unrestricted shell access enables command injection, data exfiltration, and arbitrary code execution. INACTIVE BY DEFAULT — enable for high-security environments where all shell access is prohibited.")
482
+ @description("Blocks call_tool when tool_name is shell, bash, sh, terminal, cmd, or powershell.")
531
483
  @severity("critical")
532
- @tags("shell,execution,nist-cm-7,mitre-t1059,owasp-llm06,opt-in")
533
- @reject_message("Tool blocked: shell/command execution is restricted in this environment. Use specific, scoped tools instead.")
484
+ @tags("category:tools,threat:command-injection,detection:rule,surface:call-tool,owasp:llm06,mitre:t1059")
485
+ @reject_message("Tool execution blocked: shell/command execution is restricted in this environment.")
534
486
  forbid (
535
487
  principal,
536
488
  action == Overwatch::Action::"call_tool",
@@ -538,29 +490,26 @@ forbid (
538
490
  )
539
491
  when {
540
492
  context has tool_name &&
541
- (context.tool_name == "shell" ||
542
- context.tool_name == "bash" ||
543
- context.tool_name == "sh" ||
544
- context.tool_name == "terminal" ||
545
- context.tool_name == "cmd" ||
546
- context.tool_name == "powershell")
493
+ (
494
+ context.tool_name == "shell" ||
495
+ context.tool_name == "bash" ||
496
+ context.tool_name == "sh" ||
497
+ context.tool_name == "terminal" ||
498
+ context.tool_name == "cmd" ||
499
+ context.tool_name == "powershell"
500
+ )
547
501
  };
548
502
 
549
503
  // ---------------------------------------------------------------------------
550
- // Section 2: Destructive Operations (opt-in — inactive by default)
551
- // Blocks file deletion tools. Enable when agents should not have delete access.
552
- // NOTE: Only matches MCP tool names, not Bash rm commands (which use
553
- // tool_name "shell"). Bash destructive commands are caught by the
554
- // command_injection rule in semantic.cedar.
504
+ // Section 2: Destructive file operations (opt-in)
555
505
  // ---------------------------------------------------------------------------
556
506
 
557
- // Block destructive file operations
558
- @id("tools-block-destructive-ops")
507
+ @id("tools.block-destructive-ops")
559
508
  @name("Block destructive file operations")
560
- @description("Block file deletion and directory removal tools. INACTIVE BY DEFAULT — enable when agents should not have delete access. Only matches MCP tool names; Bash rm commands go through 'shell' tool name.")
509
+ @description("Blocks call_tool when tool_name is a destructive file operation.")
561
510
  @severity("high")
562
- @tags("file,delete,destructive,nist-ac-3,owasp-asi02,opt-in")
563
- @reject_message("Tool blocked: destructive file operations (delete, rmdir) are restricted. Request human approval for destructive actions.")
511
+ @tags("category:tools,detection:rule,surface:call-tool,owasp:asi02")
512
+ @reject_message("Tool execution blocked: destructive file operations (delete, rmdir, unlink) require explicit human approval.")
564
513
  forbid (
565
514
  principal,
566
515
  action == Overwatch::Action::"call_tool",
@@ -568,30 +517,26 @@ forbid (
568
517
  )
569
518
  when {
570
519
  context has tool_name &&
571
- (context.tool_name == "fs.delete" ||
572
- context.tool_name == "fs.rmdir" ||
573
- context.tool_name == "fs.unlink" ||
574
- context.tool_name == "fs.remove" ||
575
- context.tool_name == "delete_file" ||
576
- context.tool_name == "remove_directory")
520
+ (
521
+ context.tool_name == "fs.delete" ||
522
+ context.tool_name == "fs.rmdir" ||
523
+ context.tool_name == "fs.unlink" ||
524
+ context.tool_name == "fs.remove" ||
525
+ context.tool_name == "delete_file" ||
526
+ context.tool_name == "remove_directory"
527
+ )
577
528
  };
578
529
 
579
530
  // ---------------------------------------------------------------------------
580
- // Section 3: Sensitive System Path Protection (active)
581
- // Blocks file read/write access to system directories.
582
- // NOTE: Targets read_file/write_file only — NOT call_tool. The path field
583
- // is empty for Bash commands. Bash access to system files is caught by
584
- // rules in semantic.cedar (command_injection, path_traversal).
585
- // Ref: MITRE T1005, T1552
531
+ // Section 3: Sensitive system paths (active)
586
532
  // ---------------------------------------------------------------------------
587
533
 
588
- // Block access to system directories
589
- @id("tools-block-system-paths")
534
+ @id("tools.block-system-paths")
590
535
  @name("Block system directory access")
591
- @description("Block file read/write to sensitive system directories. Includes Linux (/etc, /proc, /sys, /root, /var) and macOS (/private/etc, /Library, /System) paths. Only applies to Read/Write/Edit tools.")
536
+ @description("Blocks read_file and write_file when path matches a sensitive Linux or macOS system directory.")
592
537
  @severity("high")
593
- @tags("file,path,system,nist-ac-6,mitre-t1005")
594
- @reject_message("Blocked: access to sensitive system directory. AI agents are restricted from system configuration and process directories.")
538
+ @tags("category:tools,threat:path-traversal,detection:pattern,mitre:t1005")
539
+ @reject_message("File access blocked: sensitive system directory targeted (/etc, /proc, /sys, /root, /var, /System, /Library, /private).")
595
540
  forbid (
596
541
  principal,
597
542
  action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -599,33 +544,30 @@ forbid (
599
544
  )
600
545
  when {
601
546
  context has path &&
602
- (context.path like "/etc/*" ||
603
- context.path like "/proc/*" ||
604
- context.path like "/sys/*" ||
605
- context.path like "/root/*" ||
606
- context.path like "/var/log/*" ||
607
- context.path like "/var/run/*" ||
608
- context.path like "/private/etc/*" ||
609
- context.path like "/private/var/*" ||
610
- context.path like "/Library/*" ||
611
- context.path like "/System/*")
547
+ (
548
+ context.path like "/etc/*" ||
549
+ context.path like "/proc/*" ||
550
+ context.path like "/sys/*" ||
551
+ context.path like "/root/*" ||
552
+ context.path like "/var/log/*" ||
553
+ context.path like "/var/run/*" ||
554
+ context.path like "/private/etc/*" ||
555
+ context.path like "/private/var/*" ||
556
+ context.path like "/Library/*" ||
557
+ context.path like "/System/*"
558
+ )
612
559
  };
613
560
 
614
561
  // ---------------------------------------------------------------------------
615
- // Section 4: Threat-Based Tool Blocking (active)
616
- // Blocks tool calls based on threat severity from detection engines.
617
- // This is the primary catch-all — any rule with severity HIGH (3)
618
- // or CRITICAL (4) triggers this. Provides defense-in-depth behind
619
- // specific rule policies in semantic.cedar and secrets.cedar.
562
+ // Section 4: Threat-severity catch-all
620
563
  // ---------------------------------------------------------------------------
621
564
 
622
- // Block tool calls with high/critical severity threats
623
- @id("tools-block-high-severity")
624
- @name("Block tool calls with high severity threats")
625
- @description("Block tool execution when threats with severity >= HIGH (3) are detected. Primary catch-all defense — any rule with severity HIGH or CRITICAL triggers this.")
565
+ @id("tools.block-high-severity")
566
+ @name("Block high-severity tool calls")
567
+ @description("Blocks call_tool when max_threat_severity >= 3.")
626
568
  @severity("high")
627
- @tags("tools,threats,severity,defense-in-depth")
628
- @reject_message("Tool execution blocked: high or critical severity threats detected in content by security scanners.")
569
+ @tags("category:tools,detection:aggregate,surface:call-tool,posture:catch-all")
570
+ @reject_message("Tool execution blocked: high or critical severity threats detected in content.")
629
571
  forbid (
630
572
  principal,
631
573
  action == Overwatch::Action::"call_tool",
@@ -635,46 +577,41 @@ when {
635
577
  context has max_threat_severity && context.max_threat_severity >= 3
636
578
  };
637
579
  `;
638
- const OVERWATCH_PII_DEFAULT_CEDAR = `// =============================================================================
639
- // PII Detection Policy (Default)
580
+ const OVERWATCH_PRIVACY_DEFAULTS_CEDAR = `// =============================================================================
581
+ // PII Detection (Default)
640
582
  // =============================================================================
641
- // Detects and blocks personally identifiable information across prompts, tool
642
- // calls, and file operations using Shield's PII detector context keys.
583
+ // Blocks personally identifiable information across prompts, tool calls, and
584
+ // file operations using Shield's PII detector context keys.
643
585
  //
644
- // Detection:
645
- // Shield's pii_regex (Tier Fast) and gcp_dlp (Tier Slow) detectors populate:
646
- // pii_detected (bool) — true if any PII found
647
- // pii_types (Set<String>) — types found: "ssn", "credit_card", "email", etc.
648
- // pii_count (long) total PII matches
586
+ // Severity tiers:
587
+ // - Critical: SSN, credit card
588
+ // - High: passport, IBAN
589
+ // - Medium: email, phone, date of birth
590
+ // - Low: IP address (prompt only)
649
591
  //
650
- // Policies reference pii_types directly for per-type granularity. This works
651
- // with both built-in and user-configured PII types (via ConfigReloader).
592
+ // Context keys consumed:
593
+ // - pii_detected: Bool
594
+ // - pii_types: Set<String>
595
+ // - pii_count: Long
652
596
  //
653
597
  // Compliance:
654
- // PCI DSS 3.4, 4.1 (Payment Card Data)
655
- // GDPR Art. 32 (Security of Processing)
656
- // HIPAA §164.312 (Technical Safeguards)
657
- // NIST 800-53 SI-4 (Information System Monitoring)
658
- // CCPA §1798.150 (Data Protection)
659
- // OWASP LLM06 (Sensitive Information Disclosure)
598
+ // - PCI DSS 3.4/4.1, GDPR Art. 32, HIPAA §164.312, CCPA §1798.150
599
+ // - NIST 800-53 SI-4; OWASP LLM06
660
600
  //
661
- // Category: pii
601
+ // Category: privacy
662
602
  // Namespace: Overwatch
663
603
  // =============================================================================
664
604
 
665
605
  // ---------------------------------------------------------------------------
666
- // Section 1: Critical PII Identity Theft Risk
667
- // SSNs and credit card numbers are the highest-risk PII types.
668
- // Blocked across all actions (prompts, tool calls, file reads/writes).
606
+ // Section 1: Critical PII (SSN, credit card)
669
607
  // ---------------------------------------------------------------------------
670
608
 
671
- // Block Social Security Numbers
672
- @id("pii-block-ssn")
609
+ @id("privacy.block-ssn")
673
610
  @name("Block Social Security Numbers")
674
- @description("Block content containing SSN patterns (XXX-XX-XXXX). SSNs are high-value identity theft targets — exposure through AI agents is a critical privacy violation.")
611
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"ssn\\".")
675
612
  @severity("critical")
676
- @tags("pii,ssn,identity,pci-dss,nist-si-4")
677
- @reject_message("Content blocked: Social Security Number patterns detected. SSNs must never be processed through AI agents.")
613
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss,compliance:gdpr")
614
+ @reject_message("Content blocked: Social Security Number patterns detected.")
678
615
  forbid (
679
616
  principal,
680
617
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -684,13 +621,12 @@ when {
684
621
  context has pii_types && context.pii_types.contains("ssn")
685
622
  };
686
623
 
687
- // Block credit card numbers (PCI DSS compliance)
688
- @id("pii-block-credit-card")
624
+ @id("privacy.block-credit-card")
689
625
  @name("Block credit card numbers")
690
- @description("Block content containing credit card number patterns (13-19 digits). PCI DSS 3.4 requires PANs are rendered unreadable — AI agents must never process raw card numbers.")
626
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"credit_card\\".")
691
627
  @severity("critical")
692
- @tags("pii,credit-card,payment,pci-dss-3.4,pci-dss-4.1")
693
- @reject_message("Content blocked: credit card number patterns detected. Sharing payment card data through AI agents violates PCI DSS. Use tokenized references instead.")
628
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss")
629
+ @reject_message("Content blocked: credit card number patterns detected PCI DSS prohibits raw PAN handling.")
694
630
  forbid (
695
631
  principal,
696
632
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -701,18 +637,15 @@ when {
701
637
  };
702
638
 
703
639
  // ---------------------------------------------------------------------------
704
- // Section 2: High PII Government & Financial Identifiers
705
- // Passport numbers and IBANs are regulated identifiers with high
706
- // identity theft and financial fraud risk.
640
+ // Section 2: High PII (passport, IBAN)
707
641
  // ---------------------------------------------------------------------------
708
642
 
709
- // Block passport numbers
710
- @id("pii-block-passport")
643
+ @id("privacy.block-passport")
711
644
  @name("Block passport numbers")
712
- @description("Block content containing passport number patterns (1-2 letters + 6-9 digits). Passport numbers are government-issued identifiers with high identity theft risk.")
645
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"passport\\".")
713
646
  @severity("high")
714
- @tags("pii,passport,identity,gdpr-art-32")
715
- @reject_message("Content blocked: passport number patterns detected. Government-issued identifiers must not be processed through AI agents.")
647
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
648
+ @reject_message("Content blocked: passport number patterns detected.")
716
649
  forbid (
717
650
  principal,
718
651
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -722,13 +655,12 @@ when {
722
655
  context has pii_types && context.pii_types.contains("passport")
723
656
  };
724
657
 
725
- // Block IBAN (International Bank Account Numbers)
726
- @id("pii-block-iban")
658
+ @id("privacy.block-iban")
727
659
  @name("Block bank account numbers")
728
- @description("Block content containing IBAN patterns. Bank account numbers are sensitive financial identifiers that must not be exposed through AI agents.")
660
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"iban\\".")
729
661
  @severity("high")
730
- @tags("pii,iban,financial,gdpr-art-32,pci-dss")
731
- @reject_message("Content blocked: bank account number (IBAN) patterns detected. Financial account numbers must not be processed through AI agents.")
662
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr,compliance:pci-dss")
663
+ @reject_message("Content blocked: IBAN / bank account number patterns detected.")
732
664
  forbid (
733
665
  principal,
734
666
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -739,18 +671,15 @@ when {
739
671
  };
740
672
 
741
673
  // ---------------------------------------------------------------------------
742
- // Section 3: Medium PII Contact Information
743
- // Email addresses and phone numbers. Only blocked in prompts and tool calls
744
- // (not file ops — too common in source code, configs, and test fixtures).
674
+ // Section 3: Medium PII (contact info)
745
675
  // ---------------------------------------------------------------------------
746
676
 
747
- // Block email addresses
748
- @id("pii-block-email")
677
+ @id("privacy.block-email")
749
678
  @name("Block email addresses")
750
- @description("Block prompts and tool calls containing email address patterns. Prevents accidental sharing of personal email addresses with AI agents.")
679
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"email\\".")
751
680
  @severity("medium")
752
- @tags("pii,email,contact,gdpr-art-32")
753
- @reject_message("Content blocked: email address patterns detected. Remove personal email addresses before submitting to AI agents.")
681
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
682
+ @reject_message("Content blocked: email address patterns detected.")
754
683
  forbid (
755
684
  principal,
756
685
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -760,13 +689,12 @@ when {
760
689
  context has pii_types && context.pii_types.contains("email")
761
690
  };
762
691
 
763
- // Block US phone numbers
764
- @id("pii-block-phone")
692
+ @id("privacy.block-phone")
765
693
  @name("Block phone numbers")
766
- @description("Block prompts and tool calls containing US phone number patterns. Prevents accidental sharing of personal phone numbers with AI agents.")
694
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"phone\\".")
767
695
  @severity("medium")
768
- @tags("pii,phone,contact,ccpa")
769
- @reject_message("Content blocked: phone number patterns detected. Remove personal phone numbers before submitting to AI agents.")
696
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
697
+ @reject_message("Content blocked: phone number patterns detected.")
770
698
  forbid (
771
699
  principal,
772
700
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -776,13 +704,12 @@ when {
776
704
  context has pii_types && context.pii_types.contains("phone")
777
705
  };
778
706
 
779
- // Block dates of birth
780
- @id("pii-block-dob")
707
+ @id("privacy.block-dob")
781
708
  @name("Block dates of birth")
782
- @description("Block prompts and tool calls containing date of birth patterns (MM/DD/YYYY). Date of birth combined with other identifiers enables identity theft.")
709
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"date_of_birth\\".")
783
710
  @severity("medium")
784
- @tags("pii,dob,identity,hipaa-164.312")
785
- @reject_message("Content blocked: date of birth patterns detected. Remove personal dates before submitting to AI agents.")
711
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:hipaa")
712
+ @reject_message("Content blocked: date of birth patterns detected.")
786
713
  forbid (
787
714
  principal,
788
715
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -793,18 +720,15 @@ when {
793
720
  };
794
721
 
795
722
  // ---------------------------------------------------------------------------
796
- // Section 4: Low PII Network Identifiers
797
- // IP addresses are extremely common in code, configs, and logs.
798
- // Only blocked in prompts to catch accidental data dumps.
723
+ // Section 4: Low PII (IP addresses, prompts only)
799
724
  // ---------------------------------------------------------------------------
800
725
 
801
- // Block IP addresses in prompts
802
- @id("pii-block-ip-address")
726
+ @id("privacy.block-ip-address")
803
727
  @name("Block IP addresses in prompts")
804
- @description("Block prompts containing IPv4 address patterns. Only targets prompts — IP addresses are too common in source code and config files to block in tool calls or file operations.")
728
+ @description("Blocks process_prompt when pii_types contains \\"ip_address\\".")
805
729
  @severity("low")
806
- @tags("pii,ip-address,network")
807
- @reject_message("Content blocked: IP address patterns detected in prompt. Remove network identifiers before submitting.")
730
+ @tags("category:privacy,threat:pii,detection:pattern,surface:process-prompt")
731
+ @reject_message("Prompt blocked: IP address patterns detected.")
808
732
  forbid (
809
733
  principal,
810
734
  action == Overwatch::Action::"process_prompt",
@@ -814,18 +738,24 @@ when {
814
738
  context has pii_types && context.pii_types.contains("ip_address")
815
739
  };
816
740
  `;
817
- const OVERWATCH_TOOLS_MCP_ALLOWLIST_CEDAR = `// MCP Server Allowlist Template
818
- // Only allow specific MCP servers to be used
819
- // Category: tools
741
+ const OVERWATCH_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR = `// =============================================================================
742
+ // MCP Server Allowlist
743
+ // =============================================================================
744
+ // Restricts MCP server connections to a pre-approved list. Customize the
745
+ // \`context.mcp_server\` values in the permit rule to match allowed servers.
820
746
  //
821
- // NOTE: Users should customize the mcp_server values in the permit rule
822
- // to match their allowed servers before deploying this template.
747
+ // Context keys consumed:
748
+ // - mcp_server: String
749
+ //
750
+ // Category: tools
751
+ // Namespace: Overwatch
752
+ // =============================================================================
823
753
 
824
- @id("mcp-allowlist-permit")
825
- @name("Allow specific MCP servers")
826
- @description("Only allow connections to pre-approved MCP servers (customize the list)")
754
+ @id("tools.allow-mcp-allowlist")
755
+ @name("Allow allowlisted MCP servers")
756
+ @description("Permits connect_server when mcp_server is in the allowlist.")
827
757
  @severity("medium")
828
- @tags("mcp,allowlist,server,governance")
758
+ @tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
829
759
  permit (
830
760
  principal,
831
761
  action == Overwatch::Action::"connect_server",
@@ -833,15 +763,15 @@ permit (
833
763
  )
834
764
  when {
835
765
  context has mcp_server &&
836
- (context.mcp_server == "filesystem" ||
837
- context.mcp_server == "playwright")
766
+ (context.mcp_server == "filesystem" || context.mcp_server == "playwright")
838
767
  };
839
768
 
840
- @id("mcp-allowlist-deny")
841
- @name("Deny unallowed MCP servers")
842
- @description("Block all MCP server connections not in the allowlist")
769
+ @id("tools.deny-non-allowlisted-mcp")
770
+ @name("Block non-allowlisted MCP servers")
771
+ @description("Blocks connect_server unconditionally so only the allowlist permit applies.")
843
772
  @severity("medium")
844
- @tags("mcp,deny-default,server")
773
+ @tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
774
+ @reject_message("MCP server connection blocked: server is not on the allowlist.")
845
775
  forbid (
846
776
  principal,
847
777
  action == Overwatch::Action::"connect_server",
@@ -849,200 +779,216 @@ forbid (
849
779
  );
850
780
  `;
851
781
  const OVERWATCH_TOOLS_MCP_TOOL_PERMISSIONS_CEDAR = `// =============================================================================
852
- // MCP Tool Permissions Template (Overwatch)
782
+ // MCP Tool Permissions
853
783
  // =============================================================================
854
- // Per-tool access control for MCP servers in IDE environments.
855
- // Complements the existing MCP Server Allowlist (connect_server action)
856
- // with fine-grained per-tool control on call_tool action.
784
+ // Per-tool access control for MCP servers. Permit-all by default plus two
785
+ // opt-in safety rails (exclude untrusted servers, block unverified servers).
786
+ // Add additional forbid rules to gate specific server/tool combinations.
857
787
  //
858
- // Defaults to permit-all. Customize per-tool gating by adding forbid rules
859
- // scoped to specific mcp_server / tool_name combinations.
788
+ // Context keys consumed:
789
+ // - mcp_server: String
790
+ // - mcp_server_verified: Bool
860
791
  //
861
- // Category: tools
792
+ // Category: tools
862
793
  // Namespace: Overwatch
863
794
  // =============================================================================
864
795
 
865
- // -- Permit all MCP tool calls (opt-in default) -----------------------------
866
-
867
- @id("mcp-tool-allow-all")
868
- @name("Allow all MCP tool calls")
869
- @description("Permit every call_tool action. Add forbid rules below for per-tool gating.")
796
+ @id("tools.allow-mcp-tools-baseline")
797
+ @name("Permit MCP tool calls")
798
+ @description("Permits all call_tool actions; combine with forbid rules for gating.")
870
799
  @severity("low")
871
- @tags("mcp,permit-default")
800
+ @tags("category:tools,surface:call-tool,posture:permit-default")
872
801
  permit (
873
802
  principal,
874
803
  action == Overwatch::Action::"call_tool",
875
804
  resource
876
805
  );
877
806
 
878
- // -- Organization-wide MCP server exclusions --------------------------------
879
-
880
- @id("mcp-tool-exclude-server")
881
- @name("Exclude specific MCP servers")
882
- @description("Block all tool calls from excluded MCP servers (org-wide exclusion list)")
807
+ @id("tools.exclude-mcp-servers")
808
+ @name("Block excluded MCP servers")
809
+ @description("Blocks call_tool when mcp_server is in the org-wide exclusion list.")
883
810
  @severity("critical")
884
- @tags("mcp,exclusion,org-wide,block")
811
+ @tags("category:tools,surface:call-tool,scope:org-wide,posture:deny-default")
812
+ @reject_message("Tool execution blocked: MCP server is on the org-wide exclusion list.")
885
813
  forbid (
886
814
  principal,
887
815
  action == Overwatch::Action::"call_tool",
888
816
  resource
889
- ) when {
890
- // Add server names to block across the organization.
891
- // Modify this list to match your exclusion requirements.
817
+ )
818
+ when {
892
819
  context has mcp_server &&
893
- (context.mcp_server == "untrusted-server" ||
894
- context.mcp_server == "deprecated-server")
820
+ (context.mcp_server == "untrusted-server" || context.mcp_server == "deprecated-server")
895
821
  };
896
822
 
897
- // -- Block unverified MCP servers -------------------------------------------
898
-
899
- @id("mcp-tool-block-unverified")
900
- @name("Block tools from unverified MCP servers")
901
- @description("Deny tool calls from MCP servers not in the verified registry")
823
+ @id("tools.block-unverified-mcp-tools")
824
+ @name("Block unverified MCP server tools")
825
+ @description("Blocks call_tool when mcp_server_verified is false.")
902
826
  @severity("high")
903
- @tags("mcp,trust,verification")
827
+ @tags("category:tools,threat:supply-chain,detection:rule,surface:call-tool")
828
+ @reject_message("Tool execution blocked: MCP server is not from a verified registry.")
904
829
  forbid (
905
830
  principal,
906
831
  action == Overwatch::Action::"call_tool",
907
832
  resource
908
- ) when {
833
+ )
834
+ when {
909
835
  context has mcp_server_verified && context.mcp_server_verified == false
910
836
  };
911
837
  `;
912
- const OVERWATCH_ORG_DEFAULT_DENY_CEDAR = `// Default Deny All Template
913
- // Organization-wide baseline: deny all unless explicitly permitted
914
- // Category: organization
838
+ const OVERWATCH_ORGANIZATION_DENY_BASELINE_CEDAR = `// =============================================================================
839
+ // Default Deny All
840
+ // =============================================================================
841
+ // Org-wide baseline that blocks everything unless explicitly permitted by
842
+ // other policies. Pair with scoped permit rules (e.g. team_permissions) for
843
+ // a deny-by-default posture.
844
+ //
845
+ // Category: organization
846
+ // Namespace: Overwatch
847
+ // =============================================================================
915
848
 
916
- @id("org-deny-all")
917
- @name("Deny all actions by default")
918
- @description("Block all actions unless explicitly permitted by other policies - use as organization baseline")
849
+ @id("organization.deny-baseline")
850
+ @name("Block all actions (deny baseline)")
851
+ @description("Blocks all actions; pair with scoped permit rules for a deny-by-default posture.")
919
852
  @severity("high")
920
- @tags("baseline,security,deny-by-default,organization")
853
+ @tags("category:organization,posture:deny-default,scope:org-wide")
854
+ @reject_message("Request blocked: this organization uses a deny-by-default baseline — only explicitly permitted actions are allowed.")
921
855
  forbid (
922
856
  principal,
923
857
  action,
924
858
  resource
925
859
  );
926
860
  `;
927
- const OVERWATCH_ORG_AUDIT_ALL_CEDAR = `// Audit All Actions Template
928
- // Log all agent actions for compliance and monitoring
929
- // Category: organization
861
+ const OVERWATCH_ORGANIZATION_AUDIT_ALL_CEDAR = `// =============================================================================
862
+ // Audit All Actions
863
+ // =============================================================================
864
+ // Permits and logs all agent actions for compliance auditing and monitoring.
865
+ // This is a permit rule — combine with monitoring/observability tooling to
866
+ // capture an audit trail.
867
+ //
868
+ // Category: organization
869
+ // Namespace: Overwatch
870
+ // =============================================================================
930
871
 
931
- @id("org-audit-all")
932
- @name("Audit all actions")
933
- @description("Permit and log all agent actions for compliance auditing and monitoring")
872
+ @id("organization.audit-all")
873
+ @name("Permit and audit all actions")
874
+ @description("Permits all actions while emitting audit-logging signals for compliance and monitoring.")
934
875
  @severity("low")
935
- @tags("audit,compliance,logging,organization")
876
+ @tags("category:organization,posture:permit-default,compliance:soc2")
936
877
  permit (
937
878
  principal,
938
879
  action,
939
880
  resource
940
881
  );
941
882
  `;
942
- const OVERWATCH_ORG_TEAM_PERMISSIONS_CEDAR = `// =============================================================================
883
+ const OVERWATCH_ORGANIZATION_TEAM_PERMISSIONS_CEDAR = `// =============================================================================
943
884
  // Project-Based Permissions (ReBAC)
944
885
  // =============================================================================
945
- // Grant IDE access based on project scope using entity hierarchy.
946
- // With the aligned schema, principals (User, Agent) are flat — scoping is
947
- // done via resource hierarchy instead of principal hierarchy.
948
- //
949
- // Category: organization
950
- // Namespace: Overwatch
886
+ // Grants IDE access based on project membership using Cedar's entity
887
+ // hierarchy. Resources (Tool, Server, FilePath, etc.) are parented under
888
+ // Project, so \`resource in Project::"..."\` matches all resources scoped
889
+ // to that project.
951
890
  //
952
891
  // Entity hierarchy required:
953
892
  // Account::"acme-corp"
954
- // └── Project::"dev-project" (in Account)
955
- // └── Project::"support-project" (in Account)
893
+ // ├── Project::"dev-project"
894
+ // └── Project::"support-project"
956
895
  //
957
- // Resources (Tool, Server, FilePath, LlmPrompt) are parented under Project,
958
- // so \`resource in Project::"..."\` matches all resources in that project.
896
+ // Category: organization
897
+ // Namespace: Overwatch
959
898
  // =============================================================================
960
899
 
961
- // Dev Project: Full IDE access - all actions permitted on all resources
962
- @id("project-dev-full-access")
963
- @name("Dev project full IDE access")
964
- @description("Grant full IDE access to all resources within the dev project including tools, prompts, file operations, and server connections")
900
+ @id("organization.allow-dev-project")
901
+ @name("Permit dev project full access")
902
+ @description("Permits all actions on resources scoped to Project::\\"dev-project\\".")
965
903
  @severity("medium")
966
- @tags("rebac,project,dev,permissions,organization")
904
+ @tags("category:organization,scope:per-tool,posture:deny-default")
967
905
  permit (
968
906
  principal,
969
907
  action,
970
908
  resource in Overwatch::Project::"dev-project"
971
909
  );
972
910
 
973
- // Support Project: Read-only access - process prompts and read files only
974
- @id("project-support-read-only")
975
- @name("Support project read-only access")
976
- @description("Grant read-only access to support project resources limited to prompt processing and file reading")
911
+ @id("organization.allow-support-project-read")
912
+ @name("Permit support project read-only access")
913
+ @description("Permits process_prompt and read_file actions on resources scoped to Project::\\"support-project\\".")
977
914
  @severity("medium")
978
- @tags("rebac,project,support,read-only,organization")
915
+ @tags("category:organization,scope:per-tool,posture:deny-default")
979
916
  permit (
980
917
  principal,
981
918
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"read_file"],
982
919
  resource in Overwatch::Project::"support-project"
983
920
  );
984
921
  `;
985
- const OVERWATCH_ORG_AGENT_GUARDRAILS_CEDAR = `// Agent-Specific Guardrails
986
- // Apply per-agent security policies based on agent identity
987
- // Category: organization
988
- // Namespace: Overwatch
922
+ const OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR = `// =============================================================================
923
+ // Agent-Specific Guardrails
924
+ // =============================================================================
925
+ // Per-agent security policies applied based on the agent identity. Different
926
+ // agents have different risk profiles — these template rules cover Claude
927
+ // (injection focus) and Cursor (PII focus); customize the agent IDs for
928
+ // your deployment.
989
929
  //
990
- // Different agents have different risk profiles:
991
- // Claude Code → prompt injection detection
992
- // Cursor → PII leakage detection
930
+ // Context keys consumed:
931
+ // - detected_threats: Set<String>
932
+ // - threat_categories: Set<String>
933
+ //
934
+ // Category: agent-identity
935
+ // Namespace: Overwatch
936
+ // =============================================================================
993
937
 
994
- // Claude Code: Block prompt injection attempts
995
- @id("agent-claude-block-injection")
996
- @name("Claude Code injection guardrail")
997
- @description("Block prompt injection attempts specifically for Claude Code agent")
938
+ @id("agent-identity.claude-block-injection")
939
+ @name("Block injection on Claude agent")
940
+ @description("Blocks process_prompt for the Claude agent when detected_threats contains \\"prompt_injection\\".")
998
941
  @severity("critical")
999
- @tags("rebac,agent,claude,injection,guardrail,organization")
942
+ @tags("category:agent-identity,threat:injection,scope:per-agent,detection:rule,surface:process-prompt,owasp:llm01")
943
+ @reject_message("Prompt blocked: prompt injection detected for the Claude agent.")
1000
944
  forbid (
1001
945
  principal == Overwatch::Agent::"claude",
1002
946
  action == Overwatch::Action::"process_prompt",
1003
947
  resource
1004
948
  )
1005
949
  when {
1006
- context.detected_threats.contains("prompt_injection")
950
+ context has detected_threats && context.detected_threats.contains("prompt_injection")
1007
951
  };
1008
952
 
1009
- // Cursor: Block PII leakage
1010
- @id("agent-cursor-block-pii")
1011
- @name("Cursor PII guardrail")
1012
- @description("Block PII content in Cursor agent prompts to prevent data leakage")
953
+ @id("agent-identity.cursor-block-pii")
954
+ @name("Block PII on Cursor agent")
955
+ @description("Blocks process_prompt for the Cursor agent when threat_categories contains \\"pii\\".")
1013
956
  @severity("critical")
1014
- @tags("rebac,agent,cursor,pii,guardrail,organization")
957
+ @tags("category:agent-identity,threat:pii,scope:per-agent,detection:rule,surface:process-prompt,compliance:gdpr")
958
+ @reject_message("Prompt blocked: PII detected for the Cursor agent — prevents leakage through code agent prompts.")
1015
959
  forbid (
1016
960
  principal == Overwatch::Agent::"cursor",
1017
961
  action == Overwatch::Action::"process_prompt",
1018
962
  resource
1019
963
  )
1020
964
  when {
1021
- context.threat_categories.contains("pii")
965
+ context has threat_categories && context.threat_categories.contains("pii")
1022
966
  };
1023
967
  `;
1024
968
  // =============================================================================
1025
969
  // CATEGORIES
1026
970
  // =============================================================================
1027
971
  export const OVERWATCH_CATEGORIES = [
1028
- { id: 'secrets', name: 'Secrets Detection', description: 'Detect and block credentials, tokens, API keys, and sensitive key patterns in prompts, tool calls, and file operations' },
1029
- { id: 'pii', name: 'PII Detection', description: 'Detect and block personally identifiable information (PII) such as credit card numbers, SSNs, and other sensitive data' },
1030
- { id: 'semantic', name: 'Semantic Threat Detection', description: 'Detect and block injection attacks, prompt injection, jailbreak attempts, and unsafe content' },
1031
- { id: 'tools', name: 'Tool Permissioning', description: 'Control access to shell execution, file operations, MCP servers, and sensitive system paths' },
1032
- { id: 'organization', name: 'Organization Rules', description: 'Apply organization-wide policy baselines, team permissions, and agent-specific guardrails' },
972
+ { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block credential leakage and protect sensitive file paths.' },
973
+ { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across prompts, tool calls, and file operations.' },
974
+ { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block injection attacks (command, SQL, path traversal, encoded), prompt injection, and jailbreak attempts.' },
975
+ { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, hateful, sexual, criminal, or excessively profane content.' },
976
+ { id: 'tools', name: 'Tool Permissioning', description: 'Control shell execution, file operations, MCP servers, and sensitive system paths.' },
977
+ { id: 'agent-identity', name: 'Agent-Specific Guardrails', description: 'Per-agent security policies applied based on agent identity.' },
978
+ { id: 'organization', name: 'Organization', description: 'Organization-wide baselines, audit, and project-scoped permissions.' },
1033
979
  ];
1034
980
  // =============================================================================
1035
981
  // DEFAULT POLICIES
1036
982
  // =============================================================================
1037
983
  export const OVERWATCH_DEFAULTS = [
1038
984
  {
1039
- id: 'baseline-default',
985
+ id: 'organization.permit-baseline',
1040
986
  name: 'Baseline Permit',
1041
- description: 'Permits all actions by default threat-specific forbid policies override this when threats are detected',
987
+ description: 'Permits all actions by default; threat-specific forbid policies override this when detectors fire.',
1042
988
  category: 'organization',
1043
- cedarText: OVERWATCH_BASELINE_DEFAULT_CEDAR,
989
+ cedarText: OVERWATCH_ORGANIZATION_PERMIT_BASELINE_CEDAR,
1044
990
  severity: 'low',
1045
- tags: ['baseline', 'permit-default', 'organization'],
991
+ tags: ['category:organization', 'posture:permit-default'],
1046
992
  isActive: true,
1047
993
  },
1048
994
  ];
@@ -1051,104 +997,113 @@ export const OVERWATCH_DEFAULTS = [
1051
997
  // =============================================================================
1052
998
  export const OVERWATCH_TEMPLATES = [
1053
999
  {
1054
- id: 'baseline-default',
1000
+ id: 'organization.permit-baseline',
1055
1001
  name: 'Baseline Permit',
1056
- description: 'Permits all actions by default threat-specific forbid policies override this when threats are detected',
1002
+ description: 'Permits all actions by default; threat-specific forbid policies override this when detectors fire.',
1057
1003
  category: 'organization',
1058
- cedarText: OVERWATCH_BASELINE_DEFAULT_CEDAR,
1004
+ cedarText: OVERWATCH_ORGANIZATION_PERMIT_BASELINE_CEDAR,
1059
1005
  severity: 'low',
1060
- tags: ['baseline', 'permit-default', 'organization'],
1006
+ tags: ['category:organization', 'posture:permit-default'],
1061
1007
  autoDeploy: true,
1062
1008
  },
1063
1009
  {
1064
- id: 'secrets-default',
1010
+ id: 'data-protection.defaults',
1065
1011
  name: 'Secrets Detection',
1066
- description: 'Detect and block credential leakage (secrets_leakage, ssh_key_exposure, pem_file_access, environment_variable_leakage) and sensitive file path protection',
1067
- category: 'secrets',
1068
- cedarText: OVERWATCH_SECRETS_DEFAULT_CEDAR,
1012
+ description: 'Block credential leakage across prompts, tool calls, and file operations; SSH/PEM key blocks; env-var secrets; credential paths.',
1013
+ category: 'data-protection',
1014
+ cedarText: OVERWATCH_DATA_PROTECTION_DEFAULTS_CEDAR,
1069
1015
  severity: 'critical',
1070
- tags: ['secrets', 'credentials', 'aws', 'github', 'ssh', 'pem', 'baseline'],
1016
+ tags: ['category:data-protection', 'threat:secrets', 'owasp:llm06'],
1071
1017
  },
1072
1018
  {
1073
- id: 'semantic-default',
1019
+ id: 'semantic.defaults',
1074
1020
  name: 'Semantic Threat Detection',
1075
- description: 'Detect and block injection attacks (command, SQL, path traversal), prompt injection, jailbreak, and unsafe content (violence, hate speech, etc.)',
1021
+ description: 'Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.',
1076
1022
  category: 'semantic',
1077
- cedarText: OVERWATCH_SEMANTIC_DEFAULT_CEDAR,
1023
+ cedarText: OVERWATCH_SEMANTIC_DEFAULTS_CEDAR,
1024
+ severity: 'critical',
1025
+ tags: ['category:semantic', 'threat:injection', 'threat:jailbreak', 'owasp:llm01', 'owasp:llm02'],
1026
+ },
1027
+ {
1028
+ id: 'trust-safety.defaults',
1029
+ name: 'Content Safety',
1030
+ description: 'Block violent, hateful, sexual, criminal content plus excessive profanity using ML classifier scores.',
1031
+ category: 'trust-safety',
1032
+ cedarText: OVERWATCH_TRUST_SAFETY_DEFAULTS_CEDAR,
1078
1033
  severity: 'critical',
1079
- tags: ['injection', 'jailbreak', 'content-safety', 'ml', 'owasp-llm01', 'owasp-llm02', 'baseline'],
1034
+ tags: ['category:trust-safety', 'threat:harmful', 'compliance:eu-ai-act', 'compliance:iso-42001'],
1080
1035
  },
1081
1036
  {
1082
- id: 'tools-default',
1037
+ id: 'tools.defaults',
1083
1038
  name: 'Tool Permissioning',
1084
- description: 'Block access to sensitive system paths and tool calls with high-severity threats. Includes opt-in shell blocking and destructive operation blocking.',
1039
+ description: 'Block sensitive system paths and tool calls with high-severity threats; opt-in shell and destructive-op blocking.',
1085
1040
  category: 'tools',
1086
- cedarText: OVERWATCH_TOOLS_DEFAULT_CEDAR,
1087
- severity: 'high',
1088
- tags: ['tools', 'file-access', 'system-paths', 'severity', 'baseline'],
1041
+ cedarText: OVERWATCH_TOOLS_DEFAULTS_CEDAR,
1042
+ severity: 'critical',
1043
+ tags: ['category:tools', 'threat:command-injection', 'owasp:llm06'],
1089
1044
  },
1090
1045
  {
1091
- id: 'pii-default',
1046
+ id: 'privacy.defaults',
1092
1047
  name: 'PII Detection',
1093
- description: 'Detect and block credit card numbers, SSNs, health data, and other PII in prompts, tool calls, and file operations',
1094
- category: 'pii',
1095
- cedarText: OVERWATCH_PII_DEFAULT_CEDAR,
1048
+ description: 'Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.',
1049
+ category: 'privacy',
1050
+ cedarText: OVERWATCH_PRIVACY_DEFAULTS_CEDAR,
1096
1051
  severity: 'critical',
1097
- tags: ['pii', 'privacy', 'compliance', 'pci-dss', 'gdpr', 'hipaa', 'baseline'],
1052
+ tags: ['category:privacy', 'threat:pii', 'compliance:pci-dss', 'compliance:gdpr', 'compliance:hipaa'],
1098
1053
  },
1099
1054
  {
1100
- id: 'tools-mcp-allowlist',
1055
+ id: 'tools.mcp-server-allowlist',
1101
1056
  name: 'MCP Server Allowlist',
1102
- description: 'Only allow specific MCP servers to be used',
1057
+ description: 'Allow only specific MCP servers to be used; customize the allowlist.',
1103
1058
  category: 'tools',
1104
- cedarText: OVERWATCH_TOOLS_MCP_ALLOWLIST_CEDAR,
1059
+ cedarText: OVERWATCH_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR,
1105
1060
  severity: 'medium',
1106
- tags: ['mcp', 'allowlist', 'whitelist'],
1061
+ tags: ['category:tools', 'scope:org-wide', 'posture:deny-default'],
1107
1062
  },
1108
1063
  {
1109
- id: 'tools-mcp-tool-permissions',
1064
+ id: 'tools.mcp-tool-permissions',
1110
1065
  name: 'MCP Tool Permissions',
1111
- description: 'Permit every MCP call_tool by default. Ships two opt-in safety rails (block untrusted/deprecated servers, block unverified servers). Add forbid rules for per-tool or per-server gating.',
1066
+ description: 'Permit MCP call_tool by default plus two safety rails (org-wide exclusion, unverified server block).',
1112
1067
  category: 'tools',
1113
1068
  cedarText: OVERWATCH_TOOLS_MCP_TOOL_PERMISSIONS_CEDAR,
1114
- severity: 'low',
1115
- tags: ['mcp', 'tools', 'permit-default', 'exclusion'],
1069
+ severity: 'critical',
1070
+ tags: ['category:tools', 'threat:supply-chain', 'posture:permit-default'],
1116
1071
  },
1117
1072
  {
1118
- id: 'org-default-deny',
1073
+ id: 'organization.deny-baseline',
1119
1074
  name: 'Default Deny All',
1120
- description: 'Organization-wide baseline: deny all unless explicitly permitted',
1075
+ description: 'Organization-wide deny baseline; combine with scoped permit rules for deny-by-default posture.',
1121
1076
  category: 'organization',
1122
- cedarText: OVERWATCH_ORG_DEFAULT_DENY_CEDAR,
1077
+ cedarText: OVERWATCH_ORGANIZATION_DENY_BASELINE_CEDAR,
1123
1078
  severity: 'high',
1124
- tags: ['baseline', 'security', 'deny-by-default'],
1079
+ tags: ['category:organization', 'posture:deny-default', 'scope:org-wide'],
1125
1080
  },
1126
1081
  {
1127
- id: 'org-audit-all',
1082
+ id: 'organization.audit-all',
1128
1083
  name: 'Audit All Actions',
1129
- description: 'Log all agent actions for compliance and monitoring',
1084
+ description: 'Permit and audit all agent actions for compliance and monitoring.',
1130
1085
  category: 'organization',
1131
- cedarText: OVERWATCH_ORG_AUDIT_ALL_CEDAR,
1086
+ cedarText: OVERWATCH_ORGANIZATION_AUDIT_ALL_CEDAR,
1132
1087
  severity: 'low',
1133
- tags: ['audit', 'compliance', 'logging'],
1088
+ tags: ['category:organization', 'posture:permit-default', 'compliance:soc2'],
1134
1089
  },
1135
1090
  {
1136
- id: 'org-team-permissions',
1137
- name: 'Team-Based Permissions (ReBAC)',
1138
- description: 'Grant IDE access based on team membership using entity hierarchy - supports dev team full access and support team read-only',
1091
+ id: 'organization.team-permissions',
1092
+ name: 'Project-Based Permissions (ReBAC)',
1093
+ description: 'Grant IDE access based on project scope using Cedar entity hierarchy example dev/support project split.',
1139
1094
  category: 'organization',
1140
- cedarText: OVERWATCH_ORG_TEAM_PERMISSIONS_CEDAR,
1095
+ cedarText: OVERWATCH_ORGANIZATION_TEAM_PERMISSIONS_CEDAR,
1141
1096
  severity: 'medium',
1142
- tags: ['rebac', 'team', 'permissions', 'hierarchy'],
1097
+ tags: ['category:organization', 'scope:per-tool', 'posture:deny-default'],
1143
1098
  },
1144
1099
  {
1145
- id: 'org-agent-guardrails',
1100
+ id: 'agent-identity.agent-guardrails',
1146
1101
  name: 'Agent-Specific Guardrails',
1147
- description: 'Apply per-agent security guardrails - injection blocking for Claude, PII blocking for Cursor',
1148
- category: 'organization',
1149
- cedarText: OVERWATCH_ORG_AGENT_GUARDRAILS_CEDAR,
1102
+ description: 'Per-agent security guardrails injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.',
1103
+ category: 'agent-identity',
1104
+ cedarText: OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR,
1150
1105
  severity: 'critical',
1151
- tags: ['rebac', 'agent', 'guardrails', 'per-agent'],
1106
+ tags: ['category:agent-identity', 'scope:per-agent', 'threat:injection', 'threat:pii'],
1152
1107
  },
1153
1108
  ];
1154
1109
  // =============================================================================
@@ -1157,147 +1112,166 @@ export const OVERWATCH_TEMPLATES = [
1157
1112
  /** Raw templates.json metadata for the Overwatch service. */
1158
1113
  export const OVERWATCH_TEMPLATES_JSON = `{
1159
1114
  "service": "overwatch",
1160
- "version": "4.0.0",
1115
+ "version": "5.0.0",
1161
1116
  "description": "Overwatch policy templates for IDE agent security",
1162
1117
  "categories": [
1163
1118
  {
1164
- "id": "secrets",
1165
- "name": "Secrets Detection",
1166
- "description": "Detect and block credentials, tokens, API keys, and sensitive key patterns in prompts, tool calls, and file operations"
1119
+ "id": "data-protection",
1120
+ "name": "Secrets & Data Protection",
1121
+ "description": "Block credential leakage and protect sensitive file paths."
1167
1122
  },
1168
1123
  {
1169
- "id": "pii",
1124
+ "id": "privacy",
1170
1125
  "name": "PII Detection",
1171
- "description": "Detect and block personally identifiable information (PII) such as credit card numbers, SSNs, and other sensitive data"
1126
+ "description": "Block personally identifiable information across prompts, tool calls, and file operations."
1172
1127
  },
1173
1128
  {
1174
1129
  "id": "semantic",
1175
1130
  "name": "Semantic Threat Detection",
1176
- "description": "Detect and block injection attacks, prompt injection, jailbreak attempts, and unsafe content"
1131
+ "description": "Block injection attacks (command, SQL, path traversal, encoded), prompt injection, and jailbreak attempts."
1132
+ },
1133
+ {
1134
+ "id": "trust-safety",
1135
+ "name": "Content Safety",
1136
+ "description": "Block violent, hateful, sexual, criminal, or excessively profane content."
1177
1137
  },
1178
1138
  {
1179
1139
  "id": "tools",
1180
1140
  "name": "Tool Permissioning",
1181
- "description": "Control access to shell execution, file operations, MCP servers, and sensitive system paths"
1141
+ "description": "Control shell execution, file operations, MCP servers, and sensitive system paths."
1142
+ },
1143
+ {
1144
+ "id": "agent-identity",
1145
+ "name": "Agent-Specific Guardrails",
1146
+ "description": "Per-agent security policies applied based on agent identity."
1182
1147
  },
1183
1148
  {
1184
1149
  "id": "organization",
1185
- "name": "Organization Rules",
1186
- "description": "Apply organization-wide policy baselines, team permissions, and agent-specific guardrails"
1150
+ "name": "Organization",
1151
+ "description": "Organization-wide baselines, audit, and project-scoped permissions."
1187
1152
  }
1188
1153
  ],
1189
1154
  "defaults": [
1190
1155
  {
1191
- "id": "baseline-default",
1156
+ "id": "organization.permit-baseline",
1192
1157
  "name": "Baseline Permit",
1193
- "description": "Permits all actions by default threat-specific forbid policies override this when threats are detected",
1158
+ "description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
1194
1159
  "category": "organization",
1195
1160
  "file": "defaults/baseline.cedar",
1196
1161
  "severity": "low",
1197
- "tags": ["baseline", "permit-default", "organization"],
1162
+ "tags": ["category:organization", "posture:permit-default"],
1198
1163
  "is_active": true
1199
1164
  }
1200
1165
  ],
1201
1166
  "templates": [
1202
1167
  {
1203
- "id": "baseline-default",
1168
+ "id": "organization.permit-baseline",
1204
1169
  "name": "Baseline Permit",
1205
- "description": "Permits all actions by default threat-specific forbid policies override this when threats are detected",
1170
+ "description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
1206
1171
  "category": "organization",
1207
1172
  "file": "defaults/baseline.cedar",
1208
1173
  "severity": "low",
1209
- "tags": ["baseline", "permit-default", "organization"],
1174
+ "tags": ["category:organization", "posture:permit-default"],
1210
1175
  "auto_deploy": true
1211
1176
  },
1212
1177
  {
1213
- "id": "secrets-default",
1178
+ "id": "data-protection.defaults",
1214
1179
  "name": "Secrets Detection",
1215
- "description": "Detect and block credential leakage (secrets_leakage, ssh_key_exposure, pem_file_access, environment_variable_leakage) and sensitive file path protection",
1216
- "category": "secrets",
1180
+ "description": "Block credential leakage across prompts, tool calls, and file operations; SSH/PEM key blocks; env-var secrets; credential paths.",
1181
+ "category": "data-protection",
1217
1182
  "file": "defaults/secrets.cedar",
1218
1183
  "severity": "critical",
1219
- "tags": ["secrets", "credentials", "aws", "github", "ssh", "pem", "baseline"]
1184
+ "tags": ["category:data-protection", "threat:secrets", "owasp:llm06"]
1220
1185
  },
1221
1186
  {
1222
- "id": "semantic-default",
1187
+ "id": "semantic.defaults",
1223
1188
  "name": "Semantic Threat Detection",
1224
- "description": "Detect and block injection attacks (command, SQL, path traversal), prompt injection, jailbreak, and unsafe content (violence, hate speech, etc.)",
1189
+ "description": "Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.",
1225
1190
  "category": "semantic",
1226
1191
  "file": "defaults/semantic.cedar",
1227
1192
  "severity": "critical",
1228
- "tags": ["injection", "jailbreak", "content-safety", "ml", "owasp-llm01", "owasp-llm02", "baseline"]
1193
+ "tags": ["category:semantic", "threat:injection", "threat:jailbreak", "owasp:llm01", "owasp:llm02"]
1229
1194
  },
1230
1195
  {
1231
- "id": "tools-default",
1196
+ "id": "trust-safety.defaults",
1197
+ "name": "Content Safety",
1198
+ "description": "Block violent, hateful, sexual, criminal content plus excessive profanity using ML classifier scores.",
1199
+ "category": "trust-safety",
1200
+ "file": "defaults/content_safety.cedar",
1201
+ "severity": "critical",
1202
+ "tags": ["category:trust-safety", "threat:harmful", "compliance:eu-ai-act", "compliance:iso-42001"]
1203
+ },
1204
+ {
1205
+ "id": "tools.defaults",
1232
1206
  "name": "Tool Permissioning",
1233
- "description": "Block access to sensitive system paths and tool calls with high-severity threats. Includes opt-in shell blocking and destructive operation blocking.",
1207
+ "description": "Block sensitive system paths and tool calls with high-severity threats; opt-in shell and destructive-op blocking.",
1234
1208
  "category": "tools",
1235
1209
  "file": "defaults/tools.cedar",
1236
- "severity": "high",
1237
- "tags": ["tools", "file-access", "system-paths", "severity", "baseline"]
1210
+ "severity": "critical",
1211
+ "tags": ["category:tools", "threat:command-injection", "owasp:llm06"]
1238
1212
  },
1239
1213
  {
1240
- "id": "pii-default",
1214
+ "id": "privacy.defaults",
1241
1215
  "name": "PII Detection",
1242
- "description": "Detect and block credit card numbers, SSNs, health data, and other PII in prompts, tool calls, and file operations",
1243
- "category": "pii",
1216
+ "description": "Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.",
1217
+ "category": "privacy",
1244
1218
  "file": "defaults/pii.cedar",
1245
1219
  "severity": "critical",
1246
- "tags": ["pii", "privacy", "compliance", "pci-dss", "gdpr", "hipaa", "baseline"]
1220
+ "tags": ["category:privacy", "threat:pii", "compliance:pci-dss", "compliance:gdpr", "compliance:hipaa"]
1247
1221
  },
1248
1222
  {
1249
- "id": "tools-mcp-allowlist",
1223
+ "id": "tools.mcp-server-allowlist",
1250
1224
  "name": "MCP Server Allowlist",
1251
- "description": "Only allow specific MCP servers to be used",
1225
+ "description": "Allow only specific MCP servers to be used; customize the allowlist.",
1252
1226
  "category": "tools",
1253
1227
  "file": "mcp_server_allowlist.cedar",
1254
1228
  "severity": "medium",
1255
- "tags": ["mcp", "allowlist", "whitelist"]
1229
+ "tags": ["category:tools", "scope:org-wide", "posture:deny-default"]
1256
1230
  },
1257
1231
  {
1258
- "id": "tools-mcp-tool-permissions",
1232
+ "id": "tools.mcp-tool-permissions",
1259
1233
  "name": "MCP Tool Permissions",
1260
- "description": "Permit every MCP call_tool by default. Ships two opt-in safety rails (block untrusted/deprecated servers, block unverified servers). Add forbid rules for per-tool or per-server gating.",
1234
+ "description": "Permit MCP call_tool by default plus two safety rails (org-wide exclusion, unverified server block).",
1261
1235
  "category": "tools",
1262
1236
  "file": "mcp_tool_permissions.cedar",
1263
- "severity": "low",
1264
- "tags": ["mcp", "tools", "permit-default", "exclusion"]
1237
+ "severity": "critical",
1238
+ "tags": ["category:tools", "threat:supply-chain", "posture:permit-default"]
1265
1239
  },
1266
1240
  {
1267
- "id": "org-default-deny",
1241
+ "id": "organization.deny-baseline",
1268
1242
  "name": "Default Deny All",
1269
- "description": "Organization-wide baseline: deny all unless explicitly permitted",
1243
+ "description": "Organization-wide deny baseline; combine with scoped permit rules for deny-by-default posture.",
1270
1244
  "category": "organization",
1271
1245
  "file": "default_deny_all.cedar",
1272
1246
  "severity": "high",
1273
- "tags": ["baseline", "security", "deny-by-default"]
1247
+ "tags": ["category:organization", "posture:deny-default", "scope:org-wide"]
1274
1248
  },
1275
1249
  {
1276
- "id": "org-audit-all",
1250
+ "id": "organization.audit-all",
1277
1251
  "name": "Audit All Actions",
1278
- "description": "Log all agent actions for compliance and monitoring",
1252
+ "description": "Permit and audit all agent actions for compliance and monitoring.",
1279
1253
  "category": "organization",
1280
1254
  "file": "audit_all_actions.cedar",
1281
1255
  "severity": "low",
1282
- "tags": ["audit", "compliance", "logging"]
1256
+ "tags": ["category:organization", "posture:permit-default", "compliance:soc2"]
1283
1257
  },
1284
1258
  {
1285
- "id": "org-team-permissions",
1286
- "name": "Team-Based Permissions (ReBAC)",
1287
- "description": "Grant IDE access based on team membership using entity hierarchy - supports dev team full access and support team read-only",
1259
+ "id": "organization.team-permissions",
1260
+ "name": "Project-Based Permissions (ReBAC)",
1261
+ "description": "Grant IDE access based on project scope using Cedar entity hierarchy example dev/support project split.",
1288
1262
  "category": "organization",
1289
1263
  "file": "team_permissions.cedar",
1290
1264
  "severity": "medium",
1291
- "tags": ["rebac", "team", "permissions", "hierarchy"]
1265
+ "tags": ["category:organization", "scope:per-tool", "posture:deny-default"]
1292
1266
  },
1293
1267
  {
1294
- "id": "org-agent-guardrails",
1268
+ "id": "agent-identity.agent-guardrails",
1295
1269
  "name": "Agent-Specific Guardrails",
1296
- "description": "Apply per-agent security guardrails - injection blocking for Claude, PII blocking for Cursor",
1297
- "category": "organization",
1270
+ "description": "Per-agent security guardrails injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.",
1271
+ "category": "agent-identity",
1298
1272
  "file": "agent_guardrails.cedar",
1299
1273
  "severity": "critical",
1300
- "tags": ["rebac", "agent", "guardrails", "per-agent"]
1274
+ "tags": ["category:agent-identity", "scope:per-agent", "threat:injection", "threat:pii"]
1301
1275
  }
1302
1276
  ]
1303
1277
  }