@highflame/policy 2.1.36 → 2.1.38

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 +635 -595
  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,77 +157,75 @@ 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 a .env file or .env.<suffix> variant.")
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"],
208
181
  resource
209
182
  )
210
183
  when {
211
- context has path && context.path like "*.env*"
184
+ context has path &&
185
+ (
186
+ context.path like "*.env" ||
187
+ context.path like "*.env.*"
188
+ )
212
189
  };
213
190
  `;
214
- const OVERWATCH_SEMANTIC_DEFAULT_CEDAR = `// =============================================================================
215
- // Semantic Threat Detection Policy (Default)
191
+ const OVERWATCH_SEMANTIC_DEFAULTS_CEDAR = `// =============================================================================
192
+ // Semantic Threat Detection (Default)
216
193
  // =============================================================================
217
- // Detects and blocks injection attacks, prompt injection, jailbreak attempts,
218
- // and unsafe content using multi-layered detection:
194
+ // Blocks injection attacks (command, SQL, path traversal), prompt injection,
195
+ // jailbreak attempts, and encoded payloads using two detection tiers:
219
196
  //
220
- // Tier 1 — Pattern-based detection (always available, no external dependency):
197
+ // Tier 1 — Pattern-based (always available, no external dependency)
221
198
  // command_injection, sql_injection, path_traversal, detect_encoded
222
199
  //
223
- // Tier 2 — Injection and jailbreak classifiers (require Highflame API token):
224
- // injection_confidence, jailbreak_confidence
200
+ // Tier 2 — ML classifiers (require Highflame API token)
201
+ // injection_score, jailbreak_score
225
202
  //
226
- // Tier 3 — Content safety scores (require Highflame API token):
227
- // violence, weapons, hate_speech, crime, sexual, profanity
203
+ // Content-safety rules (violence, hate, sexual, etc.) live in content_safety.cedar.
228
204
  //
205
+ // Context keys consumed:
206
+ // - detected_threats: Set<String>
207
+ // - injection_score: Long (0-100)
208
+ // - jailbreak_score: Long (0-100)
229
209
  //
230
210
  // 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)
211
+ // - OWASP LLM01, LLM02; OWASP ASI01, ASI02
212
+ // - MITRE ATLAS AML.T0051, AML.T0054; MITRE ATT&CK T1059, T1005
213
+ // - NIST 800-53 SI-3, SI-4
240
214
  //
241
- // Category: semantic
215
+ // Category: semantic
242
216
  // Namespace: Overwatch
243
217
  // =============================================================================
244
218
 
245
-
246
219
  // ---------------------------------------------------------------------------
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.
220
+ // Tier 1: Pattern-based injection detection
250
221
  // ---------------------------------------------------------------------------
251
222
 
252
- // Block command injection in tool calls
253
- @id("semantic-block-command-injection-tool")
223
+ @id("semantic.block-command-injection-tool")
254
224
  @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).")
225
+ @description("Blocks call_tool when detected_threats contains \\"command_injection\\".")
256
226
  @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.")
227
+ @tags("category:semantic,threat:command-injection,detection:pattern,surface:call-tool,mitre:t1059,owasp:asi02")
228
+ @reject_message("Tool execution blocked: command injection pattern detected — reverse shell, destructive command, or privilege escalation.")
259
229
  forbid (
260
230
  principal,
261
231
  action == Overwatch::Action::"call_tool",
@@ -265,29 +235,27 @@ when {
265
235
  context has detected_threats && context.detected_threats.contains("command_injection")
266
236
  };
267
237
 
268
- // Block command injection in prompts
269
- @id("semantic-block-command-injection-prompt")
238
+ @id("semantic.block-command-injection-prompt")
270
239
  @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.")
240
+ @description("Blocks process_prompt when detected_threats contains \\"command_injection\\".")
272
241
  @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.")
242
+ @tags("category:semantic,threat:command-injection,detection:pattern,surface:process-prompt,mitre:t1059")
243
+ @reject_message("Prompt blocked: command injection pattern detected.")
275
244
  forbid (
276
245
  principal,
277
246
  action == Overwatch::Action::"process_prompt",
278
247
  resource
279
248
  )
280
249
  when {
281
- context.detected_threats.contains("command_injection")
250
+ context has detected_threats && context.detected_threats.contains("command_injection")
282
251
  };
283
252
 
284
- // Block SQL injection in tool calls
285
- @id("semantic-block-sql-injection-tool")
253
+ @id("semantic.block-sql-injection-tool")
286
254
  @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).")
255
+ @description("Blocks call_tool when detected_threats contains \\"sql_injection\\".")
288
256
  @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.")
257
+ @tags("category:semantic,threat:sql-injection,detection:pattern,surface:call-tool")
258
+ @reject_message("Tool execution blocked: SQL injection pattern detected — tautology, UNION attack, or destructive query.")
291
259
  forbid (
292
260
  principal,
293
261
  action == Overwatch::Action::"call_tool",
@@ -297,12 +265,11 @@ when {
297
265
  context has detected_threats && context.detected_threats.contains("sql_injection")
298
266
  };
299
267
 
300
- // Block SQL injection in prompts
301
- @id("semantic-block-sql-injection-prompt")
268
+ @id("semantic.block-sql-injection-prompt")
302
269
  @name("Block SQL injection in prompts")
303
- @description("Block prompts when SQL injection patterns are detected.")
270
+ @description("Blocks process_prompt when detected_threats contains \\"sql_injection\\".")
304
271
  @severity("high")
305
- @tags("sql-injection,process-prompt,database")
272
+ @tags("category:semantic,threat:sql-injection,detection:pattern,surface:process-prompt")
306
273
  @reject_message("Prompt blocked: SQL injection pattern detected.")
307
274
  forbid (
308
275
  principal,
@@ -310,16 +277,15 @@ forbid (
310
277
  resource
311
278
  )
312
279
  when {
313
- context.detected_threats.contains("sql_injection")
280
+ context has detected_threats && context.detected_threats.contains("sql_injection")
314
281
  };
315
282
 
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.")
283
+ @id("semantic.block-path-traversal")
284
+ @name("Block path traversal")
285
+ @description("Blocks call_tool, read_file, and write_file when detected_threats contains \\"path_traversal\\".")
320
286
  @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.")
287
+ @tags("category:semantic,threat:path-traversal,detection:pattern,mitre:t1005")
288
+ @reject_message("Request blocked: path traversal pattern detected — sensitive system files or deep directory traversal.")
323
289
  forbid (
324
290
  principal,
325
291
  action in [Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -329,13 +295,12 @@ when {
329
295
  context has detected_threats && context.detected_threats.contains("path_traversal")
330
296
  };
331
297
 
332
- // Block encoded/obfuscated payloads in tool calls
333
- @id("semantic-block-encoded")
298
+ @id("semantic.block-encoded")
334
299
  @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.")
300
+ @description("Blocks call_tool when detected_threats contains \\"detect_encoded\\".")
336
301
  @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.")
302
+ @tags("category:semantic,threat:encoded-payload,detection:pattern,surface:call-tool")
303
+ @reject_message("Tool execution blocked: encoded or obfuscated payload detected (base64 or hash IOCs in tool arguments).")
339
304
  forbid (
340
305
  principal,
341
306
  action == Overwatch::Action::"call_tool",
@@ -345,60 +310,68 @@ when {
345
310
  context has detected_threats && context.detected_threats.contains("detect_encoded")
346
311
  };
347
312
 
348
-
349
313
  // ---------------------------------------------------------------------------
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).
314
+ // Tier 2: ML classifier detection
353
315
  // ---------------------------------------------------------------------------
354
316
 
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.")
317
+ @id("semantic.block-injection-ml")
318
+ @name("Block injection (ML)")
319
+ @description("Blocks process_prompt and call_tool when injection_score >= 75.")
359
320
  @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.")
321
+ @tags("category:semantic,threat:injection,detection:ml,owasp:llm01,mitre:atlas-t0051")
322
+ @reject_message("Request blocked: prompt injection detected by ML classifier with high confidence.")
362
323
  forbid (
363
324
  principal,
364
325
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
365
326
  resource
366
327
  )
367
328
  when {
368
- context has injection_confidence && context.injection_confidence >= 75
329
+ context has injection_score && context.injection_score >= 75
369
330
  };
370
331
 
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.")
332
+ @id("semantic.block-jailbreak-ml")
333
+ @name("Block jailbreak (ML)")
334
+ @description("Blocks process_prompt and call_tool when jailbreak_score >= 75.")
375
335
  @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.")
336
+ @tags("category:semantic,threat:jailbreak,detection:ml,owasp:llm02,mitre:atlas-t0054")
337
+ @reject_message("Request blocked: jailbreak attempt detected by ML classifier with high confidence.")
378
338
  forbid (
379
339
  principal,
380
340
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
381
341
  resource
382
342
  )
383
343
  when {
384
- context has jailbreak_confidence && context.jailbreak_confidence >= 75
344
+ context has jailbreak_score && context.jailbreak_score >= 75
385
345
  };
346
+ `;
347
+ const OVERWATCH_TRUST_SAFETY_DEFAULTS_CEDAR = `// =============================================================================
348
+ // Content Safety (Default)
349
+ // =============================================================================
350
+ // Blocks unsafe content using ML classifier scores: violence, weapons, hate
351
+ // speech, criminal activity, sexual content, and excessive profanity.
352
+ //
353
+ // Thresholds:
354
+ // - violence, weapons, sexual, crime: >= 80 (critical/high)
355
+ // - hate_speech: >= 75 (lower threshold, zero tolerance)
356
+ // - profanity: >= 90 (higher threshold, allows normal expression)
357
+ //
358
+ // Context keys consumed:
359
+ // - violence_score, weapons_score, hate_speech_score: Long (0-100)
360
+ // - crime_score, sexual_score, profanity_score: Long (0-100)
361
+ //
362
+ // Compliance:
363
+ // - NIST 800-53 SI-4; ISO 42001; EU AI Act Art. 52
364
+ //
365
+ // Category: trust-safety
366
+ // Namespace: Overwatch
367
+ // =============================================================================
386
368
 
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")
369
+ @id("trust-safety.block-violence")
397
370
  @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.")
371
+ @description("Blocks process_prompt and call_tool when violence_score >= 80.")
399
372
  @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.")
373
+ @tags("category:trust-safety,threat:violence,detection:ml,compliance:nist-si-4,compliance:iso-42001")
374
+ @reject_message("Content blocked: violent content detected.")
402
375
  forbid (
403
376
  principal,
404
377
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -408,13 +381,12 @@ when {
408
381
  context has violence_score && context.violence_score >= 80
409
382
  };
410
383
 
411
- // Block weapons content
412
- @id("semantic-block-weapons")
384
+ @id("trust-safety.block-weapons")
413
385
  @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.")
386
+ @description("Blocks process_prompt and call_tool when weapons_score >= 80.")
415
387
  @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.")
388
+ @tags("category:trust-safety,threat:weapons,detection:ml,compliance:nist-si-4")
389
+ @reject_message("Content blocked: weapons-related content detected (manufacturing, procurement, or specifications).")
418
390
  forbid (
419
391
  principal,
420
392
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -424,13 +396,12 @@ when {
424
396
  context has weapons_score && context.weapons_score >= 80
425
397
  };
426
398
 
427
- // Block hate speech (lower threshold — zero tolerance)
428
- @id("semantic-block-hate-speech")
399
+ @id("trust-safety.block-hate-speech")
429
400
  @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.")
401
+ @description("Blocks process_prompt and call_tool when hate_speech_score >= 75.")
431
402
  @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.")
403
+ @tags("category:trust-safety,threat:hate-speech,detection:ml,compliance:nist-si-4,compliance:eu-ai-act")
404
+ @reject_message("Content blocked: hate speech or discriminatory content detected.")
434
405
  forbid (
435
406
  principal,
436
407
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -440,13 +411,12 @@ when {
440
411
  context has hate_speech_score && context.hate_speech_score >= 75
441
412
  };
442
413
 
443
- // Block criminal content
444
- @id("semantic-block-crime")
414
+ @id("trust-safety.block-crime")
445
415
  @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.")
416
+ @description("Blocks process_prompt and call_tool when crime_score >= 80.")
447
417
  @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.")
418
+ @tags("category:trust-safety,threat:crime,detection:ml,compliance:nist-si-4")
419
+ @reject_message("Content blocked: criminal activity content detected (illegal activity, fraud, or related).")
450
420
  forbid (
451
421
  principal,
452
422
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -456,13 +426,12 @@ when {
456
426
  context has crime_score && context.crime_score >= 80
457
427
  };
458
428
 
459
- // Block sexual content
460
- @id("semantic-block-sexual")
429
+ @id("trust-safety.block-sexual")
461
430
  @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.")
431
+ @description("Blocks process_prompt and call_tool when sexual_score >= 80.")
463
432
  @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.")
433
+ @tags("category:trust-safety,threat:sexual,detection:ml,compliance:eu-ai-act,compliance:iso-42001")
434
+ @reject_message("Content blocked: sexually explicit content detected.")
466
435
  forbid (
467
436
  principal,
468
437
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -472,13 +441,12 @@ when {
472
441
  context has sexual_score && context.sexual_score >= 80
473
442
  };
474
443
 
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.")
444
+ @id("trust-safety.block-profanity")
445
+ @name("Block excessive profanity")
446
+ @description("Blocks process_prompt and call_tool when profanity_score >= 90.")
479
447
  @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.")
448
+ @tags("category:trust-safety,threat:profanity,detection:ml")
449
+ @reject_message("Content blocked: excessive profanity detected please rephrase in professional language.")
482
450
  forbid (
483
451
  principal,
484
452
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -488,79 +456,66 @@ when {
488
456
  context has profanity_score && context.profanity_score >= 90
489
457
  };
490
458
  `;
