@highflame/policy 2.2.40 → 2.2.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_schemas/agent_ops/templates/ported/organization/organization_deny_baseline.cedar +2 -2
- package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_mcp_server_allowlist.cedar +24 -4
- package/_schemas/ai_gateway/context.json +300 -0
- package/_schemas/ai_gateway/detectors.json +928 -0
- package/_schemas/ai_gateway/schema.cedarschema +107 -3
- package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +24 -4
- package/_schemas/guardrails/detectors.json +2193 -0
- package/_schemas/guardrails/templates/mcp_server_allowlist.cedar +24 -4
- package/_schemas/guardrails/templates/profiles/output_protection/credentials.cedar +35 -0
- package/_schemas/guardrails/templates/profiles/output_protection/data_leakage.cedar +63 -0
- package/_schemas/guardrails/templates/profiles/output_protection/harmful_content.cedar +58 -0
- package/_schemas/guardrails/templates/profiles/output_protection/injection_carried_back.cedar +39 -0
- package/_schemas/guardrails/templates/templates.json +107 -11
- package/_schemas/overwatch/context.json +65 -0
- package/_schemas/overwatch/detectors.json +1129 -0
- package/_schemas/overwatch/schema.cedarschema +90 -0
- package/_schemas/sentry/detectors.json +857 -0
- package/dist/agent_ops-defaults.gen.js +26 -6
- package/dist/ai_gateway-defaults.gen.js +24 -4
- package/dist/ai_gateway-detectors.gen.d.ts +1 -1
- package/dist/ai_gateway-detectors.gen.js +22 -8
- package/dist/ai_gateway-entities.gen.js +5 -1
- package/dist/guardrails-defaults.gen.js +366 -15
- package/dist/guardrails-detectors.gen.d.ts +1 -1
- package/dist/guardrails-detectors.gen.js +22 -8
- package/dist/overwatch-context.gen.d.ts +3 -1
- package/dist/overwatch-context.gen.js +4 -0
- package/dist/overwatch-defaults.gen.js +25 -5
- package/dist/overwatch-detectors.gen.d.ts +1 -1
- package/dist/overwatch-detectors.gen.js +38 -8
- package/dist/service-schemas.gen.d.ts +2 -2
- package/dist/service-schemas.gen.js +267 -8
- package/package.json +1 -1
|
@@ -1193,8 +1193,23 @@ const GUARDRAILS_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR = `// ========================
|
|
|
1193
1193
|
// MCP Server Allowlist
|
|
1194
1194
|
// =============================================================================
|
|
1195
1195
|
// Restricts MCP server connections to a pre-approved list. Customize the
|
|
1196
|
-
// \`context.mcp_server\` values
|
|
1197
|
-
//
|
|
1196
|
+
// \`context.mcp_server\` values to match the allowed servers for your
|
|
1197
|
+
// environment — the SAME list appears in both rules and both must be edited.
|
|
1198
|
+
//
|
|
1199
|
+
// Both rules are conditional on the allowlist, and both are needed:
|
|
1200
|
+
//
|
|
1201
|
+
// permit ... when { allowlisted } grants access; Cedar is default-deny,
|
|
1202
|
+
// so without this nothing allows the
|
|
1203
|
+
// allowlisted servers either.
|
|
1204
|
+
// forbid ... unless { allowlisted } claws back everything else, including
|
|
1205
|
+
// when a broad Baseline Permit is loaded.
|
|
1206
|
+
//
|
|
1207
|
+
// The forbid MUST carry the negation. \`forbid\` always beats \`permit\` in Cedar,
|
|
1208
|
+
// so an UNCONDITIONAL forbid denies the allowlisted servers too — which is
|
|
1209
|
+
// what this template used to do (highflame-policy#186).
|
|
1210
|
+
//
|
|
1211
|
+
// The \`context has mcp_server\` guard stays inside both conditions: a request
|
|
1212
|
+
// naming no server cannot be on the allowlist, so it is denied.
|
|
1198
1213
|
//
|
|
1199
1214
|
// Context keys consumed:
|
|
1200
1215
|
// - mcp_server: String
|
|
@@ -1221,7 +1236,7 @@ when {
|
|
|
1221
1236
|
|
|
1222
1237
|
@id("tools.deny-non-allowlisted-mcp")
|
|
1223
1238
|
@name("Block non-allowlisted MCP servers")
|
|
1224
|
-
@description("Blocks connect_server
|
|
1239
|
+
@description("Blocks connect_server unless mcp_server is in the allowlist.")
|
|
1225
1240
|
@severity("medium")
|
|
1226
1241
|
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
1227
1242
|
@reject_message("MCP server connection blocked: server is not on the allowlist.")
|
|
@@ -1229,7 +1244,12 @@ forbid (
|
|
|
1229
1244
|
principal,
|
|
1230
1245
|
action == Guardrails::Action::"connect_server",
|
|
1231
1246
|
resource
|
|
1232
|
-
)
|
|
1247
|
+
)
|
|
1248
|
+
unless {
|
|
1249
|
+
context has mcp_server &&
|
|
1250
|
+
(context.mcp_server == "filesystem" ||
|
|
1251
|
+
context.mcp_server == "playwright")
|
|
1252
|
+
};
|
|
1233
1253
|
`;
|
|
1234
1254
|
const GUARDRAILS_SECURITY_CHAT_ASSISTANT_CEDAR = `// =============================================================================
|
|
1235
1255
|
// Chat Assistant — Security
|
|
@@ -3451,6 +3471,205 @@ when {
|
|
|
3451
3471
|
!(["treasury@example.com", "payroll@example.com"].contains(context.action_params.recipient))
|
|
3452
3472
|
};
|
|
3453
3473
|
`;
|
|
3474
|
+
const GUARDRAILS_PRIVACY_OUTPUT_PROTECTION_CEDAR = `// =============================================================================
|
|
3475
|
+
// Output Protection — Data Leakage
|
|
3476
|
+
// =============================================================================
|
|
3477
|
+
// Guards what the MODEL SAYS BACK, not what the user sends in.
|
|
3478
|
+
//
|
|
3479
|
+
// Every other guardrails template binds process_response alongside
|
|
3480
|
+
// process_prompt and the tool/file actions, which is right for a threat that
|
|
3481
|
+
// is the same in both directions. Data leakage is not that: the risk is
|
|
3482
|
+
// specific to egress, and a tenant who wants to police only their outputs had
|
|
3483
|
+
// no template to enable. That gap is why one deployed tenant hand-authored a
|
|
3484
|
+
// rule named "Block PII in outputs" and bound it to process_prompt — the only
|
|
3485
|
+
// action that covered responses before the direction split (ADR 0031).
|
|
3486
|
+
//
|
|
3487
|
+
// These rules bind process_response ALONE. That is the point: ADR 0031 created
|
|
3488
|
+
// the distinct trigger precisely so a policy could be scoped to one direction
|
|
3489
|
+
// from its head, and this profile is what that is for. Enabling it cannot
|
|
3490
|
+
// change how prompts are treated.
|
|
3491
|
+
//
|
|
3492
|
+
// Context keys consumed:
|
|
3493
|
+
// - pii_detected: Bool
|
|
3494
|
+
// - pii_count: Long
|
|
3495
|
+
//
|
|
3496
|
+
// Compliance:
|
|
3497
|
+
// - OWASP LLM02 (Sensitive Information Disclosure), OWASP LLM06
|
|
3498
|
+
//
|
|
3499
|
+
// Category: privacy
|
|
3500
|
+
// Namespace: Guardrails
|
|
3501
|
+
// =============================================================================
|
|
3502
|
+
|
|
3503
|
+
@id("privacy.output-block-pii")
|
|
3504
|
+
@name("Block PII in model responses")
|
|
3505
|
+
@description("Blocks process_response when the model's own output contains PII. Scoped to the response direction only — prompts are unaffected.")
|
|
3506
|
+
@severity("high")
|
|
3507
|
+
@tags("category:privacy,threat:data-leak,surface:process-response,detection:rule,owasp:llm02")
|
|
3508
|
+
@reject_message("Response blocked: the model's output contained personal data.")
|
|
3509
|
+
forbid (
|
|
3510
|
+
principal,
|
|
3511
|
+
action == Guardrails::Action::"process_response",
|
|
3512
|
+
resource
|
|
3513
|
+
)
|
|
3514
|
+
when {
|
|
3515
|
+
context has pii_detected && context.pii_detected == true
|
|
3516
|
+
};
|
|
3517
|
+
|
|
3518
|
+
// Bulk disclosure is a separate finding from a single incidental match: a
|
|
3519
|
+
// response carrying many distinct PII items is an exfiltration shape rather
|
|
3520
|
+
// than a mention, and is worth its own severity and message even though the
|
|
3521
|
+
// rule above already blocks it. Kept as a distinct rule so a tenant running
|
|
3522
|
+
// the first in monitor mode can still enforce on bulk.
|
|
3523
|
+
@id("privacy.output-block-bulk-pii")
|
|
3524
|
+
@name("Block bulk PII disclosure in model responses")
|
|
3525
|
+
@description("Blocks process_response when the output carries five or more PII items — a disclosure shape rather than an incidental mention.")
|
|
3526
|
+
@severity("critical")
|
|
3527
|
+
@tags("category:privacy,threat:data-leak,surface:process-response,detection:rule,owasp:llm06")
|
|
3528
|
+
@reject_message("Response blocked: the model's output contained bulk personal data.")
|
|
3529
|
+
forbid (
|
|
3530
|
+
principal,
|
|
3531
|
+
action == Guardrails::Action::"process_response",
|
|
3532
|
+
resource
|
|
3533
|
+
)
|
|
3534
|
+
when {
|
|
3535
|
+
context has pii_count && context.pii_count >= 5
|
|
3536
|
+
};
|
|
3537
|
+
`;
|
|
3538
|
+
const GUARDRAILS_TRUST_SAFETY_OUTPUT_PROTECTION_CEDAR = `// =============================================================================
|
|
3539
|
+
// Output Protection — Harmful Content
|
|
3540
|
+
// =============================================================================
|
|
3541
|
+
// The companion to data_leakage.cedar: what the model says back, judged for
|
|
3542
|
+
// safety rather than for disclosure.
|
|
3543
|
+
//
|
|
3544
|
+
// Same scoping rule and same reason — process_response ALONE (ADR 0031). A
|
|
3545
|
+
// tenant enabling this is saying "hold my model's answers to a standard",
|
|
3546
|
+
// which is a different decision from "police what users send me", and the two
|
|
3547
|
+
// should be separately enableable.
|
|
3548
|
+
//
|
|
3549
|
+
// Thresholds match the org-wide toxicity defaults rather than tightening them.
|
|
3550
|
+
// An output profile that silently enforced stricter limits than the tenant's
|
|
3551
|
+
// existing prompt rules would surprise anyone comparing the two.
|
|
3552
|
+
//
|
|
3553
|
+
// Context keys consumed:
|
|
3554
|
+
// - violence_score: Long (0-100)
|
|
3555
|
+
// - hate_speech_score: Long (0-100)
|
|
3556
|
+
// - sexual_score: Long (0-100)
|
|
3557
|
+
// - injection_score: Long (0-100)
|
|
3558
|
+
//
|
|
3559
|
+
// Compliance:
|
|
3560
|
+
// - OWASP LLM05 (Improper Output Handling), OWASP LLM01
|
|
3561
|
+
//
|
|
3562
|
+
// Category: trust-safety
|
|
3563
|
+
// Namespace: Guardrails
|
|
3564
|
+
// =============================================================================
|
|
3565
|
+
|
|
3566
|
+
@id("trust-safety.output-block-toxic")
|
|
3567
|
+
@name("Block toxic model responses")
|
|
3568
|
+
@description("Blocks process_response when the model's own output scores high for violence or hate speech.")
|
|
3569
|
+
@severity("high")
|
|
3570
|
+
@tags("category:trust-safety,threat:harmful,surface:process-response,detection:ml,owasp:llm05")
|
|
3571
|
+
@reject_message("Response blocked: the model's output was flagged as harmful.")
|
|
3572
|
+
forbid (
|
|
3573
|
+
principal,
|
|
3574
|
+
action == Guardrails::Action::"process_response",
|
|
3575
|
+
resource
|
|
3576
|
+
)
|
|
3577
|
+
when {
|
|
3578
|
+
context has violence_score && context.violence_score >= 70 ||
|
|
3579
|
+
context has hate_speech_score && context.hate_speech_score >= 70
|
|
3580
|
+
};
|
|
3581
|
+
|
|
3582
|
+
@id("trust-safety.output-block-sexual")
|
|
3583
|
+
@name("Block sexual content in model responses")
|
|
3584
|
+
@description("Blocks process_response when the model's own output scores high for sexual content.")
|
|
3585
|
+
@severity("critical")
|
|
3586
|
+
@tags("category:trust-safety,threat:sexual,surface:process-response,detection:ml,owasp:llm05")
|
|
3587
|
+
@reject_message("Response blocked: the model's output was flagged as explicit.")
|
|
3588
|
+
forbid (
|
|
3589
|
+
principal,
|
|
3590
|
+
action == Guardrails::Action::"process_response",
|
|
3591
|
+
resource
|
|
3592
|
+
)
|
|
3593
|
+
when {
|
|
3594
|
+
context has sexual_score && context.sexual_score >= 91
|
|
3595
|
+
};
|
|
3596
|
+
`;
|
|
3597
|
+
const GUARDRAILS_SECURITY_OUTPUT_BLOCK_INJECTION_CARRIED_BACK_CEDAR = `// =============================================================================
|
|
3598
|
+
// Output Protection — Injection Carried Back
|
|
3599
|
+
// =============================================================================
|
|
3600
|
+
// Split from harmful_content.cedar because its category is \`security\`, not
|
|
3601
|
+
// \`trust-safety\`, and a template wrapper may only carry rules of its own
|
|
3602
|
+
// category (HFP-LINT-TMPL-006). The split is the honest outcome: this is a
|
|
3603
|
+
// different threat with a different owner, not a toxicity variant.
|
|
3604
|
+
//
|
|
3605
|
+
// Same scoping rule as the rest of this profile — process_response ALONE.
|
|
3606
|
+
//
|
|
3607
|
+
// Context keys consumed:
|
|
3608
|
+
// - injection_score: Long (0-100)
|
|
3609
|
+
//
|
|
3610
|
+
// Compliance:
|
|
3611
|
+
// - OWASP LLM05 (Improper Output Handling)
|
|
3612
|
+
//
|
|
3613
|
+
// Category: security
|
|
3614
|
+
// Namespace: Guardrails
|
|
3615
|
+
// =============================================================================
|
|
3616
|
+
|
|
3617
|
+
// Injection scored on an OUTPUT is a different finding from injection scored on
|
|
3618
|
+
// a prompt. On the way in it is a user attacking the model; on the way out it
|
|
3619
|
+
// is content the model is handing to the caller — a downstream agent, a
|
|
3620
|
+
// renderer, or another tool — which is OWASP LLM05's improper output handling.
|
|
3621
|
+
// Worth its own rule so the two can be tuned and reasoned about separately.
|
|
3622
|
+
@id("security.output-block-injection-carried-back")
|
|
3623
|
+
@name("Block injection payloads carried back in model responses")
|
|
3624
|
+
@description("Blocks process_response when the output itself scores as an injection payload — content the caller may execute or forward.")
|
|
3625
|
+
@severity("high")
|
|
3626
|
+
@tags("category:security,threat:injection,surface:process-response,detection:ml,owasp:llm05")
|
|
3627
|
+
@reject_message("Response blocked: the model's output contained an injection payload.")
|
|
3628
|
+
forbid (
|
|
3629
|
+
principal,
|
|
3630
|
+
action == Guardrails::Action::"process_response",
|
|
3631
|
+
resource
|
|
3632
|
+
)
|
|
3633
|
+
when {
|
|
3634
|
+
context has injection_score && context.injection_score >= 80
|
|
3635
|
+
};
|
|
3636
|
+
`;
|
|
3637
|
+
const GUARDRAILS_DATA_PROTECTION_OUTPUT_BLOCK_SECRETS_CEDAR = `// =============================================================================
|
|
3638
|
+
// Output Protection — Credentials
|
|
3639
|
+
// =============================================================================
|
|
3640
|
+
// Split from data_leakage.cedar: secrets are category \`data-protection\`, PII is
|
|
3641
|
+
// \`privacy\`, and a template wrapper may only carry rules of its own category
|
|
3642
|
+
// (HFP-LINT-TMPL-006). Relabelling one to fit the other would put a wrong
|
|
3643
|
+
// category on the wire, where it drives signals[] and the severity rollup.
|
|
3644
|
+
//
|
|
3645
|
+
// Same scoping rule as the rest of this profile — process_response ALONE, so a
|
|
3646
|
+
// tenant can police what the model says without touching what users send.
|
|
3647
|
+
//
|
|
3648
|
+
// Context keys consumed:
|
|
3649
|
+
// - secrets_detected: Bool
|
|
3650
|
+
//
|
|
3651
|
+
// Compliance:
|
|
3652
|
+
// - OWASP LLM02 (Sensitive Information Disclosure)
|
|
3653
|
+
//
|
|
3654
|
+
// Category: data-protection
|
|
3655
|
+
// Namespace: Guardrails
|
|
3656
|
+
// =============================================================================
|
|
3657
|
+
|
|
3658
|
+
@id("data-protection.output-block-secrets")
|
|
3659
|
+
@name("Block secrets in model responses")
|
|
3660
|
+
@description("Blocks process_response when the model's own output contains credentials, API keys or tokens — the canonical way a leaked secret reaches a caller.")
|
|
3661
|
+
@severity("critical")
|
|
3662
|
+
@tags("category:data-protection,threat:secrets,surface:process-response,detection:rule,owasp:llm02")
|
|
3663
|
+
@reject_message("Response blocked: the model's output contained credentials.")
|
|
3664
|
+
forbid (
|
|
3665
|
+
principal,
|
|
3666
|
+
action == Guardrails::Action::"process_response",
|
|
3667
|
+
resource
|
|
3668
|
+
)
|
|
3669
|
+
when {
|
|
3670
|
+
context has secrets_detected && context.secrets_detected == true
|
|
3671
|
+
};
|
|
3672
|
+
`;
|
|
3454
3673
|
// =============================================================================
|
|
3455
3674
|
// CATEGORIES
|
|
3456
3675
|
// =============================================================================
|
|
@@ -3790,6 +4009,42 @@ export const GUARDRAILS_TEMPLATES = [
|
|
|
3790
4009
|
severity: 'high',
|
|
3791
4010
|
tags: ['category:agent-security', 'surface:call-tool', 'aarm:r3', 'posture:deny-default'],
|
|
3792
4011
|
},
|
|
4012
|
+
{
|
|
4013
|
+
id: 'privacy.output-protection',
|
|
4014
|
+
name: 'Output Protection — Data Leakage',
|
|
4015
|
+
description: 'Block PII, secrets and bulk disclosure in the model\'s own responses. Scoped to the response direction only, so prompts are unaffected.',
|
|
4016
|
+
category: 'privacy',
|
|
4017
|
+
cedarText: GUARDRAILS_PRIVACY_OUTPUT_PROTECTION_CEDAR,
|
|
4018
|
+
severity: 'critical',
|
|
4019
|
+
tags: ['category:privacy', 'threat:data-leak', 'surface:process-response', 'detection:rule'],
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
id: 'trust-safety.output-protection',
|
|
4023
|
+
name: 'Output Protection — Harmful Content',
|
|
4024
|
+
description: 'Hold the model\'s own responses to a safety standard: toxicity, explicit content, and injection payloads carried back to the caller. Response direction only.',
|
|
4025
|
+
category: 'trust-safety',
|
|
4026
|
+
cedarText: GUARDRAILS_TRUST_SAFETY_OUTPUT_PROTECTION_CEDAR,
|
|
4027
|
+
severity: 'critical',
|
|
4028
|
+
tags: ['category:trust-safety', 'threat:harmful', 'surface:process-response', 'detection:ml'],
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
id: 'security.output-block-injection-carried-back',
|
|
4032
|
+
name: 'Output Protection — Injection Carried Back',
|
|
4033
|
+
description: 'Block responses that themselves score as an injection payload — content a caller, downstream agent or renderer may execute. Response direction only.',
|
|
4034
|
+
category: 'security',
|
|
4035
|
+
cedarText: GUARDRAILS_SECURITY_OUTPUT_BLOCK_INJECTION_CARRIED_BACK_CEDAR,
|
|
4036
|
+
severity: 'high',
|
|
4037
|
+
tags: ['category:security', 'threat:injection', 'surface:process-response', 'detection:ml'],
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
id: 'data-protection.output-block-secrets',
|
|
4041
|
+
name: 'Output Protection — Credentials',
|
|
4042
|
+
description: 'Block responses whose own content contains credentials, API keys or tokens — the canonical way a leaked secret reaches a caller. Response direction only.',
|
|
4043
|
+
category: 'data-protection',
|
|
4044
|
+
cedarText: GUARDRAILS_DATA_PROTECTION_OUTPUT_BLOCK_SECRETS_CEDAR,
|
|
4045
|
+
severity: 'critical',
|
|
4046
|
+
tags: ['category:data-protection', 'threat:secrets', 'surface:process-response', 'detection:rule'],
|
|
4047
|
+
},
|
|
3793
4048
|
];
|
|
3794
4049
|
// =============================================================================
|
|
3795
4050
|
// TEMPLATES METADATA
|
|
@@ -3857,7 +4112,10 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
3857
4112
|
"category": "organization",
|
|
3858
4113
|
"file": "defaults/baseline.cedar",
|
|
3859
4114
|
"severity": "low",
|
|
3860
|
-
"tags": [
|
|
4115
|
+
"tags": [
|
|
4116
|
+
"category:organization",
|
|
4117
|
+
"posture:permit-default"
|
|
4118
|
+
],
|
|
3861
4119
|
"is_active": true
|
|
3862
4120
|
}
|
|
3863
4121
|
],
|
|
@@ -3869,7 +4127,10 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
3869
4127
|
"category": "organization",
|
|
3870
4128
|
"file": "defaults/baseline.cedar",
|
|
3871
4129
|
"severity": "low",
|
|
3872
|
-
"tags": [
|
|
4130
|
+
"tags": [
|
|
4131
|
+
"category:organization",
|
|
4132
|
+
"posture:permit-default"
|
|
4133
|
+
],
|
|
3873
4134
|
"auto_deploy": true
|
|
3874
4135
|
},
|
|
3875
4136
|
{
|
|
@@ -3879,7 +4140,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
3879
4140
|
"category": "data-protection",
|
|
3880
4141
|
"file": "defaults/secrets.cedar",
|
|
3881
4142
|
"severity": "critical",
|
|
3882
|
-
"tags": [
|
|
4143
|
+
"tags": [
|
|
4144
|
+
"category:data-protection",
|
|
4145
|
+
"threat:secrets",
|
|
4146
|
+
"owasp:llm06"
|
|
4147
|
+
]
|
|
3883
4148
|
},
|
|
3884
4149
|
{
|
|
3885
4150
|
"id": "security.injection",
|
|
@@ -4023,7 +4288,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4023
4288
|
"category": "agent-identity",
|
|
4024
4289
|
"file": "defaults/agent_identity.cedar",
|
|
4025
4290
|
"severity": "critical",
|
|
4026
|
-
"tags": [
|
|
4291
|
+
"tags": [
|
|
4292
|
+
"category:agent-identity",
|
|
4293
|
+
"scope:per-agent",
|
|
4294
|
+
"owasp:llm01"
|
|
4295
|
+
]
|
|
4027
4296
|
},
|
|
4028
4297
|
{
|
|
4029
4298
|
"id": "tools.mcp-tool-permissions",
|
|
@@ -4032,7 +4301,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4032
4301
|
"category": "tools",
|
|
4033
4302
|
"file": "mcp_tool_permissions.cedar",
|
|
4034
4303
|
"severity": "critical",
|
|
4035
|
-
"tags": [
|
|
4304
|
+
"tags": [
|
|
4305
|
+
"category:tools",
|
|
4306
|
+
"threat:supply-chain",
|
|
4307
|
+
"posture:deny-default"
|
|
4308
|
+
]
|
|
4036
4309
|
},
|
|
4037
4310
|
{
|
|
4038
4311
|
"id": "tools.mcp-server-allowlist",
|
|
@@ -4082,7 +4355,10 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4082
4355
|
"category": "data-protection",
|
|
4083
4356
|
"file": "profiles/code_agent/security.cedar",
|
|
4084
4357
|
"severity": "critical",
|
|
4085
|
-
"tags": [
|
|
4358
|
+
"tags": [
|
|
4359
|
+
"category:data-protection",
|
|
4360
|
+
"threat:secrets"
|
|
4361
|
+
]
|
|
4086
4362
|
},
|
|
4087
4363
|
{
|
|
4088
4364
|
"id": "security.code-agent-encoding",
|
|
@@ -4104,7 +4380,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4104
4380
|
"category": "security",
|
|
4105
4381
|
"file": "profiles/code_agent/path_security.cedar",
|
|
4106
4382
|
"severity": "critical",
|
|
4107
|
-
"tags": [
|
|
4383
|
+
"tags": [
|
|
4384
|
+
"category:security",
|
|
4385
|
+
"threat:secrets",
|
|
4386
|
+
"threat:path-traversal"
|
|
4387
|
+
]
|
|
4108
4388
|
},
|
|
4109
4389
|
{
|
|
4110
4390
|
"id": "agent-security.code-agent",
|
|
@@ -4143,7 +4423,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4143
4423
|
"category": "data-protection",
|
|
4144
4424
|
"file": "profiles/data_pipeline/data_protection.cedar",
|
|
4145
4425
|
"severity": "critical",
|
|
4146
|
-
"tags": [
|
|
4426
|
+
"tags": [
|
|
4427
|
+
"category:data-protection",
|
|
4428
|
+
"threat:secrets",
|
|
4429
|
+
"owasp:llm06"
|
|
4430
|
+
]
|
|
4147
4431
|
},
|
|
4148
4432
|
{
|
|
4149
4433
|
"id": "security.data-pipeline-block-injection",
|
|
@@ -4152,7 +4436,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4152
4436
|
"category": "security",
|
|
4153
4437
|
"file": "profiles/data_pipeline/security.cedar",
|
|
4154
4438
|
"severity": "high",
|
|
4155
|
-
"tags": [
|
|
4439
|
+
"tags": [
|
|
4440
|
+
"category:security",
|
|
4441
|
+
"threat:injection",
|
|
4442
|
+
"owasp:llm01"
|
|
4443
|
+
]
|
|
4156
4444
|
},
|
|
4157
4445
|
{
|
|
4158
4446
|
"id": "agent-security.data-pipeline",
|
|
@@ -4161,7 +4449,10 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4161
4449
|
"category": "agent-security",
|
|
4162
4450
|
"file": "profiles/data_pipeline/agentic_security.cedar",
|
|
4163
4451
|
"severity": "critical",
|
|
4164
|
-
"tags": [
|
|
4452
|
+
"tags": [
|
|
4453
|
+
"category:agent-security",
|
|
4454
|
+
"threat:exfiltration"
|
|
4455
|
+
]
|
|
4165
4456
|
},
|
|
4166
4457
|
{
|
|
4167
4458
|
"id": "agent-identity.multi-agent-trust",
|
|
@@ -4270,7 +4561,11 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4270
4561
|
"category": "data-protection",
|
|
4271
4562
|
"file": "profiles/advanced_detection/secrets.cedar",
|
|
4272
4563
|
"severity": "critical",
|
|
4273
|
-
"tags": [
|
|
4564
|
+
"tags": [
|
|
4565
|
+
"category:data-protection",
|
|
4566
|
+
"threat:secrets",
|
|
4567
|
+
"owasp:llm06"
|
|
4568
|
+
]
|
|
4274
4569
|
},
|
|
4275
4570
|
{
|
|
4276
4571
|
"id": "privacy.advanced-pii",
|
|
@@ -4300,6 +4595,62 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
4300
4595
|
"aarm:r3",
|
|
4301
4596
|
"posture:deny-default"
|
|
4302
4597
|
]
|
|
4598
|
+
},
|
|
4599
|
+
{
|
|
4600
|
+
"id": "privacy.output-protection",
|
|
4601
|
+
"name": "Output Protection — Data Leakage",
|
|
4602
|
+
"description": "Block PII, secrets and bulk disclosure in the model's own responses. Scoped to the response direction only, so prompts are unaffected.",
|
|
4603
|
+
"category": "privacy",
|
|
4604
|
+
"file": "profiles/output_protection/data_leakage.cedar",
|
|
4605
|
+
"severity": "critical",
|
|
4606
|
+
"tags": [
|
|
4607
|
+
"category:privacy",
|
|
4608
|
+
"threat:data-leak",
|
|
4609
|
+
"surface:process-response",
|
|
4610
|
+
"detection:rule"
|
|
4611
|
+
]
|
|
4612
|
+
},
|
|
4613
|
+
{
|
|
4614
|
+
"id": "trust-safety.output-protection",
|
|
4615
|
+
"name": "Output Protection — Harmful Content",
|
|
4616
|
+
"description": "Hold the model's own responses to a safety standard: toxicity, explicit content, and injection payloads carried back to the caller. Response direction only.",
|
|
4617
|
+
"category": "trust-safety",
|
|
4618
|
+
"file": "profiles/output_protection/harmful_content.cedar",
|
|
4619
|
+
"severity": "critical",
|
|
4620
|
+
"tags": [
|
|
4621
|
+
"category:trust-safety",
|
|
4622
|
+
"threat:harmful",
|
|
4623
|
+
"surface:process-response",
|
|
4624
|
+
"detection:ml"
|
|
4625
|
+
]
|
|
4626
|
+
},
|
|
4627
|
+
{
|
|
4628
|
+
"id": "security.output-block-injection-carried-back",
|
|
4629
|
+
"name": "Output Protection — Injection Carried Back",
|
|
4630
|
+
"description": "Block responses that themselves score as an injection payload — content a caller, downstream agent or renderer may execute. Response direction only.",
|
|
4631
|
+
"category": "security",
|
|
4632
|
+
"file": "profiles/output_protection/injection_carried_back.cedar",
|
|
4633
|
+
"severity": "high",
|
|
4634
|
+
"tags": [
|
|
4635
|
+
"category:security",
|
|
4636
|
+
"threat:injection",
|
|
4637
|
+
"surface:process-response",
|
|
4638
|
+
"detection:ml"
|
|
4639
|
+
]
|
|
4640
|
+
},
|
|
4641
|
+
{
|
|
4642
|
+
"id": "data-protection.output-block-secrets",
|
|
4643
|
+
"name": "Output Protection — Credentials",
|
|
4644
|
+
"description": "Block responses whose own content contains credentials, API keys or tokens — the canonical way a leaked secret reaches a caller. Response direction only.",
|
|
4645
|
+
"category": "data-protection",
|
|
4646
|
+
"file": "profiles/output_protection/credentials.cedar",
|
|
4647
|
+
"severity": "critical",
|
|
4648
|
+
"tags": [
|
|
4649
|
+
"category:data-protection",
|
|
4650
|
+
"threat:secrets",
|
|
4651
|
+
"surface:process-response",
|
|
4652
|
+
"detection:rule"
|
|
4653
|
+
]
|
|
4303
4654
|
}
|
|
4304
4655
|
]
|
|
4305
4656
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DetectorCard } from './detector-card-types.gen';
|
|
2
|
-
export declare const GUARDRAILS_DETECTOR_SPEC_VERSION = "1.
|
|
2
|
+
export declare const GUARDRAILS_DETECTOR_SPEC_VERSION = "1.4.0";
|
|
3
3
|
export declare const GUARDRAILS_DETECTORS: readonly DetectorCard[];
|
|
4
4
|
export declare const GUARDRAILS_FIELD_TO_DETECTORS: Readonly<Record<string, readonly string[]>>;
|
|
5
5
|
export declare function guardrailsDetectorById(id: string): DetectorCard | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const GUARDRAILS_DETECTOR_SPEC_VERSION = "1.
|
|
1
|
+
export const GUARDRAILS_DETECTOR_SPEC_VERSION = "1.4.0";
|
|
2
2
|
export const GUARDRAILS_DETECTORS = [
|
|
3
3
|
{
|
|
4
4
|
id: "pii",
|
|
@@ -401,11 +401,25 @@ export const GUARDRAILS_DETECTORS = [
|
|
|
401
401
|
inhouse: false,
|
|
402
402
|
model: null,
|
|
403
403
|
latencyP50Ms: 250,
|
|
404
|
-
emits: [{ name: "package_install_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff a package install/download command was recognized in the event." }, { name: "packages_checked", type: "Long", modifiable: false, semantic: "count", description: "Number of unique packages checked against osv.dev." }, { name: "malicious_package_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff any referenced package has a known-malicious (MAL-) OSV advisory." }, { name: "malicious_package_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "100 when a malicious package was detected, 0 otherwise." }, { name: "malicious_packages", type: "Set<String>", modifiable: false, semantic: "category_set", description: "Malicious packages as ecosystem/name[@version] strings." }, { name: "
|
|
404
|
+
emits: [{ name: "package_install_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff a package install/download command was recognized in the event." }, { name: "packages_checked", type: "Long", modifiable: false, semantic: "count", description: "Number of unique packages checked against osv.dev." }, { name: "malicious_package_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff any referenced package has a known-malicious (MAL-) OSV advisory." }, { name: "malicious_package_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "100 when a malicious package was detected, 0 otherwise." }, { name: "malicious_packages", type: "Set<String>", modifiable: false, semantic: "category_set", description: "Malicious packages as ecosystem/name[@version] strings." }, { name: "package_check_status", type: "String", modifiable: false, semantic: "category_label", description: "Set to 'degraded' when the osv.dev lookup failed (fail-open); empty otherwise." }],
|
|
405
405
|
supportedModes: ["enforce", "monitor", "alert"],
|
|
406
406
|
defendsAgainst: ["supply_chain"],
|
|
407
407
|
exampleAttacks: [{ title: "Typosquatted PyPI package install", vulnerabilityId: "supply_chain", snippet: "pip install reqeusts", expectedSignal: {} }],
|
|
408
408
|
},
|
|
409
|
+
{
|
|
410
|
+
id: "package_reputation",
|
|
411
|
+
displayName: "Package Reputation (OSV)",
|
|
412
|
+
category: "tool_safety",
|
|
413
|
+
stability: "preview",
|
|
414
|
+
tier: "slow",
|
|
415
|
+
inhouse: false,
|
|
416
|
+
model: null,
|
|
417
|
+
latencyP50Ms: 250,
|
|
418
|
+
emits: [{ name: "malicious_package_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff any referenced package has a known-malicious (MAL-) OSV advisory." }, { name: "malicious_packages", type: "Set<String>", modifiable: false, semantic: "category_set", description: "Malicious packages as ecosystem/name[@version] strings." }, { name: "package_names", type: "Set<String>", modifiable: false, semantic: "category_set", description: "Names of all packages parsed from install commands (without ecosystem prefix), e.g. 'requests', 'left-pad'. Available even when the osv.dev lookup fails." }, { name: "package_ecosystems", type: "Set<String>", modifiable: false, semantic: "category_set", description: "Unique package ecosystems seen in this event, e.g. 'PyPI', 'npm'. Useful for policies that restrict which ecosystems are permitted." }, { name: "package_advisory_count", type: "Long", modifiable: false, semantic: "count", description: "Total non-malicious OSV advisories (GHSA- / CVE- IDs) found across all checked packages. Excludes MAL- entries counted in malicious_package_detected." }, { name: "package_risk_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "Graduated supply-chain risk score (0-100). 100 when any malicious package is found; proportional to advisory_count for advisory-only packages; 0 when all packages are clean." }],
|
|
419
|
+
supportedModes: ["enforce", "monitor", "alert"],
|
|
420
|
+
defendsAgainst: ["supply_chain"],
|
|
421
|
+
exampleAttacks: [{ title: "Install of a package carrying a malicious advisory", vulnerabilityId: "supply_chain", snippet: "pip install evil-pkg", expectedSignal: { "malicious_package_detected": true } }],
|
|
422
|
+
},
|
|
409
423
|
{
|
|
410
424
|
id: "sentiment",
|
|
411
425
|
displayName: "Sentiment Analysis",
|
|
@@ -510,9 +524,9 @@ export const GUARDRAILS_FIELD_TO_DETECTORS = {
|
|
|
510
524
|
"loop_count": ["loop_detector"],
|
|
511
525
|
"loop_detected": ["loop_detector"],
|
|
512
526
|
"loop_tool": ["loop_detector"],
|
|
513
|
-
"malicious_package_detected": ["malicious_package"],
|
|
527
|
+
"malicious_package_detected": ["malicious_package", "package_reputation"],
|
|
514
528
|
"malicious_package_score": ["malicious_package"],
|
|
515
|
-
"malicious_packages": ["malicious_package"],
|
|
529
|
+
"malicious_packages": ["malicious_package", "package_reputation"],
|
|
516
530
|
"mcp_config_risk": ["mcp_risk"],
|
|
517
531
|
"mcp_input_request_detected": ["mcp_input_request"],
|
|
518
532
|
"mcp_input_request_methods": ["mcp_input_request"],
|
|
@@ -527,12 +541,12 @@ export const GUARDRAILS_FIELD_TO_DETECTORS = {
|
|
|
527
541
|
"mip_label_name": ["file_metadata"],
|
|
528
542
|
"multi_turn_detection": ["deepcontext"],
|
|
529
543
|
"non_ascii_score": ["security"],
|
|
530
|
-
"package_advisory_count": ["
|
|
544
|
+
"package_advisory_count": ["package_reputation"],
|
|
531
545
|
"package_check_status": ["malicious_package"],
|
|
532
|
-
"package_ecosystems": ["
|
|
546
|
+
"package_ecosystems": ["package_reputation"],
|
|
533
547
|
"package_install_detected": ["malicious_package"],
|
|
534
|
-
"package_names": ["
|
|
535
|
-
"package_risk_score": ["
|
|
548
|
+
"package_names": ["package_reputation"],
|
|
549
|
+
"package_risk_score": ["package_reputation"],
|
|
536
550
|
"packages_checked": ["malicious_package"],
|
|
537
551
|
"path_traversal_detected": ["path_traversal"],
|
|
538
552
|
"path_traversal_severity": ["path_traversal"],
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* Overwatch Cedar schema and are used at policy evaluation time.
|
|
6
6
|
*/
|
|
7
7
|
export declare const OverwatchContextKey: {
|
|
8
|
+
readonly BudgetExceeded: "budget_exceeded";
|
|
9
|
+
readonly BudgetRemainingPct: "budget_remaining_pct";
|
|
8
10
|
readonly Content: "content";
|
|
9
11
|
readonly CrimeScore: "crime_score";
|
|
10
12
|
readonly Cwd: "cwd";
|
|
@@ -99,4 +101,4 @@ export type OverwatchContextKey = (typeof OverwatchContextKey)[keyof typeof Over
|
|
|
99
101
|
* The full set of authorable context attribute keys for Overwatch.
|
|
100
102
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
101
103
|
*/
|
|
102
|
-
export declare const OverwatchContextKeys: readonly ["content", "crime_score", "cwd", "detected_threats", "event", "exec_target_paths", "exit_code", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_deep_context_score", "injection_pulse_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "path", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "prompt_text", "read_target_paths", "resolved_target_paths", "response_content", "role", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "unresolved_target", "user_email", "violence_score", "weapons_score", "workspace_root", "write_target_paths"];
|
|
104
|
+
export declare const OverwatchContextKeys: readonly ["budget_exceeded", "budget_remaining_pct", "content", "crime_score", "cwd", "detected_threats", "event", "exec_target_paths", "exit_code", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_deep_context_score", "injection_pulse_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "path", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "prompt_text", "read_target_paths", "resolved_target_paths", "response_content", "role", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "unresolved_target", "user_email", "violence_score", "weapons_score", "workspace_root", "write_target_paths"];
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* Overwatch Cedar schema and are used at policy evaluation time.
|
|
8
8
|
*/
|
|
9
9
|
export const OverwatchContextKey = {
|
|
10
|
+
BudgetExceeded: 'budget_exceeded',
|
|
11
|
+
BudgetRemainingPct: 'budget_remaining_pct',
|
|
10
12
|
Content: 'content',
|
|
11
13
|
CrimeScore: 'crime_score',
|
|
12
14
|
Cwd: 'cwd',
|
|
@@ -101,6 +103,8 @@ export const OverwatchContextKey = {
|
|
|
101
103
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
102
104
|
*/
|
|
103
105
|
export const OverwatchContextKeys = [
|
|
106
|
+
OverwatchContextKey.BudgetExceeded,
|
|
107
|
+
OverwatchContextKey.BudgetRemainingPct,
|
|
104
108
|
OverwatchContextKey.Content,
|
|
105
109
|
OverwatchContextKey.CrimeScore,
|
|
106
110
|
OverwatchContextKey.Cwd,
|