@highflame/policy 2.0.8 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_schemas/overwatch/context.json +54 -54
- package/_schemas/overwatch/schema.cedarschema +77 -68
- package/dist/actions.gen.d.ts +0 -1
- package/dist/actions.gen.js +0 -1
- package/dist/annotations.d.ts +0 -1
- package/dist/annotations.js +0 -1
- package/dist/builder.d.ts +45 -14
- package/dist/builder.js +99 -33
- package/dist/context.gen.d.ts +0 -1
- package/dist/context.gen.js +0 -1
- package/dist/engine.d.ts +20 -3
- package/dist/engine.js +50 -21
- package/dist/entities.gen.d.ts +0 -1
- package/dist/entities.gen.js +0 -1
- package/dist/entity-metadata-types.gen.d.ts +0 -1
- package/dist/entity-metadata-types.gen.js +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/overwatch-context.gen.d.ts +0 -1
- package/dist/overwatch-context.gen.js +0 -1
- package/dist/overwatch-defaults.gen.d.ts +0 -1
- package/dist/overwatch-defaults.gen.js +24 -3
- package/dist/overwatch-entities.gen.d.ts +0 -1
- package/dist/overwatch-entities.gen.js +0 -1
- package/dist/palisade-context.gen.d.ts +0 -1
- package/dist/palisade-context.gen.js +0 -1
- package/dist/palisade-entities.gen.d.ts +0 -1
- package/dist/palisade-entities.gen.js +0 -1
- package/dist/parser.d.ts +0 -1
- package/dist/parser.js +0 -1
- package/dist/schema.gen.d.ts +0 -1
- package/dist/schema.gen.js +0 -1
- package/dist/schemas.d.ts +0 -1
- package/dist/schemas.js +0 -1
- package/dist/service-schemas.gen.d.ts +5 -12
- package/dist/service-schemas.gen.js +172 -84
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -1
- package/package.json +1 -2
- package/dist/actions.gen.d.ts.map +0 -1
- package/dist/actions.gen.js.map +0 -1
- package/dist/annotations.d.ts.map +0 -1
- package/dist/annotations.js.map +0 -1
- package/dist/builder.d.ts.map +0 -1
- package/dist/builder.js.map +0 -1
- package/dist/context.gen.d.ts.map +0 -1
- package/dist/context.gen.js.map +0 -1
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js.map +0 -1
- package/dist/engine.test.d.ts +0 -8
- package/dist/engine.test.d.ts.map +0 -1
- package/dist/engine.test.js +0 -190
- package/dist/engine.test.js.map +0 -1
- package/dist/entities.gen.d.ts.map +0 -1
- package/dist/entities.gen.js.map +0 -1
- package/dist/entity-metadata-types.gen.d.ts.map +0 -1
- package/dist/entity-metadata-types.gen.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/overwatch-context.gen.d.ts.map +0 -1
- package/dist/overwatch-context.gen.js.map +0 -1
- package/dist/overwatch-defaults.gen.d.ts.map +0 -1
- package/dist/overwatch-defaults.gen.js.map +0 -1
- package/dist/overwatch-defaults.test.d.ts +0 -8
- package/dist/overwatch-defaults.test.d.ts.map +0 -1
- package/dist/overwatch-defaults.test.js +0 -145
- package/dist/overwatch-defaults.test.js.map +0 -1
- package/dist/overwatch-entities.gen.d.ts.map +0 -1
- package/dist/overwatch-entities.gen.js.map +0 -1
- package/dist/overwatch-rebac.test.d.ts +0 -25
- package/dist/overwatch-rebac.test.d.ts.map +0 -1
- package/dist/overwatch-rebac.test.js +0 -301
- package/dist/overwatch-rebac.test.js.map +0 -1
- package/dist/palisade-context.gen.d.ts.map +0 -1
- package/dist/palisade-context.gen.js.map +0 -1
- package/dist/palisade-entities.gen.d.ts.map +0 -1
- package/dist/palisade-entities.gen.js.map +0 -1
- package/dist/parser.d.ts.map +0 -1
- package/dist/parser.js.map +0 -1
- package/dist/parser.test.d.ts +0 -8
- package/dist/parser.test.d.ts.map +0 -1
- package/dist/parser.test.js +0 -212
- package/dist/parser.test.js.map +0 -1
- package/dist/schema.gen.d.ts.map +0 -1
- package/dist/schema.gen.js.map +0 -1
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js.map +0 -1
- package/dist/schemas.test.d.ts +0 -8
- package/dist/schemas.test.d.ts.map +0 -1
- package/dist/schemas.test.js +0 -407
- package/dist/schemas.test.js.map +0 -1
- package/dist/service-schemas.gen.d.ts.map +0 -1
- package/dist/service-schemas.gen.js.map +0 -1
- package/dist/studio-ui.test.d.ts +0 -8
- package/dist/studio-ui.test.d.ts.map +0 -1
- package/dist/studio-ui.test.js +0 -687
- package/dist/studio-ui.test.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/src/actions.gen.ts +0 -57
- package/src/annotations.ts +0 -243
- package/src/builder.ts +0 -799
- package/src/context.gen.ts +0 -10
- package/src/engine.test.ts +0 -370
- package/src/engine.ts +0 -497
- package/src/entities.gen.ts +0 -65
- package/src/entity-metadata-types.gen.ts +0 -19
- package/src/errors.ts +0 -195
- package/src/index.ts +0 -62
- package/src/overwatch-context.gen.ts +0 -45
- package/src/overwatch-defaults.gen.ts +0 -1255
- package/src/overwatch-defaults.test.ts +0 -176
- package/src/overwatch-entities.gen.ts +0 -41
- package/src/overwatch-rebac.test.ts +0 -346
- package/src/palisade-context.gen.ts +0 -28
- package/src/palisade-entities.gen.ts +0 -49
- package/src/parser.test.ts +0 -251
- package/src/parser.ts +0 -579
- package/src/schema.gen.ts +0 -134
- package/src/schemas.test.ts +0 -477
- package/src/schemas.ts +0 -91
- package/src/service-schemas.gen.ts +0 -608
- package/src/studio-ui.test.ts +0 -813
- package/src/types.ts +0 -66
|
@@ -59,6 +59,7 @@ const OVERWATCH_SECRETS_DEFAULT_CEDAR = `// ====================================
|
|
|
59
59
|
@description("Block prompts when YARA scanners detect API keys, tokens, or credential patterns")
|
|
60
60
|
@severity("critical")
|
|
61
61
|
@tags("secrets,credentials,prompts,nist-sc-28,nist-ia-5")
|
|
62
|
+
@reject_message("Your prompt was blocked because it contains detected secrets such as API keys, tokens, or credentials. Remove all secrets before resubmitting.")
|
|
62
63
|
forbid (
|
|
63
64
|
principal,
|
|
64
65
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -74,6 +75,7 @@ when {
|
|
|
74
75
|
@description("Prevent file reads and tool execution when secrets or credentials are detected in content")
|
|
75
76
|
@severity("high")
|
|
76
77
|
@tags("secrets,file-access,tools,credentials,nist-sc-28")
|
|
78
|
+
@reject_message("This operation was blocked because secrets or credentials were detected in the content. File reads and tool calls are restricted when credential exposure is identified.")
|
|
77
79
|
forbid (
|
|
78
80
|
principal,
|
|
79
81
|
action in [Overwatch::Action::"read_file", Overwatch::Action::"call_tool"],
|
|
@@ -93,6 +95,7 @@ when {
|
|
|
93
95
|
@description("Block access to .env files that commonly contain secrets, API keys, and database credentials")
|
|
94
96
|
@severity("high")
|
|
95
97
|
@tags("secrets,env-files,config,nist-sc-28,mitre-t1552")
|
|
98
|
+
@reject_message("Access to .env files is blocked because they commonly contain secrets, API keys, and database credentials. Use a secrets manager instead of .env files.")
|
|
96
99
|
forbid (
|
|
97
100
|
principal,
|
|
98
101
|
action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file", Overwatch::Action::"call_tool"],
|
|
@@ -113,6 +116,7 @@ when {
|
|
|
113
116
|
@description("Detect and block AWS access key IDs (AKIA prefix) in AI responses to prevent credential exfiltration")
|
|
114
117
|
@severity("critical")
|
|
115
118
|
@tags("secrets,aws,credentials,response-scan,nist-ia-5,mitre-t1552")
|
|
119
|
+
@reject_message("This response was blocked because an AWS access key ID (AKIA prefix) was detected. AWS credentials must never be exposed in AI responses.")
|
|
116
120
|
forbid (
|
|
117
121
|
principal,
|
|
118
122
|
action,
|
|
@@ -129,6 +133,7 @@ when {
|
|
|
129
133
|
@description("Detect and block AWS secret access keys in AI responses")
|
|
130
134
|
@severity("critical")
|
|
131
135
|
@tags("secrets,aws,credentials,response-scan,nist-ia-5")
|
|
136
|
+
@reject_message("This response was blocked because an AWS secret access key was detected. AWS credentials must never be exposed in AI responses.")
|
|
132
137
|
forbid (
|
|
133
138
|
principal,
|
|
134
139
|
action,
|
|
@@ -146,6 +151,7 @@ when {
|
|
|
146
151
|
@description("Detect and block GitHub personal access tokens (ghp_), fine-grained tokens (github_pat_), and app tokens (ghs_)")
|
|
147
152
|
@severity("critical")
|
|
148
153
|
@tags("secrets,github,tokens,response-scan,mitre-t1552")
|
|
154
|
+
@reject_message("This response was blocked because a GitHub token (personal access token, fine-grained token, or app token) was detected. GitHub tokens must never be exposed in AI responses.")
|
|
149
155
|
forbid (
|
|
150
156
|
principal,
|
|
151
157
|
action,
|
|
@@ -164,6 +170,7 @@ when {
|
|
|
164
170
|
@description("Detect and block SSH, RSA, and OpenSSH private keys in AI responses")
|
|
165
171
|
@severity("critical")
|
|
166
172
|
@tags("secrets,ssh,private-keys,response-scan,nist-sc-28,mitre-t1552")
|
|
173
|
+
@reject_message("This response was blocked because a private key (SSH, RSA, or OpenSSH) was detected. Private keys must never be exposed in AI responses.")
|
|
167
174
|
forbid (
|
|
168
175
|
principal,
|
|
169
176
|
action,
|
|
@@ -187,6 +194,7 @@ when {
|
|
|
187
194
|
@description("Block content flagged by YARA rules for credential exposure, API key leaks, JWT tokens, and bearer tokens")
|
|
188
195
|
@severity("critical")
|
|
189
196
|
@tags("secrets,yara,credentials,jwt,bearer,nist-ia-5")
|
|
197
|
+
@reject_message("This content was blocked because YARA scanning detected credential patterns including secret exposure, credential leaks, API keys, JWT tokens, or bearer tokens.")
|
|
190
198
|
forbid (
|
|
191
199
|
principal,
|
|
192
200
|
action,
|
|
@@ -219,6 +227,7 @@ const OVERWATCH_PII_DEFAULT_CEDAR = `// ========================================
|
|
|
219
227
|
@description("Detect and block content containing credit card number patterns (PCI DSS compliance)")
|
|
220
228
|
@severity("critical")
|
|
221
229
|
@tags("pci,credit-card,payment,compliance,pci-dss-3.4")
|
|
230
|
+
@reject_message("Your prompt was blocked because credit card number patterns were detected. Sharing payment card data violates PCI DSS requirements.")
|
|
222
231
|
forbid (
|
|
223
232
|
principal,
|
|
224
233
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -234,6 +243,7 @@ when {
|
|
|
234
243
|
@description("Detect and block content containing SSN patterns (XXX-XX-XXXX format)")
|
|
235
244
|
@severity("critical")
|
|
236
245
|
@tags("ssn,identity,privacy,compliance")
|
|
246
|
+
@reject_message("Your prompt was blocked because Social Security Number patterns (XXX-XX-XXXX) were detected. SSNs are protected personal identifiers that must not be shared.")
|
|
237
247
|
forbid (
|
|
238
248
|
principal,
|
|
239
249
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -249,6 +259,7 @@ when {
|
|
|
249
259
|
@description("Block content when PII-related threat categories are detected by YARA or Javelin scanners")
|
|
250
260
|
@severity("high")
|
|
251
261
|
@tags("pii,privacy,data-protection,gdpr")
|
|
262
|
+
@reject_message("Your prompt was blocked because personally identifiable information was detected by threat scanners. Remove all PII before resubmitting.")
|
|
252
263
|
forbid (
|
|
253
264
|
principal,
|
|
254
265
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -280,6 +291,7 @@ when {
|
|
|
280
291
|
@description("Prevent tool execution when PII patterns are detected in content")
|
|
281
292
|
@severity("high")
|
|
282
293
|
@tags("pii,tools,data-protection")
|
|
294
|
+
@reject_message("Tool execution was blocked because personally identifiable information was detected in the content. PII must be removed before tool calls are permitted.")
|
|
283
295
|
forbid (
|
|
284
296
|
principal,
|
|
285
297
|
action == Overwatch::Action::"call_tool",
|
|
@@ -308,6 +320,7 @@ const OVERWATCH_SEMANTIC_DEFAULT_CEDAR = `// ===================================
|
|
|
308
320
|
@description("Detect and block prompt injection patterns in user input via YARA scanning (OWASP LLM01)")
|
|
309
321
|
@severity("critical")
|
|
310
322
|
@tags("injection,security,llm,owasp-llm01,baseline")
|
|
323
|
+
@reject_message("Your prompt was blocked because prompt injection patterns were detected by YARA scanning. This is a security measure to prevent manipulation of AI agent behavior.")
|
|
311
324
|
forbid (
|
|
312
325
|
principal,
|
|
313
326
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -339,6 +352,7 @@ when {
|
|
|
339
352
|
@description("Detect and block jailbreak and bypass attempts against AI agents (OWASP LLM02)")
|
|
340
353
|
@severity("critical")
|
|
341
354
|
@tags("jailbreak,bypass,security,owasp-llm02,baseline")
|
|
355
|
+
@reject_message("Your prompt was blocked because jailbreak or bypass patterns were detected by YARA scanning. This is a security measure to prevent circumvention of AI safety controls.")
|
|
342
356
|
forbid (
|
|
343
357
|
principal,
|
|
344
358
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -370,6 +384,7 @@ when {
|
|
|
370
384
|
@description("Block prompts when semantic threat scanners detect high severity issues (severity >= 3)")
|
|
371
385
|
@severity("high")
|
|
372
386
|
@tags("semantic,severity,security")
|
|
387
|
+
@reject_message("Your prompt was blocked because semantic threat scanners detected high severity issues in the content. Review your prompt for manipulative or adversarial patterns.")
|
|
373
388
|
forbid (
|
|
374
389
|
principal,
|
|
375
390
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -387,6 +402,7 @@ when {
|
|
|
387
402
|
@description("Block all content when any scanner detects critical severity threats")
|
|
388
403
|
@severity("critical")
|
|
389
404
|
@tags("critical,baseline,security")
|
|
405
|
+
@reject_message("Your prompt was blocked because security scanners detected a critical-severity threat. This content cannot be processed.")
|
|
390
406
|
forbid (
|
|
391
407
|
principal,
|
|
392
408
|
action == Overwatch::Action::"process_prompt",
|
|
@@ -402,6 +418,7 @@ when {
|
|
|
402
418
|
@description("Prevent tool execution when prompt injection patterns are detected in content")
|
|
403
419
|
@severity("critical")
|
|
404
420
|
@tags("injection,tools,security,owasp-llm01")
|
|
421
|
+
@reject_message("Tool execution was blocked because prompt injection patterns were detected in the content by YARA scanning.")
|
|
405
422
|
forbid (
|
|
406
423
|
principal,
|
|
407
424
|
action == Overwatch::Action::"call_tool",
|
|
@@ -435,6 +452,7 @@ const OVERWATCH_TOOLS_DEFAULT_CEDAR = `// ======================================
|
|
|
435
452
|
@description("Block direct shell, bash, and command execution tools to prevent command injection (MITRE T1059)")
|
|
436
453
|
@severity("critical")
|
|
437
454
|
@tags("shell,command-injection,execution,nist-cm-7,mitre-t1059,baseline")
|
|
455
|
+
@reject_message("Tool execution was blocked because direct shell and command execution tools (shell, bash, terminal, system.exec) are restricted to prevent command injection attacks.")
|
|
438
456
|
forbid (
|
|
439
457
|
principal,
|
|
440
458
|
action == Overwatch::Action::"call_tool",
|
|
@@ -456,6 +474,7 @@ when {
|
|
|
456
474
|
@description("Block file deletion and other destructive tool operations to prevent data loss")
|
|
457
475
|
@severity("high")
|
|
458
476
|
@tags("file,delete,destructive,nist-ac-3")
|
|
477
|
+
@reject_message("Tool execution was blocked because destructive file operations (delete, rmdir, unlink) are restricted to prevent data loss.")
|
|
459
478
|
forbid (
|
|
460
479
|
principal,
|
|
461
480
|
action == Overwatch::Action::"call_tool",
|
|
@@ -478,6 +497,7 @@ when {
|
|
|
478
497
|
@description("Prevent access to system directories, credential files, SSH keys, and cloud config (MITRE T1005, T1552.001)")
|
|
479
498
|
@severity("high")
|
|
480
499
|
@tags("file,path,system,security,nist-ac-6,mitre-t1005")
|
|
500
|
+
@reject_message("Access to this path was blocked because it targets a sensitive system directory or credential file (/etc, /proc, /sys, .ssh, .aws, .gnupg, or private key files).")
|
|
481
501
|
forbid (
|
|
482
502
|
principal,
|
|
483
503
|
action in [Overwatch::Action::"read_file", Overwatch::Action::"write_file", Overwatch::Action::"call_tool"],
|
|
@@ -508,6 +528,7 @@ when {
|
|
|
508
528
|
@description("Prevent tool execution when high or critical severity threats are detected in content")
|
|
509
529
|
@severity("high")
|
|
510
530
|
@tags("tools,threats,severity,security")
|
|
531
|
+
@reject_message("Tool execution was blocked because high or critical severity threats were detected in the content by security scanners.")
|
|
511
532
|
forbid (
|
|
512
533
|
principal,
|
|
513
534
|
action == Overwatch::Action::"call_tool",
|
|
@@ -736,8 +757,9 @@ permit (
|
|
|
736
757
|
resource
|
|
737
758
|
)
|
|
738
759
|
when {
|
|
739
|
-
context
|
|
740
|
-
context.mcp_server == "
|
|
760
|
+
context has mcp_server &&
|
|
761
|
+
(context.mcp_server == "filesystem" ||
|
|
762
|
+
context.mcp_server == "playwright")
|
|
741
763
|
};
|
|
742
764
|
|
|
743
765
|
@id("mcp-allowlist-deny")
|
|
@@ -1171,4 +1193,3 @@ export function getOverwatchTemplatesByCategory(category) {
|
|
|
1171
1193
|
export function getOverwatchTemplateById(id) {
|
|
1172
1194
|
return OVERWATCH_TEMPLATES.find(t => t.id === id);
|
|
1173
1195
|
}
|
|
1174
|
-
//# sourceMappingURL=overwatch-defaults.gen.js.map
|
|
@@ -9,4 +9,3 @@ export declare const OVERWATCH_ENTITIES: ServiceEntityMetadata;
|
|
|
9
9
|
* Maps action names to their valid principals and resources.
|
|
10
10
|
*/
|
|
11
11
|
export declare const OVERWATCH_ACTION_ENTITIES: Record<string, ActionEntityMetadata>;
|
|
12
|
-
//# sourceMappingURL=overwatch-entities.gen.d.ts.map
|
|
@@ -22,4 +22,3 @@ export declare const PalisadeContextKey: {
|
|
|
22
22
|
readonly TokenizerAddedTokensCount: "tokenizer_added_tokens_count";
|
|
23
23
|
};
|
|
24
24
|
export type PalisadeContextKey = (typeof PalisadeContextKey)[keyof typeof PalisadeContextKey];
|
|
25
|
-
//# sourceMappingURL=palisade-context.gen.d.ts.map
|
|
@@ -9,4 +9,3 @@ export declare const PALISADE_ENTITIES: ServiceEntityMetadata;
|
|
|
9
9
|
* Maps action names to their valid principals and resources.
|
|
10
10
|
*/
|
|
11
11
|
export declare const PALISADE_ACTION_ENTITIES: Record<string, ActionEntityMetadata>;
|
|
12
|
-
//# sourceMappingURL=palisade-entities.gen.d.ts.map
|
package/dist/parser.d.ts
CHANGED
package/dist/parser.js
CHANGED
package/dist/schema.gen.d.ts
CHANGED
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
* This is the Highflame Cedar schema used across all services.
|
|
4
4
|
*/
|
|
5
5
|
export declare const CEDAR_SCHEMA = "// Highflame Cedar Schema - Entity and Action Definitions\n// =======================================================\n// This file defines all entity types and actions used across Highflame services.\n// Used for code generation (EntityType and ActionType constants).\n//\n// For policy validation, use service-specific schemas:\n// - schemas/overwatch/schema.cedarschema (Guardian IDE security)\n// - schemas/palisade/schema.cedarschema (ML supply chain security)\n\nnamespace Highflame {\n\n// =============================================================================\n// ENTITIES\n// =============================================================================\n\nentity User {\n user_type: String,\n};\n\nentity Agent {\n agent_type: String,\n};\n\nentity Scanner {\n scanner_type: String,\n};\n\nentity Service {\n service_type: String,\n};\n\nentity Resource {};\n\nentity LlmPrompt {\n prompt_type: String,\n};\n\nentity ResponseData {};\n\nentity Tool {\n tool_name: String,\n};\n\nentity FilePath {\n path: String,\n};\n\nentity HttpEndpoint {\n hostname: String,\n};\n\nentity Server {\n server_name: String,\n};\n\nentity Artifact {\n artifact_format: String,\n};\n\nentity Repository {\n repo_url: String,\n};\n\nentity Package {\n package_name: String,\n};\n\nentity GitBranch {\n branch_name: String,\n};\n\nentity Model {\n model_name: String,\n};\n\nentity ExternalAPI {\n api_name: String,\n};\n\nentity Memory {\n memory_type: String,\n};\n\n// =============================================================================\n// ACTIONS\n// =============================================================================\n\naction process_prompt;\naction process_response;\naction invoke_model;\naction filter_content;\naction call_tool;\naction connect_server;\naction access_server_resource;\naction skip_guardrails;\naction read_file;\naction write_file;\naction delete_file;\naction http_request;\naction call_external_api;\naction execute_code;\naction run_tests;\naction run_build;\naction git_operation;\naction git_clone;\naction git_commit;\naction git_push;\naction git_pull;\naction git_merge;\naction git_checkout;\naction git_reset;\naction git_rebase;\naction delegate_task;\naction spawn_subprocess;\naction access_memory;\naction scan_target;\naction scan_package;\naction scan_artifact;\naction validate_integrity;\naction validate_provenance;\naction quarantine_artifact;\naction load_model;\naction deploy_model;\naction transfer_data;\naction export_data;\n}\n";
|
|
6
|
-
//# sourceMappingURL=schema.gen.d.ts.map
|
package/dist/schema.gen.js
CHANGED
package/dist/schemas.d.ts
CHANGED
package/dist/schemas.js
CHANGED
|
@@ -67,4 +67,3 @@ export const PALISADE_SCHEMA = fs.readFileSync(path.join(SCHEMAS_DIR, 'palisade'
|
|
|
67
67
|
* Used by PolicyBuilder UI to generate context dropdowns with type information.
|
|
68
68
|
*/
|
|
69
69
|
export const PALISADE_CONTEXT = fs.readFileSync(path.join(SCHEMAS_DIR, 'palisade', 'context.json'), 'utf-8');
|
|
70
|
-
//# sourceMappingURL=schemas.js.map
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Overwatch
|
|
2
|
+
* Overwatch Cedar schema
|
|
3
3
|
*
|
|
4
|
-
* Full Cedar schema for
|
|
5
|
-
* - Actions: process_prompt, call_tool, connect_server, read_file, write_file
|
|
6
|
-
* - Entities: User, Agent, LlmPrompt, Tool, Server, FilePath
|
|
7
|
-
* - Context attributes for threat detection and workspace security
|
|
4
|
+
* Full Cedar schema for overwatch, embedded at codegen time.
|
|
8
5
|
*/
|
|
9
|
-
export declare const OVERWATCH_SCHEMA = "// Overwatch (Guardian) Cedar Schema\n// ===================================\n// IDE Security & Policy Enforcement\n//\n// Overwatch protects IDE operations (prompts, tool calls, file access) by evaluating\n// threats detected by YARA and Javelin scanners against Cedar policies.\n//\n// Architecture:\n// User/Agent \u2192 IDE Hook \u2192 YARA/Javelin \u2192 Cedar Policy \u2192 Allow/Deny\n//\n// Supported IDEs:\n// - Cursor (beforeSubmitPrompt, beforeShellExecution, beforeMCPExecution, etc.)\n// - Claude Code (UserPromptSubmit, PreToolUse)\n// - GitHub Copilot (userPromptSubmitted, preToolUse)\n\nnamespace Overwatch {\n\n// =============================================================================\n// ENTITIES\n// =============================================================================\n\n// Human user or service account making requests to the IDE\nentity User {\n user_type: String, // \"external\" or \"internal\"\n email: String, // User email (optional)\n};\n\n// AI agent (Claude, GitHub Copilot, etc.)\nentity Agent {\n agent_type: String, // \"claude\", \"copilot\", etc.\n};\n\n// LLM prompt or session\nentity LlmPrompt {\n prompt_type: String, // \"user_prompt\", \"session\"\n};\n\n// MCP tool or native IDE tool\nentity Tool {\n tool_name: String, // \"shell\", \"read_file\", \"playwright\", etc.\n risk_level: String, // \"low\", \"medium\", \"high\"\n};\n\n// MCP server\nentity Server {\n server_name: String, // \"filesystem\", \"playwright\", etc.\n};\n\n// File system path\nentity FilePath {\n path: String,\n is_within_workspace: Bool,\n};\n\n// =============================================================================\n// ACTIONS\n// =============================================================================\n\n// User submits a prompt or receives AI response\naction process_prompt appliesTo {\n principal: [User, Agent],\n resource: [LlmPrompt],\n context: {\n // Event & Source\n content: String, // Raw content being scanned\n source: String, // IDE source: \"cursor\", \"claudecode\", \"github_copilot\"\n event: String, // Hook event name\n user_email: String, // User identifier\n\n // Workspace\n cwd
|
|
6
|
+
export declare const OVERWATCH_SCHEMA = "// Overwatch (Guardian) Cedar Schema\n// ===================================\n// IDE Security & Policy Enforcement\n//\n// Overwatch protects IDE operations (prompts, tool calls, file access) by evaluating\n// threats detected by YARA and Javelin scanners against Cedar policies.\n//\n// Architecture:\n// User/Agent \u2192 IDE Hook \u2192 YARA/Javelin \u2192 Cedar Policy \u2192 Allow/Deny\n//\n// Supported IDEs:\n// - Cursor (beforeSubmitPrompt, beforeShellExecution, beforeMCPExecution, etc.)\n// - Claude Code (UserPromptSubmit, PreToolUse)\n// - GitHub Copilot (userPromptSubmitted, preToolUse)\n\nnamespace Overwatch {\n\n// =============================================================================\n// ENTITIES - Organization Hierarchy (ReBAC)\n// =============================================================================\n\n// Top-level organization for multi-tenant policy enforcement\n// Enables policies like: principal in Overwatch::Organization::\"acme-corp\"\nentity Organization {\n name: String, // \"Acme Corp\", \"Highflame\"\n};\n\n// Team within an organization\n// Enables policies like: principal in Overwatch::Team::\"security-team\"\nentity Team in [Organization] {\n name: String, // \"security\", \"engineering\", \"devops\"\n};\n\n// =============================================================================\n// ENTITIES - Principals\n// =============================================================================\n\n// Human user or service account making requests to the IDE\nentity User in [Team] {\n user_type: String, // \"external\" or \"internal\"\n email: String, // User email (optional)\n};\n\n// AI agent (Claude, GitHub Copilot, etc.)\nentity Agent in [Team] {\n agent_type: String, // \"claude\", \"copilot\", etc.\n};\n\n// LLM prompt or session\nentity LlmPrompt {\n prompt_type: String, // \"user_prompt\", \"session\"\n};\n\n// MCP tool or native IDE tool\nentity Tool {\n tool_name: String, // \"shell\", \"read_file\", \"playwright\", etc.\n risk_level: String, // \"low\", \"medium\", \"high\"\n};\n\n// MCP server\nentity Server {\n server_name: String, // \"filesystem\", \"playwright\", etc.\n};\n\n// File system path\nentity FilePath {\n path: String,\n is_within_workspace: Bool,\n};\n\n// =============================================================================\n// ACTIONS\n// =============================================================================\n\n// User submits a prompt or receives AI response\naction process_prompt appliesTo {\n principal: [User, Agent],\n resource: [LlmPrompt],\n context: {\n // Event & Source\n content: String, // Raw content being scanned\n source: String, // IDE source: \"cursor\", \"claudecode\", \"github_copilot\"\n event: String, // Hook event name\n user_email: String, // User identifier\n\n // Workspace\n cwd?: String, // Current working directory\n workspace_root?: String, // Workspace/repository root\n\n // Threat Detection\n threat_count: Long, // Total threats detected\n highest_severity: String, // \"critical\", \"high\", \"medium\", \"low\"\n threat_categories: Set<String>, // Threat category names\n yara_threats: Set<String>, // YARA rule names\n max_threat_severity: Long, // Numeric severity (0-4)\n contains_secrets: Bool, // Whether secrets detected\n prompt_text?: String, // Same as content (legacy)\n response_content?: String, // Response content (if available)\n\n // Trust/Safety Scores (0-100, from Javelin/Lakera/LlamaGuard classifiers)\n // Required: content safety classifiers always run for prompt processing\n violence_score: Long, // Violence content detection score\n weapons_score: Long, // Weapons content detection score\n hate_speech_score: Long, // Hate speech detection score\n crime_score: Long, // Criminal content detection score\n sexual_score: Long, // Sexual content detection score\n profanity_score: Long, // Profanity detection score\n\n // Detector Confidence Scores (0-100, ML classifier confidence)\n // Required: ML classifiers always run for prompt processing\n pii_confidence: Long, // PII detection confidence\n injection_confidence: Long, // Prompt injection confidence\n jailbreak_confidence: Long, // Jailbreak detection confidence\n\n // Agent Security (0-100)\n // Required: agent security scanners always run for prompt processing\n indirect_injection_score: Long, // Indirect prompt injection risk\n },\n};\n\n// User calls a tool (native IDE tool or MCP tool)\naction call_tool appliesTo {\n principal: [User, Agent],\n resource: [Tool, FilePath],\n context: {\n // Event & Source\n content: String, // Raw content being scanned (e.g., shell command)\n source: String, // IDE source\n event: String, // Hook event name\n user_email: String, // User identifier\n\n // Tool & MCP\n tool_name?: String, // Normalized tool name (\"shell\", \"read_file\", etc.)\n mcp_server?: String, // MCP server name\n mcp_tool?: String, // MCP tool name\n\n // File & Path\n path?: String, // File path (if file operation)\n\n // Workspace\n cwd?: String,\n workspace_root?: String,\n\n // Threat Detection (optional: scanning may not have run before tool call)\n threat_count?: Long,\n highest_severity?: String,\n threat_categories?: Set<String>,\n yara_threats?: Set<String>,\n max_threat_severity?: Long,\n contains_secrets?: Bool,\n response_content?: String,\n\n // Trust/Safety Scores (0-100, from Javelin/Lakera/LlamaGuard classifiers)\n // Optional: only present when trust/safety classifiers have run\n violence_score?: Long, // Violence content detection score\n weapons_score?: Long, // Weapons content detection score\n hate_speech_score?: Long, // Hate speech detection score\n crime_score?: Long, // Criminal content detection score\n sexual_score?: Long, // Sexual content detection score\n profanity_score?: Long, // Profanity detection score\n\n // Detector Confidence Scores (0-100, ML classifier confidence)\n // Optional: only present when ML classifiers have run\n pii_confidence?: Long, // PII detection confidence\n injection_confidence?: Long, // Prompt injection confidence\n jailbreak_confidence?: Long, // Jailbreak detection confidence\n\n // Agent Security (0-100)\n // Optional: only present when agent security scanners have run\n tool_poisoning_score?: Long, // Tool description manipulation risk\n rug_pull_score?: Long, // Tool behavior mismatch risk\n indirect_injection_score?: Long, // Indirect prompt injection risk\n\n // MCP Trust\n // Optional: only present when MCP server verification has run\n mcp_server_verified?: Bool, // Whether server is from verified registry\n },\n};\n\n// Connect to an MCP server\naction connect_server appliesTo {\n principal: [User, Agent],\n resource: [Server],\n context: {\n content?: String, // No content to scan when connecting\n source: String,\n event: String,\n user_email: String,\n mcp_server?: String,\n threat_count?: Long, // Threat scanning may not run for connections\n highest_severity?: String,\n threat_categories?: Set<String>,\n max_threat_severity?: Long,\n\n // Agent Security (0-100)\n // Optional: only present when agent security scanners have run\n tool_poisoning_score?: Long, // Tool description manipulation risk\n rug_pull_score?: Long, // Tool behavior mismatch risk\n indirect_injection_score?: Long, // Indirect prompt injection risk\n\n // MCP Trust\n // Optional: only present when MCP server verification has run\n mcp_server_verified?: Bool, // Whether server is from verified registry\n },\n};\n\n// Read a file from disk\naction read_file appliesTo {\n principal: [User, Agent],\n resource: [FilePath],\n context: {\n content: String,\n source: String,\n event: String,\n user_email: String,\n path?: String,\n cwd?: String,\n workspace_root?: String,\n threat_count?: Long, // Threat scanning may not have run\n highest_severity?: String,\n threat_categories?: Set<String>,\n max_threat_severity?: Long,\n contains_secrets?: Bool,\n },\n};\n\n// Write a file to disk\naction write_file appliesTo {\n principal: [User, Agent],\n resource: [FilePath],\n context: {\n content: String,\n source: String,\n event: String,\n user_email: String,\n path?: String,\n cwd?: String,\n workspace_root?: String,\n threat_count?: Long, // Threat scanning may not have run\n highest_severity?: String,\n threat_categories?: Set<String>,\n max_threat_severity?: Long,\n contains_secrets?: Bool,\n },\n};\n\n}\n";
|
|
10
7
|
/**
|
|
11
8
|
* Palisade Cedar schema
|
|
12
9
|
*
|
|
13
|
-
* Full Cedar schema for
|
|
14
|
-
* - Actions: scan_artifact, validate_integrity, validate_provenance, quarantine_artifact, load_model, deploy_model
|
|
15
|
-
* - Entities: Scanner, Artifact, Package
|
|
16
|
-
* - Context attributes for ML security findings
|
|
10
|
+
* Full Cedar schema for palisade, embedded at codegen time.
|
|
17
11
|
*/
|
|
18
12
|
export declare const PALISADE_SCHEMA = "// Palisade Cedar Schema\n// =====================\n// ML Supply Chain Security & Artifact Scanning\n//\n// Palisade scans ML model artifacts (safetensors, GGUF, pickle, PyTorch) for\n// security vulnerabilities and enforces policies based on findings.\n//\n// Architecture:\n// Scanner \u2192 Validators (Pickle, SafeTensors, GGUF, etc.) \u2192 Cedar Policy \u2192 Allow/Deny/Quarantine\n//\n// Supported Formats:\n// - SafeTensors (.safetensors)\n// - GGUF (.gguf)\n// - Pickle (.pkl, .pickle, .pt)\n// - PyTorch (.pth, .pt)\n// - ONNX (.onnx)\n\nnamespace Palisade {\n\n// =============================================================================\n// ENTITIES\n// =============================================================================\n\n// Security scanner service\nentity Scanner {\n scanner_type: String, // \"palisade\", \"redteam\", etc.\n};\n\n// ML model artifact\nentity Artifact {\n artifact_format: String, // \"safetensors\", \"gguf\", \"pickle\", \"pytorch\", \"onnx\"\n path: String, // File path\n signed: Bool, // Whether digitally signed\n signer: String, // Who signed (if applicable)\n};\n\n// Software package (npm, PyPI, etc.)\nentity Package {\n package_name: String,\n package_version: String,\n};\n\n// =============================================================================\n// ACTIONS\n// =============================================================================\n\n// Scan an ML artifact for security issues\naction scan_artifact appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n // Core Finding & Severity\n finding_type: String, // Type of finding (e.g., \"backdoor_detected\", \"safetensors_integrity_violation\")\n severity: String, // \"CRITICAL\", \"HIGH\", \"MEDIUM\", \"LOW\", \"INFO\"\n environment: String, // \"production\", \"strict_production\", \"development\", \"permissive_development\", \"research\"\n\n // Artifact Metadata\n artifact_format: String, // \"safetensors\", \"gguf\", \"pickle\", \"pytorch\", \"onnx\"\n path: String, // File path to artifact\n artifact_signed: Bool, // Whether artifact is digitally signed\n provenance_signer: String, // \"unknown\", \"unsigned\", or signer name\n\n // Pickle Security\n pickle_exec_path_detected: Bool, // Pickle RCE execution path detected (CRITICAL)\n\n // Tokenizer Security\n tokenizer_added_tokens_count: Long, // Number of added tokens (0-5000+)\n\n // LoRA Security\n adapter_base_digest_mismatch: Bool, // LoRA adapter base model digest mismatch\n\n // GGUF Security\n gguf_suspicious_metadata: Bool, // GGUF metadata contains suspicious patterns\n\n // SafeTensors Security\n safetensors_integrity_violation: Bool, // SafeTensors file integrity violated\n\n // General Metadata Security\n metadata_malicious_pattern: Bool, // Metadata contains malicious patterns\n\n // CoSAI Maturity\n metadata_cosai_level_numeric: Long, // CoSAI maturity level (0-5, higher = more trustworthy)\n\n // Backdoor Detection\n match_count: Long, // Number of behavioral backdoor indicator matches\n },\n};\n\n// Validate artifact integrity (checksum, signature)\naction validate_integrity appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n artifact_format: String,\n path: String,\n artifact_signed: Bool,\n provenance_signer: String,\n safetensors_integrity_violation: Bool,\n finding_type: String,\n severity: String,\n },\n};\n\n// Validate artifact provenance (signer, origin)\naction validate_provenance appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n artifact_format: String,\n path: String,\n artifact_signed: Bool,\n provenance_signer: String,\n metadata_cosai_level_numeric: Long,\n finding_type: String,\n severity: String,\n },\n};\n\n// Quarantine a malicious artifact\naction quarantine_artifact appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n finding_type: String,\n severity: String,\n environment: String,\n artifact_format: String,\n path: String,\n },\n};\n\n// Load an ML model into memory\naction load_model appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n artifact_format: String,\n environment: String,\n artifact_signed: Bool,\n severity: String,\n },\n};\n\n// Deploy an ML model to production\naction deploy_model appliesTo {\n principal: [Scanner],\n resource: [Artifact],\n context: {\n artifact_format: String,\n environment: String,\n artifact_signed: Bool,\n provenance_signer: String,\n severity: String,\n },\n};\n\n// Scan a software package\naction scan_package appliesTo {\n principal: [Scanner],\n resource: [Package],\n context: {\n finding_type: String,\n severity: String,\n environment: String,\n },\n};\n\n}\n";
|
|
19
13
|
/**
|
|
20
|
-
* Context attribute metadata for
|
|
14
|
+
* Context attribute metadata for service actions.
|
|
21
15
|
* Used by PolicyBuilder UI to generate form fields.
|
|
22
16
|
*/
|
|
23
17
|
export interface ContextAttribute {
|
|
@@ -45,4 +39,3 @@ export declare const OVERWATCH_CONTEXT: ServiceContext;
|
|
|
45
39
|
* Palisade context metadata (parsed JSON)
|
|
46
40
|
*/
|
|
47
41
|
export declare const PALISADE_CONTEXT: ServiceContext;
|
|
48
|
-
//# sourceMappingURL=service-schemas.gen.d.ts.map
|