491
- const OVERWATCH_TOOLS_DEFAULT_CEDAR = `// =============================================================================
492
- // Tool Permissioning Policy (Default)
459
+ const OVERWATCH_TOOLS_DEFAULTS_CEDAR = `// =============================================================================
460
+ // Tool Permissioning (Default)
493
461
  // =============================================================================
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)
462
+ // Sensitive system-path file access and destructive MCP file-operation
463
+ // blocking. Shell-execution blocking lives in tools_shell_block.cedar as a
464
+ // separate opt-in template and is not bundled with this default.
501
465
  //
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.
466
+ // Context keys consumed:
467
+ // - path: String
468
+ // - tool_name: String
505
469
  //
506
470
  // 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)
471
+ // - NIST 800-53 AC-3, AC-6, CM-7
472
+ // - OWASP ASI02; MITRE ATT&CK T1005
514
473
  //
515
- // Category: tools
474
+ // Category: tools
516
475
  // Namespace: Overwatch
517
476
  // =============================================================================
518
477
 
519
478
  // ---------------------------------------------------------------------------
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
479
+ // Section 1: Sensitive system paths
525
480
  // ---------------------------------------------------------------------------
526
481
 
527
- // Block shell and command execution tools
528
- @id("tools-block-shell")
529
- @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.")
531
- @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.")
482
+ @id("tools.block-system-paths")
483
+ @name("Block system directory access")
484
+ @description("Blocks read_file and write_file when path matches a sensitive Linux or macOS system directory.")
485
+ @severity("high")
486
+ @tags("category:tools,threat:path-traversal,detection:pattern,mitre:t1005")
487
+ @reject_message("File access blocked: sensitive system directory targeted (/etc, /proc, /sys, /root, /var, /System, /Library, /private).")
534
488
  forbid (
535
489
  principal,
536
- action == Overwatch::Action::"call_tool",
490
+ action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
537
491
  resource
538
492
  )
539
493
  when {
540
- 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")
494
+ context has path &&
495
+ (
496
+ context.path like "/etc/*" ||
497
+ context.path like "/proc/*" ||
498
+ context.path like "/sys/*" ||
499
+ context.path like "/root/*" ||
500
+ context.path like "/var/log/*" ||
501
+ context.path like "/var/run/*" ||
502
+ context.path like "/private/etc/*" ||
503
+ context.path like "/private/var/*" ||
504
+ context.path like "/Library/*" ||
505
+ context.path like "/System/*"
506
+ )
547
507
  };
548
508
 
549
509
  // ---------------------------------------------------------------------------
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.
510
+ // Section 2: Destructive MCP file operations
555
511
  // ---------------------------------------------------------------------------
556
512
 
557
- // Block destructive file operations
558
- @id("tools-block-destructive-ops")
513
+ @id("tools.block-destructive-ops")
559
514
  @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.")
515
+ @description("Blocks call_tool when tool_name is a destructive MCP file operation.")
561
516
  @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.")
517
+ @tags("category:tools,detection:rule,surface:call-tool,owasp:asi02")
518
+ @reject_message("Tool execution blocked: destructive file operations (delete, rmdir, unlink) require explicit human approval.")
564
519
  forbid (
565
520
  principal,
566
521
  action == Overwatch::Action::"call_tool",
@@ -568,113 +523,92 @@ forbid (
568
523
  )
569
524
  when {
570
525
  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")
577
- };
578
-
579
- // ---------------------------------------------------------------------------
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
586
- // ---------------------------------------------------------------------------
587
-
588
- // Block access to system directories
589
- @id("tools-block-system-paths")
590
- @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.")
592
- @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.")
595
- forbid (
596
- principal,
597
- action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
598
- resource
599
- )
600
- when {
601
- 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/*")
526
+ (
527
+ context.tool_name == "fs.delete" ||
528
+ context.tool_name == "fs.rmdir" ||
529
+ context.tool_name == "fs.unlink" ||
530
+ context.tool_name == "fs.remove" ||
531
+ context.tool_name == "delete_file" ||
532
+ context.tool_name == "remove_directory"
533
+ )
612
534
  };
535
+ `;
536
+ const OVERWATCH_TOOLS_BLOCK_SHELL_CEDAR = `// =============================================================================
537
+ // Tool Permissioning — Shell execution block (Opt-in)
538
+ // =============================================================================
539
+ // Blocks shell and command execution tools. Inactive unless explicitly enabled
540
+ // because it blocks ALL shell access (including safe commands like git and
541
+ // echo). Intended for high-security environments where shell access is
542
+ // prohibited.
543
+ //
544
+ // Context keys consumed:
545
+ // - tool_name: String
546
+ //
547
+ // Compliance:
548
+ // - NIST 800-53 CM-7; OWASP LLM06; MITRE ATT&CK T1059
549
+ //
550
+ // Category: tools
551
+ // Namespace: Overwatch
552
+ // =============================================================================
613
553
 
614
- // ---------------------------------------------------------------------------
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.
620
- // ---------------------------------------------------------------------------
621
-
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.")
626
- @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.")
554
+ @id("tools.block-shell")
555
+ @name("Block shell and command execution")
556
+ @description("Blocks call_tool when tool_name is shell, bash, sh, terminal, cmd, or powershell.")
557
+ @severity("critical")
558
+ @tags("category:tools,threat:command-injection,detection:rule,surface:call-tool,owasp:llm06,mitre:t1059")
559
+ @reject_message("Tool execution blocked: shell/command execution is restricted in this environment.")
629
560
  forbid (
630
561
  principal,
631
562
  action == Overwatch::Action::"call_tool",
632
563
  resource
633
564
  )
634
565
  when {
635
- context has max_threat_severity && context.max_threat_severity >= 3
566
+ context has tool_name &&
567
+ (
568
+ context.tool_name == "shell" ||
569
+ context.tool_name == "bash" ||
570
+ context.tool_name == "sh" ||
571
+ context.tool_name == "terminal" ||
572
+ context.tool_name == "cmd" ||
573
+ context.tool_name == "powershell"
574
+ )
636
575
  };
637
576
  `;
638
- const OVERWATCH_PII_DEFAULT_CEDAR = `// =============================================================================
639
- // PII Detection Policy (Default)
577
+ const OVERWATCH_PRIVACY_DEFAULTS_CEDAR = `// =============================================================================
578
+ // PII Detection (Default)
640
579
  // =============================================================================
641
- // Detects and blocks personally identifiable information across prompts, tool
642
- // calls, and file operations using Shield's PII detector context keys.
580
+ // Blocks personally identifiable information across prompts, tool calls, and
581
+ // file operations using Shield's PII detector context keys.
643
582
  //
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
583
+ // Severity tiers:
584
+ // - Critical: SSN, credit card
585
+ // - High: passport, IBAN
586
+ // - Medium: email, phone, date of birth
587
+ // - Low: IP address (prompt only)
649
588
  //
650
- // Policies reference pii_types directly for per-type granularity. This works
651
- // with both built-in and user-configured PII types (via ConfigReloader).
589
+ // Context keys consumed:
590
+ // - pii_detected: Bool
591
+ // - pii_types: Set<String>
592
+ // - pii_count: Long
652
593
  //
653
594
  // 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)
595
+ // - PCI DSS 3.4/4.1, GDPR Art. 32, HIPAA §164.312, CCPA §1798.150
596
+ // - NIST 800-53 SI-4; OWASP LLM06
660
597
  //
661
- // Category: pii
598
+ // Category: privacy
662
599
  // Namespace: Overwatch
663
600
  // =============================================================================
664
601
 
665
602
  // ---------------------------------------------------------------------------
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).
603
+ // Section 1: Critical PII (SSN, credit card)
669
604
  // ---------------------------------------------------------------------------
670
605
 
671
- // Block Social Security Numbers
672
- @id("pii-block-ssn")
606
+ @id("privacy.block-ssn")
673
607
  @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.")
608
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"ssn\\".")
675
609
  @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.")
610
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss,compliance:gdpr")
611
+ @reject_message("Content blocked: Social Security Number patterns detected.")
678
612
  forbid (
679
613
  principal,
680
614
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -684,13 +618,12 @@ when {
684
618
  context has pii_types && context.pii_types.contains("ssn")
685
619
  };
686
620
 
687
- // Block credit card numbers (PCI DSS compliance)
688
- @id("pii-block-credit-card")
621
+ @id("privacy.block-credit-card")
689
622
  @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.")
623
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"credit_card\\".")
691
624
  @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.")
625
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss")
626
+ @reject_message("Content blocked: credit card number patterns detected PCI DSS prohibits raw PAN handling.")
694
627
  forbid (
695
628
  principal,
696
629
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -701,18 +634,15 @@ when {
701
634
  };
702
635
 
703
636
  // ---------------------------------------------------------------------------
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.
637
+ // Section 2: High PII (passport, IBAN)
707
638
  // ---------------------------------------------------------------------------
708
639
 
709
- // Block passport numbers
710
- @id("pii-block-passport")
640
+ @id("privacy.block-passport")
711
641
  @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.")
642
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"passport\\".")
713
643
  @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.")
644
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
645
+ @reject_message("Content blocked: passport number patterns detected.")
716
646
  forbid (
717
647
  principal,
718
648
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -722,13 +652,12 @@ when {
722
652
  context has pii_types && context.pii_types.contains("passport")
723
653
  };
724
654
 
725
- // Block IBAN (International Bank Account Numbers)
726
- @id("pii-block-iban")
655
+ @id("privacy.block-iban")
727
656
  @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.")
657
+ @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"iban\\".")
729
658
  @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.")
659
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr,compliance:pci-dss")
660
+ @reject_message("Content blocked: IBAN / bank account number patterns detected.")
732
661
  forbid (
733
662
  principal,
734
663
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
@@ -739,18 +668,15 @@ when {
739
668
  };
740
669
 
741
670
  // ---------------------------------------------------------------------------
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).
671
+ // Section 3: Medium PII (contact info)
745
672
  // ---------------------------------------------------------------------------
746
673
 
747
- // Block email addresses
748
- @id("pii-block-email")
674
+ @id("privacy.block-email")
749
675
  @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.")
676
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"email\\".")
751
677
  @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.")
678
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
679
+ @reject_message("Content blocked: email address patterns detected.")
754
680
  forbid (
755
681
  principal,
756
682
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -760,13 +686,12 @@ when {
760
686
  context has pii_types && context.pii_types.contains("email")
761
687
  };
762
688
 
763
- // Block US phone numbers
764
- @id("pii-block-phone")
689
+ @id("privacy.block-phone")
765
690
  @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.")
691
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"phone\\".")
767
692
  @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.")
693
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
694
+ @reject_message("Content blocked: phone number patterns detected.")
770
695
  forbid (
771
696
  principal,
772
697
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -776,13 +701,12 @@ when {
776
701
  context has pii_types && context.pii_types.contains("phone")
777
702
  };
778
703
 
779
- // Block dates of birth
780
- @id("pii-block-dob")
704
+ @id("privacy.block-dob")
781
705
  @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.")
706
+ @description("Blocks process_prompt and call_tool when pii_types contains \\"date_of_birth\\".")
783
707
  @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.")
708
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:hipaa")
709
+ @reject_message("Content blocked: date of birth patterns detected.")
786
710
  forbid (
787
711
  principal,
788
712
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
@@ -793,18 +717,15 @@ when {
793
717
  };
794
718
 
795
719
  // ---------------------------------------------------------------------------
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.
720
+ // Section 4: Low PII (IP addresses, prompts only)
799
721
  // ---------------------------------------------------------------------------
800
722
 
801
- // Block IP addresses in prompts
802
- @id("pii-block-ip-address")
723
+ @id("privacy.block-ip-address")
803
724
  @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.")
725
+ @description("Blocks process_prompt when pii_types contains \\"ip_address\\".")
805
726
  @severity("low")
806
- @tags("pii,ip-address,network")
807
- @reject_message("Content blocked: IP address patterns detected in prompt. Remove network identifiers before submitting.")
727
+ @tags("category:privacy,threat:pii,detection:pattern,surface:process-prompt")
728
+ @reject_message("Prompt blocked: IP address patterns detected.")
808
729
  forbid (
809
730
  principal,
810
731
  action == Overwatch::Action::"process_prompt",
@@ -814,18 +735,24 @@ when {
814
735
  context has pii_types && context.pii_types.contains("ip_address")
815
736
  };
816
737
  `;
817
- const OVERWATCH_TOOLS_MCP_ALLOWLIST_CEDAR = `// MCP Server Allowlist Template
818
- // Only allow specific MCP servers to be used
819
- // Category: tools
738
+ const OVERWATCH_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR = `// =============================================================================
739
+ // MCP Server Allowlist
740
+ // =============================================================================
741
+ // Restricts MCP server connections to a pre-approved list. Customize the
742
+ // \`context.mcp_server\` values in the permit rule to match allowed servers.
743
+ //
744
+ // Context keys consumed:
745
+ // - mcp_server: String
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
+ // Category: tools
748
+ // Namespace: Overwatch
749
+ // =============================================================================
823
750
 
824
- @id("mcp-allowlist-permit")
825
- @name("Allow specific MCP servers")
826
- @description("Only allow connections to pre-approved MCP servers (customize the list)")
751
+ @id("tools.allow-mcp-allowlist")
752
+ @name("Allow allowlisted MCP servers")
753
+ @description("Permits connect_server when mcp_server is in the allowlist.")
827
754
  @severity("medium")
828
- @tags("mcp,allowlist,server,governance")
755
+ @tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
829
756
  permit (
830
757
  principal,
831
758
  action == Overwatch::Action::"connect_server",
@@ -833,15 +760,15 @@ permit (
833
760
  )
834
761
  when {
835
762
  context has mcp_server &&
836
- (context.mcp_server == "filesystem" ||
837
- context.mcp_server == "playwright")
763
+ (context.mcp_server == "filesystem" || context.mcp_server == "playwright")
838
764
  };
839
765
 
840
- @id("mcp-allowlist-deny")
841
- @name("Deny unallowed MCP servers")
842
- @description("Block all MCP server connections not in the allowlist")
766
+ @id("tools.deny-non-allowlisted-mcp")
767
+ @name("Block non-allowlisted MCP servers")
768
+ @description("Blocks connect_server unconditionally so only the allowlist permit applies.")
843
769
  @severity("medium")
844
- @tags("mcp,deny-default,server")
770
+ @tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
771
+ @reject_message("MCP server connection blocked: server is not on the allowlist.")
845
772
  forbid (
846
773
  principal,
847
774
  action == Overwatch::Action::"connect_server",
@@ -849,200 +776,216 @@ forbid (
849
776
  );
850
777
  `;
851
778
  const OVERWATCH_TOOLS_MCP_TOOL_PERMISSIONS_CEDAR = `// =============================================================================
852
- // MCP Tool Permissions Template (Overwatch)
779
+ // MCP Tool Permissions
853
780
  // =============================================================================
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.
781
+ // Per-tool access control for MCP servers. Permit-all by default plus two
782
+ // opt-in safety rails (exclude untrusted servers, block unverified servers).
783
+ // Add additional forbid rules to gate specific server/tool combinations.
857
784
  //
858
- // Defaults to permit-all. Customize per-tool gating by adding forbid rules
859
- // scoped to specific mcp_server / tool_name combinations.
785
+ // Context keys consumed:
786
+ // - mcp_server: String
787
+ // - mcp_server_verified: Bool
860
788
  //
861
- // Category: tools
789
+ // Category: tools
862
790
  // Namespace: Overwatch
863
791
  // =============================================================================
864
792
 
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.")
793
+ @id("tools.allow-mcp-tools-baseline")
794
+ @name("Permit MCP tool calls")
795
+ @description("Permits all call_tool actions; combine with forbid rules for gating.")
870
796
  @severity("low")
871
- @tags("mcp,permit-default")
797
+ @tags("category:tools,surface:call-tool,posture:permit-default")
872
798
  permit (
873
799
  principal,
874
800
  action == Overwatch::Action::"call_tool",
875
801
  resource
876
802
  );
877
803
 
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)")
804
+ @id("tools.exclude-mcp-servers")
805
+ @name("Block excluded MCP servers")
806
+ @description("Blocks call_tool when mcp_server is in the org-wide exclusion list.")
883
807
  @severity("critical")
884
- @tags("mcp,exclusion,org-wide,block")
808
+ @tags("category:tools,surface:call-tool,scope:org-wide,posture:deny-default")
809
+ @reject_message("Tool execution blocked: MCP server is on the org-wide exclusion list.")
885
810
  forbid (
886
811
  principal,
887
812
  action == Overwatch::Action::"call_tool",
888
813
  resource
889
- ) when {
890
- // Add server names to block across the organization.
891
- // Modify this list to match your exclusion requirements.
814
+ )
815
+ when {
892
816
  context has mcp_server &&
893
- (context.mcp_server == "untrusted-server" ||
894
- context.mcp_server == "deprecated-server")
817
+ (context.mcp_server == "untrusted-server" || context.mcp_server == "deprecated-server")
895
818
  };
896
819
 
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")
820
+ @id("tools.block-unverified-mcp-tools")
821
+ @name("Block unverified MCP server tools")
822
+ @description("Blocks call_tool when mcp_server_verified is false.")
902
823
  @severity("high")
903
- @tags("mcp,trust,verification")
824
+ @tags("category:tools,threat:supply-chain,detection:rule,surface:call-tool")
825
+ @reject_message("Tool execution blocked: MCP server is not from a verified registry.")
904
826
  forbid (
905
827
  principal,
906
828
  action == Overwatch::Action::"call_tool",
907
829
  resource
908
- ) when {
830
+ )
831
+ when {
909
832
  context has mcp_server_verified && context.mcp_server_verified == false
910
833
  };
911
834
  `;
912
- const OVERWATCH_ORG_DEFAULT_DENY_CEDAR = `// Default Deny All Template
913
- // Organization-wide baseline: deny all unless explicitly permitted
914
- // Category: organization
835
+ const OVERWATCH_ORGANIZATION_DENY_BASELINE_CEDAR = `// =============================================================================
836
+ // Default Deny All
837
+ // =============================================================================
838
+ // Org-wide baseline that blocks everything unless explicitly permitted by
839
+ // other policies. Pair with scoped permit rules (e.g. team_permissions) for
840
+ // a deny-by-default posture.
841
+ //
842
+ // Category: organization
843
+ // Namespace: Overwatch
844
+ // =============================================================================
915
845
 
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")
846
+ @id("organization.deny-baseline")
847
+ @name("Block all actions (deny baseline)")
848
+ @description("Blocks all actions; pair with scoped permit rules for a deny-by-default posture.")
919
849
  @severity("high")
920
- @tags("baseline,security,deny-by-default,organization")
850
+ @tags("category:organization,posture:deny-default,scope:org-wide")
851
+ @reject_message("Request blocked: this organization uses a deny-by-default baseline — only explicitly permitted actions are allowed.")
921
852
  forbid (
922
853
  principal,
923
854
  action,
924
855
  resource
925
856
  );
926
857
  `;
927
- const OVERWATCH_ORG_AUDIT_ALL_CEDAR = `// Audit All Actions Template
928
- // Log all agent actions for compliance and monitoring
929
- // Category: organization
858
+ const OVERWATCH_ORGANIZATION_AUDIT_ALL_CEDAR = `// =============================================================================
859
+ // Audit All Actions
860
+ // =============================================================================
861
+ // Permits and logs all agent actions for compliance auditing and monitoring.
862
+ // This is a permit rule — combine with monitoring/observability tooling to
863
+ // capture an audit trail.
864
+ //
865
+ // Category: organization
866
+ // Namespace: Overwatch
867
+ // =============================================================================
930
868
 
931
- @id("org-audit-all")
932
- @name("Audit all actions")
933
- @description("Permit and log all agent actions for compliance auditing and monitoring")
869
+ @id("organization.audit-all")
870
+ @name("Permit and audit all actions")
871
+ @description("Permits all actions while emitting audit-logging signals for compliance and monitoring.")
934
872
  @severity("low")
935
- @tags("audit,compliance,logging,organization")
873
+ @tags("category:organization,posture:permit-default,compliance:soc2")
936
874
  permit (
937
875
  principal,
938
876
  action,
939
877
  resource
940
878
  );
941
879
  `;
942
- const OVERWATCH_ORG_TEAM_PERMISSIONS_CEDAR = `// =============================================================================
880
+ const OVERWATCH_ORGANIZATION_TEAM_PERMISSIONS_CEDAR = `// =============================================================================
943
881
  // Project-Based Permissions (ReBAC)
944
882
  // =============================================================================
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
883
+ // Grants IDE access based on project membership using Cedar's entity
884
+ // hierarchy. Resources (Tool, Server, FilePath, etc.) are parented under
885
+ // Project, so \`resource in Project::"..."\` matches all resources scoped
886
+ // to that project.
951
887
  //
952
888
  // Entity hierarchy required:
953
889
  // Account::"acme-corp"
954
- // └── Project::"dev-project" (in Account)
955
- // └── Project::"support-project" (in Account)
890
+ // ├── Project::"dev-project"
891
+ // └── Project::"support-project"
956
892
  //
957
- // Resources (Tool, Server, FilePath, LlmPrompt) are parented under Project,
958
- // so \`resource in Project::"..."\` matches all resources in that project.
893
+ // Category: organization
894
+ // Namespace: Overwatch
959
895
  // =============================================================================
960
896
 
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")
897
+ @id("organization.allow-dev-project")
898
+ @name("Permit dev project full access")
899
+ @description("Permits all actions on resources scoped to Project::\\"dev-project\\".")
965
900
  @severity("medium")
966
- @tags("rebac,project,dev,permissions,organization")
901
+ @tags("category:organization,scope:per-tool,posture:deny-default")
967
902
  permit (
968
903
  principal,
969
904
  action,
970
905
  resource in Overwatch::Project::"dev-project"
971
906
  );
972
907
 
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")
908
+ @id("organization.allow-support-project-read")
909
+ @name("Permit support project read-only access")
910
+ @description("Permits process_prompt and read_file actions on resources scoped to Project::\\"support-project\\".")
977
911
  @severity("medium")
978
- @tags("rebac,project,support,read-only,organization")
912
+ @tags("category:organization,scope:per-tool,posture:deny-default")
979
913
  permit (
980
914
  principal,
981
915
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"read_file"],
982
916
  resource in Overwatch::Project::"support-project"
983
917
  );
984
918
  `;
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
919
+ const OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR = `// =============================================================================
920
+ // Agent-Specific Guardrails
921
+ // =============================================================================
922
+ // Per-agent security policies applied based on the agent identity. Different
923
+ // agents have different risk profiles — these template rules cover Claude
924
+ // (injection focus) and Cursor (PII focus); customize the agent IDs for
925
+ // your deployment.
926
+ //
927
+ // Context keys consumed:
928
+ // - detected_threats: Set<String>
929
+ // - threat_categories: Set<String>
989
930
  //
990
- // Different agents have different risk profiles:
991
- // Claude Code → prompt injection detection
992
- // Cursor → PII leakage detection
931
+ // Category: agent-identity
932
+ // Namespace: Overwatch
933
+ // =============================================================================
993
934
 
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")
935
+ @id("agent-identity.claude-block-injection")
936
+ @name("Block injection on Claude agent")
937
+ @description("Blocks process_prompt for the Claude agent when detected_threats contains \\"prompt_injection\\".")
998
938
  @severity("critical")
999
- @tags("rebac,agent,claude,injection,guardrail,organization")
939
+ @tags("category:agent-identity,threat:injection,scope:per-agent,detection:rule,surface:process-prompt,owasp:llm01")
940
+ @reject_message("Prompt blocked: prompt injection detected for the Claude agent.")
1000
941
  forbid (
1001
942
  principal == Overwatch::Agent::"claude",
1002
943
  action == Overwatch::Action::"process_prompt",
1003
944
  resource
1004
945
  )
1005
946
  when {
1006
- context.detected_threats.contains("prompt_injection")
947
+ context has detected_threats && context.detected_threats.contains("prompt_injection")
1007
948
  };
1008
949
 
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")
950
+ @id("agent-identity.cursor-block-pii")
951
+ @name("Block PII on Cursor agent")
952
+ @description("Blocks process_prompt for the Cursor agent when threat_categories contains \\"pii\\".")
1013
953
  @severity("critical")
1014
- @tags("rebac,agent,cursor,pii,guardrail,organization")
954
+ @tags("category:agent-identity,threat:pii,scope:per-agent,detection:rule,surface:process-prompt,compliance:gdpr")
955
+ @reject_message("Prompt blocked: PII detected for the Cursor agent — prevents leakage through code agent prompts.")
1015
956
  forbid (
1016
957
  principal == Overwatch::Agent::"cursor",
1017
958
  action == Overwatch::Action::"process_prompt",
1018
959
  resource
1019
960
  )
1020
961
  when {
1021
- context.threat_categories.contains("pii")
962
+ context has threat_categories && context.threat_categories.contains("pii")
1022
963
  };
1023
964
  `;
1024
965
  // =============================================================================
1025
966
  // CATEGORIES
1026
967
  // =============================================================================
1027
968
  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' },
969
+ { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block credential leakage and protect sensitive file paths.' },
970
+ { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across prompts, tool calls, and file operations.' },
971
+ { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block injection attacks (command, SQL, path traversal, encoded), prompt injection, and jailbreak attempts.' },
972
+ { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, hateful, sexual, criminal, or excessively profane content.' },
973
+ { id: 'tools', name: 'Tool Permissioning', description: 'Control shell execution, file operations, MCP servers, and sensitive system paths.' },
974
+ { id: 'agent-identity', name: 'Agent-Specific Guardrails', description: 'Per-agent security policies applied based on agent identity.' },
975
+ { id: 'organization', name: 'Organization', description: 'Organization-wide baselines, audit, and project-scoped permissions.' },
1033
976
  ];
1034
977
  // =============================================================================
1035
978
  // DEFAULT POLICIES
1036
979
  // =============================================================================
1037
980
  export const OVERWATCH_DEFAULTS = [
1038
981
  {
1039
- id: 'baseline-default',
982
+ id: 'organization.permit-baseline',
1040
983
  name: 'Baseline Permit',
1041
- description: 'Permits all actions by default threat-specific forbid policies override this when threats are detected',
984
+ description: 'Permits all actions by default; threat-specific forbid policies override this when detectors fire.',
1042
985
  category: 'organization',
1043
- cedarText: OVERWATCH_BASELINE_DEFAULT_CEDAR,
986
+ cedarText: OVERWATCH_ORGANIZATION_PERMIT_BASELINE_CEDAR,
1044
987
  severity: 'low',
1045
- tags: ['baseline', 'permit-default', 'organization'],
988
+ tags: ['category:organization', 'posture:permit-default'],
1046
989
  isActive: true,
1047
990
  },
1048
991
  ];
@@ -1051,104 +994,122 @@ export const OVERWATCH_DEFAULTS = [
1051
994
  // =============================================================================
1052
995
  export const OVERWATCH_TEMPLATES = [
1053
996
  {
1054
- id: 'baseline-default',
997
+ id: 'organization.permit-baseline',
1055
998
  name: 'Baseline Permit',
1056
- description: 'Permits all actions by default threat-specific forbid policies override this when threats are detected',
999
+ description: 'Permits all actions by default; threat-specific forbid policies override this when detectors fire.',
1057
1000
  category: 'organization',
1058
- cedarText: OVERWATCH_BASELINE_DEFAULT_CEDAR,
1001
+ cedarText: OVERWATCH_ORGANIZATION_PERMIT_BASELINE_CEDAR,
1059
1002
  severity: 'low',
1060
- tags: ['baseline', 'permit-default', 'organization'],
1003
+ tags: ['category:organization', 'posture:permit-default'],
1061
1004
  autoDeploy: true,
1062
1005
  },
1063
1006
  {
1064
- id: 'secrets-default',
1007
+ id: 'data-protection.defaults',
1065
1008
  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,
1009
+ description: 'Block credential leakage across prompts, tool calls, and file operations; SSH/PEM key blocks; env-var secrets; credential paths.',
1010
+ category: 'data-protection',
1011
+ cedarText: OVERWATCH_DATA_PROTECTION_DEFAULTS_CEDAR,
1069
1012
  severity: 'critical',
1070
- tags: ['secrets', 'credentials', 'aws', 'github', 'ssh', 'pem', 'baseline'],
1013
+ tags: ['category:data-protection', 'threat:secrets', 'owasp:llm06'],
1071
1014
  },
1072
1015
  {
1073
- id: 'semantic-default',
1016
+ id: 'semantic.defaults',
1074
1017
  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.)',
1018
+ description: 'Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.',
1076
1019
  category: 'semantic',
1077
- cedarText: OVERWATCH_SEMANTIC_DEFAULT_CEDAR,
1020
+ cedarText: OVERWATCH_SEMANTIC_DEFAULTS_CEDAR,
1021
+ severity: 'critical',
1022
+ tags: ['category:semantic', 'threat:injection', 'threat:jailbreak', 'owasp:llm01', 'owasp:llm02'],
1023
+ },
1024
+ {
1025
+ id: 'trust-safety.defaults',
1026
+ name: 'Content Safety',
1027
+ description: 'Block violent, hateful, sexual, criminal content plus excessive profanity using ML classifier scores.',
1028
+ category: 'trust-safety',
1029
+ cedarText: OVERWATCH_TRUST_SAFETY_DEFAULTS_CEDAR,
1078
1030
  severity: 'critical',
1079
- tags: ['injection', 'jailbreak', 'content-safety', 'ml', 'owasp-llm01', 'owasp-llm02', 'baseline'],
1031
+ tags: ['category:trust-safety', 'threat:harmful', 'compliance:eu-ai-act', 'compliance:iso-42001'],
1080
1032
  },
1081
1033
  {
1082
- id: 'tools-default',
1034
+ id: 'tools.defaults',
1083
1035
  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.',
1036
+ description: 'Block sensitive system-path file access and destructive MCP file-operation tools.',
1085
1037
  category: 'tools',
1086
- cedarText: OVERWATCH_TOOLS_DEFAULT_CEDAR,
1038
+ cedarText: OVERWATCH_TOOLS_DEFAULTS_CEDAR,
1087
1039
  severity: 'high',
1088
- tags: ['tools', 'file-access', 'system-paths', 'severity', 'baseline'],
1040
+ tags: ['category:tools', 'threat:path-traversal', 'detection:pattern', 'mitre:t1005', 'owasp:asi02'],
1041
+ },
1042
+ {
1043
+ id: 'tools.block-shell',
1044
+ name: 'Block shell and command execution',
1045
+ description: 'Blocks call_tool when tool_name is shell, bash, sh, terminal, cmd, or powershell.',
1046
+ category: 'tools',
1047
+ cedarText: OVERWATCH_TOOLS_BLOCK_SHELL_CEDAR,
1048
+ severity: 'critical',
1049
+ tags: ['category:tools', 'threat:command-injection', 'detection:rule', 'surface:call-tool', 'owasp:llm06', 'mitre:t1059'],
1089
1050
  },
1090
1051
  {
1091
- id: 'pii-default',
1052
+ id: 'privacy.defaults',
1092
1053
  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,
1054
+ description: 'Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.',
1055
+ category: 'privacy',
1056
+ cedarText: OVERWATCH_PRIVACY_DEFAULTS_CEDAR,
1096
1057
  severity: 'critical',
1097
- tags: ['pii', 'privacy', 'compliance', 'pci-dss', 'gdpr', 'hipaa', 'baseline'],
1058
+ tags: ['category:privacy', 'threat:pii', 'compliance:pci-dss', 'compliance:gdpr', 'compliance:hipaa'],
1098
1059
  },
1099
1060
  {
1100
- id: 'tools-mcp-allowlist',
1061
+ id: 'tools.mcp-server-allowlist',
1101
1062
  name: 'MCP Server Allowlist',
1102
- description: 'Only allow specific MCP servers to be used',
1063
+ description: 'Allow only specific MCP servers to be used; customize the allowlist.',
1103
1064
  category: 'tools',
1104
- cedarText: OVERWATCH_TOOLS_MCP_ALLOWLIST_CEDAR,
1065
+ cedarText: OVERWATCH_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR,
1105
1066
  severity: 'medium',
1106
- tags: ['mcp', 'allowlist', 'whitelist'],
1067
+ tags: ['category:tools', 'scope:org-wide', 'posture:deny-default'],
1107
1068
  },
1108
1069
  {
1109
- id: 'tools-mcp-tool-permissions',
1070
+ id: 'tools.mcp-tool-permissions',
1110
1071
  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.',
1072
+ description: 'Permit MCP call_tool by default plus two safety rails (org-wide exclusion, unverified server block).',
1112
1073
  category: 'tools',
1113
1074
  cedarText: OVERWATCH_TOOLS_MCP_TOOL_PERMISSIONS_CEDAR,
1114
- severity: 'low',
1115
- tags: ['mcp', 'tools', 'permit-default', 'exclusion'],
1075
+ severity: 'critical',
1076
+ tags: ['category:tools', 'threat:supply-chain', 'posture:permit-default'],
1116
1077
  },
1117
1078
  {
1118
- id: 'org-default-deny',
1079
+ id: 'organization.deny-baseline',
1119
1080
  name: 'Default Deny All',
1120
- description: 'Organization-wide baseline: deny all unless explicitly permitted',
1081
+ description: 'Organization-wide deny baseline; combine with scoped permit rules for deny-by-default posture.',
1121
1082
  category: 'organization',
1122
- cedarText: OVERWATCH_ORG_DEFAULT_DENY_CEDAR,
1083
+ cedarText: OVERWATCH_ORGANIZATION_DENY_BASELINE_CEDAR,
1123
1084
  severity: 'high',
1124
- tags: ['baseline', 'security', 'deny-by-default'],
1085
+ tags: ['category:organization', 'posture:deny-default', 'scope:org-wide'],
1125
1086
  },
1126
1087
  {
1127
- id: 'org-audit-all',
1088
+ id: 'organization.audit-all',
1128
1089
  name: 'Audit All Actions',
1129
- description: 'Log all agent actions for compliance and monitoring',
1090
+ description: 'Permit and audit all agent actions for compliance and monitoring.',
1130
1091
  category: 'organization',
1131
- cedarText: OVERWATCH_ORG_AUDIT_ALL_CEDAR,
1092
+ cedarText: OVERWATCH_ORGANIZATION_AUDIT_ALL_CEDAR,
1132
1093
  severity: 'low',
1133
- tags: ['audit', 'compliance', 'logging'],
1094
+ tags: ['category:organization', 'posture:permit-default', 'compliance:soc2'],
1134
1095
  },
1135
1096
  {
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',
1097
+ id: 'organization.team-permissions',
1098
+ name: 'Project-Based Permissions (ReBAC)',
1099
+ description: 'Grant IDE access based on project scope using Cedar entity hierarchy example dev/support project split.',
1139
1100
  category: 'organization',
1140
- cedarText: OVERWATCH_ORG_TEAM_PERMISSIONS_CEDAR,
1101
+ cedarText: OVERWATCH_ORGANIZATION_TEAM_PERMISSIONS_CEDAR,
1141
1102
  severity: 'medium',
1142
- tags: ['rebac', 'team', 'permissions', 'hierarchy'],
1103
+ tags: ['category:organization', 'scope:per-tool', 'posture:deny-default'],
1143
1104
  },
1144
1105
  {
1145
- id: 'org-agent-guardrails',
1106
+ id: 'agent-identity.agent-guardrails',
1146
1107
  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,
1108
+ description: 'Per-agent security guardrails injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.',
1109
+ category: 'agent-identity',
1110
+ cedarText: OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR,
1150
1111
  severity: 'critical',
1151
- tags: ['rebac', 'agent', 'guardrails', 'per-agent'],
1112
+ tags: ['category:agent-identity', 'scope:per-agent', 'threat:injection', 'threat:pii'],
1152
1113
  },
1153
1114
  ];
1154
1115
  // =============================================================================
@@ -1157,147 +1118,226 @@ export const OVERWATCH_TEMPLATES = [
1157
1118
  /** Raw templates.json metadata for the Overwatch service. */
1158
1119
  export const OVERWATCH_TEMPLATES_JSON = `{
1159
1120
  "service": "overwatch",
1160
- "version": "4.0.0",
1121
+ "version": "5.0.0",
1161
1122
  "description": "Overwatch policy templates for IDE agent security",
1162
1123
  "categories": [
1163
1124
  {
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"
1125
+ "id": "data-protection",
1126
+ "name": "Secrets & Data Protection",
1127
+ "description": "Block credential leakage and protect sensitive file paths."
1167
1128
  },
1168
1129
  {
1169
- "id": "pii",
1130
+ "id": "privacy",
1170
1131
  "name": "PII Detection",
1171
- "description": "Detect and block personally identifiable information (PII) such as credit card numbers, SSNs, and other sensitive data"
1132
+ "description": "Block personally identifiable information across prompts, tool calls, and file operations."
1172
1133
  },
1173
1134
  {
1174
1135
  "id": "semantic",
1175
1136
  "name": "Semantic Threat Detection",
1176
- "description": "Detect and block injection attacks, prompt injection, jailbreak attempts, and unsafe content"
1137
+ "description": "Block injection attacks (command, SQL, path traversal, encoded), prompt injection, and jailbreak attempts."
1138
+ },
1139
+ {
1140
+ "id": "trust-safety",
1141
+ "name": "Content Safety",
1142
+ "description": "Block violent, hateful, sexual, criminal, or excessively profane content."
1177
1143
  },
1178
1144
  {
1179
1145
  "id": "tools",
1180
1146
  "name": "Tool Permissioning",
1181
- "description": "Control access to shell execution, file operations, MCP servers, and sensitive system paths"
1147
+ "description": "Control shell execution, file operations, MCP servers, and sensitive system paths."
1148
+ },
1149
+ {
1150
+ "id": "agent-identity",
1151
+ "name": "Agent-Specific Guardrails",
1152
+ "description": "Per-agent security policies applied based on agent identity."
1182
1153
  },
1183
1154
  {
1184
1155
  "id": "organization",
1185
- "name": "Organization Rules",
1186
- "description": "Apply organization-wide policy baselines, team permissions, and agent-specific guardrails"
1156
+ "name": "Organization",
1157
+ "description": "Organization-wide baselines, audit, and project-scoped permissions."
1187
1158
  }
1188
1159
  ],
1189
1160
  "defaults": [
1190
1161
  {
1191
- "id": "baseline-default",
1162
+ "id": "organization.permit-baseline",
1192
1163
  "name": "Baseline Permit",
1193
- "description": "Permits all actions by default threat-specific forbid policies override this when threats are detected",
1164
+ "description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
1194
1165
  "category": "organization",
1195
1166
  "file": "defaults/baseline.cedar",
1196
1167
  "severity": "low",
1197
- "tags": ["baseline", "permit-default", "organization"],
1168
+ "tags": ["category:organization", "posture:permit-default"],
1198
1169
  "is_active": true
1199
1170
  }
1200
1171
  ],
1201
1172
  "templates": [
1202
1173
  {
1203
- "id": "baseline-default",
1174
+ "id": "organization.permit-baseline",
1204
1175
  "name": "Baseline Permit",
1205
- "description": "Permits all actions by default threat-specific forbid policies override this when threats are detected",
1176
+ "description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
1206
1177
  "category": "organization",
1207
1178
  "file": "defaults/baseline.cedar",
1208
1179
  "severity": "low",
1209
- "tags": ["baseline", "permit-default", "organization"],
1180
+ "tags": ["category:organization", "posture:permit-default"],
1210
1181
  "auto_deploy": true
1211
1182
  },
1212
1183
  {
1213
- "id": "secrets-default",
1184
+ "id": "data-protection.defaults",
1214
1185
  "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",
1186
+ "description": "Block credential leakage across prompts, tool calls, and file operations; SSH/PEM key blocks; env-var secrets; credential paths.",
1187
+ "category": "data-protection",
1217
1188
  "file": "defaults/secrets.cedar",
1218
1189
  "severity": "critical",
1219
- "tags": ["secrets", "credentials", "aws", "github", "ssh", "pem", "baseline"]
1190
+ "tags": ["category:data-protection", "threat:secrets", "owasp:llm06"]
1220
1191
  },
1221
1192
  {
1222
- "id": "semantic-default",
1193
+ "id": "semantic.defaults",
1223
1194
  "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.)",
1195
+ "description": "Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.",
1225
1196
  "category": "semantic",
1226
1197
  "file": "defaults/semantic.cedar",
1227
1198
  "severity": "critical",
1228
- "tags": ["injection", "jailbreak", "content-safety", "ml", "owasp-llm01", "owasp-llm02", "baseline"]
1199
+ "tags": [
1200
+ "category:semantic",
1201
+ "threat:injection",
1202
+ "threat:jailbreak",
1203
+ "owasp:llm01",
1204
+ "owasp:llm02"
1205
+ ]
1229
1206
  },
1230
1207
  {
1231
- "id": "tools-default",
1208
+ "id": "trust-safety.defaults",
1209
+ "name": "Content Safety",
1210
+ "description": "Block violent, hateful, sexual, criminal content plus excessive profanity using ML classifier scores.",
1211
+ "category": "trust-safety",
1212
+ "file": "defaults/content_safety.cedar",
1213
+ "severity": "critical",
1214
+ "tags": [
1215
+ "category:trust-safety",
1216
+ "threat:harmful",
1217
+ "compliance:eu-ai-act",
1218
+ "compliance:iso-42001"
1219
+ ]
1220
+ },
1221
+ {
1222
+ "id": "tools.defaults",
1232
1223
  "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.",
1224
+ "description": "Block sensitive system-path file access and destructive MCP file-operation tools.",
1234
1225
  "category": "tools",
1235
1226
  "file": "defaults/tools.cedar",
1236
1227
  "severity": "high",
1237
- "tags": ["tools", "file-access", "system-paths", "severity", "baseline"]
1228
+ "tags": [
1229
+ "category:tools",
1230
+ "threat:path-traversal",
1231
+ "detection:pattern",
1232
+ "mitre:t1005",
1233
+ "owasp:asi02"
1234
+ ]
1238
1235
  },
1239
1236
  {
1240
- "id": "pii-default",
1237
+ "id": "tools.block-shell",
1238
+ "name": "Block shell and command execution",
1239
+ "description": "Blocks call_tool when tool_name is shell, bash, sh, terminal, cmd, or powershell.",
1240
+ "category": "tools",
1241
+ "file": "tools_shell_block.cedar",
1242
+ "severity": "critical",
1243
+ "tags": [
1244
+ "category:tools",
1245
+ "threat:command-injection",
1246
+ "detection:rule",
1247
+ "surface:call-tool",
1248
+ "owasp:llm06",
1249
+ "mitre:t1059"
1250
+ ]
1251
+ },
1252
+ {
1253
+ "id": "privacy.defaults",
1241
1254
  "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",
1255
+ "description": "Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.",
1256
+ "category": "privacy",
1244
1257
  "file": "defaults/pii.cedar",
1245
1258
  "severity": "critical",
1246
- "tags": ["pii", "privacy", "compliance", "pci-dss", "gdpr", "hipaa", "baseline"]
1259
+ "tags": [
1260
+ "category:privacy",
1261
+ "threat:pii",
1262
+ "compliance:pci-dss",
1263
+ "compliance:gdpr",
1264
+ "compliance:hipaa"
1265
+ ]
1247
1266
  },
1248
1267
  {
1249
- "id": "tools-mcp-allowlist",
1268
+ "id": "tools.mcp-server-allowlist",
1250
1269
  "name": "MCP Server Allowlist",
1251
- "description": "Only allow specific MCP servers to be used",
1270
+ "description": "Allow only specific MCP servers to be used; customize the allowlist.",
1252
1271
  "category": "tools",
1253
1272
  "file": "mcp_server_allowlist.cedar",
1254
1273
  "severity": "medium",
1255
- "tags": ["mcp", "allowlist", "whitelist"]
1274
+ "tags": ["category:tools", "scope:org-wide", "posture:deny-default"]
1256
1275
  },
1257
1276
  {
1258
- "id": "tools-mcp-tool-permissions",
1277
+ "id": "tools.mcp-tool-permissions",
1259
1278
  "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.",
1279
+ "description": "Permit MCP call_tool by default plus two safety rails (org-wide exclusion, unverified server block).",
1261
1280
  "category": "tools",
1262
1281
  "file": "mcp_tool_permissions.cedar",
1263
- "severity": "low",
1264
- "tags": ["mcp", "tools", "permit-default", "exclusion"]
1282
+ "severity": "critical",
1283
+ "tags": [
1284
+ "category:tools",
1285
+ "threat:supply-chain",
1286
+ "posture:permit-default"
1287
+ ]
1265
1288
  },
1266
1289
  {
1267
- "id": "org-default-deny",
1290
+ "id": "organization.deny-baseline",
1268
1291
  "name": "Default Deny All",
1269
- "description": "Organization-wide baseline: deny all unless explicitly permitted",
1292
+ "description": "Organization-wide deny baseline; combine with scoped permit rules for deny-by-default posture.",
1270
1293
  "category": "organization",
1271
1294
  "file": "default_deny_all.cedar",
1272
1295
  "severity": "high",
1273
- "tags": ["baseline", "security", "deny-by-default"]
1296
+ "tags": [
1297
+ "category:organization",
1298
+ "posture:deny-default",
1299
+ "scope:org-wide"
1300
+ ]
1274
1301
  },
1275
1302
  {
1276
- "id": "org-audit-all",
1303
+ "id": "organization.audit-all",
1277
1304
  "name": "Audit All Actions",
1278
- "description": "Log all agent actions for compliance and monitoring",
1305
+ "description": "Permit and audit all agent actions for compliance and monitoring.",
1279
1306
  "category": "organization",
1280
1307
  "file": "audit_all_actions.cedar",
1281
1308
  "severity": "low",
1282
- "tags": ["audit", "compliance", "logging"]
1309
+ "tags": [
1310
+ "category:organization",
1311
+ "posture:permit-default",
1312
+ "compliance:soc2"
1313
+ ]
1283
1314
  },
1284
1315
  {
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",
1316
+ "id": "organization.team-permissions",
1317
+ "name": "Project-Based Permissions (ReBAC)",
1318
+ "description": "Grant IDE access based on project scope using Cedar entity hierarchy example dev/support project split.",
1288
1319
  "category": "organization",
1289
1320
  "file": "team_permissions.cedar",
1290
1321
  "severity": "medium",
1291
- "tags": ["rebac", "team", "permissions", "hierarchy"]
1322
+ "tags": [
1323
+ "category:organization",
1324
+ "scope:per-tool",
1325
+ "posture:deny-default"
1326
+ ]
1292
1327
  },
1293
1328
  {
1294
- "id": "org-agent-guardrails",
1329
+ "id": "agent-identity.agent-guardrails",
1295
1330
  "name": "Agent-Specific Guardrails",
1296
- "description": "Apply per-agent security guardrails - injection blocking for Claude, PII blocking for Cursor",
1297
- "category": "organization",
1331
+ "description": "Per-agent security guardrails injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.",
1332
+ "category": "agent-identity",
1298
1333
  "file": "agent_guardrails.cedar",
1299
1334
  "severity": "critical",
1300
- "tags": ["rebac", "agent", "guardrails", "per-agent"]
1335
+ "tags": [
1336
+ "category:agent-identity",
1337
+ "scope:per-agent",
1338
+ "threat:injection",
1339
+ "threat:pii"
1340
+ ]
1301
1341
  }
1302
1342
  ]
1303
1343
  }