@highflame/policy 2.1.4 → 2.1.5
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/README.md +41 -0
- package/_schemas/guardrails/context.json +432 -6
- package/_schemas/guardrails/schema.cedarschema +39 -3
- package/_schemas/guardrails/templates/defaults/injection.cedar +6 -6
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +2 -2
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +1 -1
- package/_schemas/overwatch/context.json +232 -4
- package/_schemas/overwatch/schema.cedarschema +42 -4
- package/dist/guardrails-context.gen.d.ts +19 -2
- package/dist/guardrails-context.gen.js +19 -2
- package/dist/guardrails-defaults.gen.js +9 -9
- package/dist/overwatch-context.gen.d.ts +10 -0
- package/dist/overwatch-context.gen.js +10 -0
- package/dist/service-schemas.gen.d.ts +2 -2
- package/dist/service-schemas.gen.js +207 -24
- package/package.json +1 -1
- package/_schemas/guardrails/templates/profiles/chat_assistant.cedar +0 -85
- package/_schemas/guardrails/templates/profiles/code_agent.cedar +0 -125
- package/_schemas/guardrails/templates/profiles/data_pipeline.cedar +0 -111
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// Code Agent Profile
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// Optimized for coding assistants and agentic development tools.
|
|
5
|
-
// Focuses on tool risk, shell execution controls, agentic safety patterns,
|
|
6
|
-
// and data exfiltration prevention. Relaxed toxicity (code discussions may
|
|
7
|
-
// reference security topics legitimately).
|
|
8
|
-
//
|
|
9
|
-
// Deploy: One-click deploy scopes all rules to a specific application via
|
|
10
|
-
// resource == Guardrails::App::"<app-uuid>" (injected at deploy time).
|
|
11
|
-
//
|
|
12
|
-
// Category: agentic_security
|
|
13
|
-
// Namespace: Guardrails
|
|
14
|
-
// =============================================================================
|
|
15
|
-
|
|
16
|
-
@id("code-block-dangerous-tools")
|
|
17
|
-
@name("Block dangerous tool execution")
|
|
18
|
-
@description("Forbids tools classified as dangerous or with very high risk scores")
|
|
19
|
-
@severity("critical")
|
|
20
|
-
@tags("profile,code-agent,tools,agentic")
|
|
21
|
-
forbid (
|
|
22
|
-
principal,
|
|
23
|
-
action == Guardrails::Action::"call_tool",
|
|
24
|
-
resource
|
|
25
|
-
) when {
|
|
26
|
-
context.tool_risk_score > 85 ||
|
|
27
|
-
context.tool_category == "dangerous"
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
@id("code-block-shell-execution")
|
|
31
|
-
@name("Block direct shell commands")
|
|
32
|
-
@description("Forbids direct shell and command execution tools")
|
|
33
|
-
@severity("high")
|
|
34
|
-
@tags("profile,code-agent,tools,shell")
|
|
35
|
-
forbid (
|
|
36
|
-
principal,
|
|
37
|
-
action == Guardrails::Action::"call_tool",
|
|
38
|
-
resource
|
|
39
|
-
) when {
|
|
40
|
-
context.tool_name == "shell" ||
|
|
41
|
-
context.tool_name == "execute_command" ||
|
|
42
|
-
context.tool_name == "bash"
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
@id("code-block-sensitive-tools")
|
|
46
|
-
@name("Block sensitive tools with elevated risk")
|
|
47
|
-
@description("Forbids sensitive tool calls with risk above 70")
|
|
48
|
-
@severity("high")
|
|
49
|
-
@tags("profile,code-agent,tools,security")
|
|
50
|
-
forbid (
|
|
51
|
-
principal,
|
|
52
|
-
action == Guardrails::Action::"call_tool",
|
|
53
|
-
resource
|
|
54
|
-
) when {
|
|
55
|
-
context.tool_is_sensitive == true &&
|
|
56
|
-
context.tool_risk_score > 70
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
@id("code-block-loops")
|
|
60
|
-
@name("Block tool call loops")
|
|
61
|
-
@description("Stops infinite tool call loops in agentic workflows")
|
|
62
|
-
@severity("high")
|
|
63
|
-
@tags("profile,code-agent,agentic,loops")
|
|
64
|
-
forbid (
|
|
65
|
-
principal,
|
|
66
|
-
action == Guardrails::Action::"call_tool",
|
|
67
|
-
resource
|
|
68
|
-
) when {
|
|
69
|
-
context.loop_detected == true &&
|
|
70
|
-
context.loop_count > 5
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
@id("code-block-exfiltration")
|
|
74
|
-
@name("Block data exfiltration patterns")
|
|
75
|
-
@description("Detects and blocks read → send patterns indicating data theft")
|
|
76
|
-
@severity("critical")
|
|
77
|
-
@tags("profile,code-agent,agentic,exfiltration")
|
|
78
|
-
forbid (
|
|
79
|
-
principal,
|
|
80
|
-
action,
|
|
81
|
-
resource
|
|
82
|
-
) when {
|
|
83
|
-
context.suspicious_pattern == true &&
|
|
84
|
-
(context.pattern_type == "data_exfiltration" ||
|
|
85
|
-
context.pattern_type == "secret_exfiltration")
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
@id("code-block-high-sequence-risk")
|
|
89
|
-
@name("Block high-risk action sequences")
|
|
90
|
-
@description("Forbids suspicious multi-step tool sequences with risk above 75")
|
|
91
|
-
@severity("high")
|
|
92
|
-
@tags("profile,code-agent,agentic,patterns")
|
|
93
|
-
forbid (
|
|
94
|
-
principal,
|
|
95
|
-
action,
|
|
96
|
-
resource
|
|
97
|
-
) when {
|
|
98
|
-
context.sequence_risk > 75
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
@id("code-block-budget-exceeded")
|
|
102
|
-
@name("Block on budget exceeded")
|
|
103
|
-
@description("Stops agent execution when token budget is exhausted")
|
|
104
|
-
@severity("medium")
|
|
105
|
-
@tags("profile,code-agent,budget,cost-control")
|
|
106
|
-
forbid (
|
|
107
|
-
principal,
|
|
108
|
-
action,
|
|
109
|
-
resource
|
|
110
|
-
) when {
|
|
111
|
-
context.budget_exceeded == true
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
@id("code-block-write-secrets")
|
|
115
|
-
@name("Block writing secrets to files")
|
|
116
|
-
@description("Prevents code agents from writing detected secrets to output files")
|
|
117
|
-
@severity("critical")
|
|
118
|
-
@tags("profile,code-agent,secrets,security")
|
|
119
|
-
forbid (
|
|
120
|
-
principal,
|
|
121
|
-
action == Guardrails::Action::"write_file",
|
|
122
|
-
resource
|
|
123
|
-
) when {
|
|
124
|
-
context.contains_secrets == true
|
|
125
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// Data Pipeline Profile
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// Optimized for RAG pipelines, data processing agents, and retrieval systems.
|
|
5
|
-
// Strong PII and secrets protection, exfiltration detection, and output
|
|
6
|
-
// filtering. Focused on data integrity and privacy compliance.
|
|
7
|
-
//
|
|
8
|
-
// Deploy: One-click deploy scopes all rules to a specific application via
|
|
9
|
-
// resource == Guardrails::App::"<app-uuid>" (injected at deploy time).
|
|
10
|
-
//
|
|
11
|
-
// Category: privacy
|
|
12
|
-
// Namespace: Guardrails
|
|
13
|
-
// =============================================================================
|
|
14
|
-
|
|
15
|
-
@id("data-pii-block-all")
|
|
16
|
-
@name("Block all PII in data pipeline")
|
|
17
|
-
@description("Forbids any PII in both inputs and outputs — data pipelines must not process or leak PII")
|
|
18
|
-
@severity("critical")
|
|
19
|
-
@tags("profile,data-pipeline,pii,privacy")
|
|
20
|
-
forbid (
|
|
21
|
-
principal,
|
|
22
|
-
action == Guardrails::Action::"process_prompt",
|
|
23
|
-
resource
|
|
24
|
-
) when {
|
|
25
|
-
context.pii_detected == true
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
@id("data-pii-block-sensitive-types")
|
|
29
|
-
@name("Block sensitive PII types strictly")
|
|
30
|
-
@description("Zero-tolerance for SSN, credit cards, passport numbers, and medical IDs in data pipelines")
|
|
31
|
-
@severity("critical")
|
|
32
|
-
@tags("profile,data-pipeline,pii,compliance")
|
|
33
|
-
forbid (
|
|
34
|
-
principal,
|
|
35
|
-
action == Guardrails::Action::"process_prompt",
|
|
36
|
-
resource
|
|
37
|
-
) when {
|
|
38
|
-
context.pii_types.contains("ssn") ||
|
|
39
|
-
context.pii_types.contains("credit_card") ||
|
|
40
|
-
context.pii_types.contains("passport") ||
|
|
41
|
-
context.pii_types.contains("medical_id") ||
|
|
42
|
-
context.pii_types.contains("tax_id")
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
@id("data-secrets-strict")
|
|
46
|
-
@name("Strict secrets detection for data pipeline")
|
|
47
|
-
@description("Blocks any content containing secrets — even a single match")
|
|
48
|
-
@severity("critical")
|
|
49
|
-
@tags("profile,data-pipeline,secrets,security")
|
|
50
|
-
forbid (
|
|
51
|
-
principal,
|
|
52
|
-
action,
|
|
53
|
-
resource
|
|
54
|
-
) when {
|
|
55
|
-
context.contains_secrets == true
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
@id("data-block-exfiltration")
|
|
59
|
-
@name("Block data exfiltration from pipeline")
|
|
60
|
-
@description("Prevents retrieval data from being sent to external endpoints")
|
|
61
|
-
@severity("critical")
|
|
62
|
-
@tags("profile,data-pipeline,exfiltration,security")
|
|
63
|
-
forbid (
|
|
64
|
-
principal,
|
|
65
|
-
action,
|
|
66
|
-
resource
|
|
67
|
-
) when {
|
|
68
|
-
context.suspicious_pattern == true &&
|
|
69
|
-
(context.pattern_type == "data_exfiltration" ||
|
|
70
|
-
context.pattern_type == "db_exfiltration")
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
@id("data-block-high-risk-tools")
|
|
74
|
-
@name("Block high-risk tools in pipeline")
|
|
75
|
-
@description("Forbids tools with elevated risk in data processing context")
|
|
76
|
-
@severity("high")
|
|
77
|
-
@tags("profile,data-pipeline,tools,security")
|
|
78
|
-
forbid (
|
|
79
|
-
principal,
|
|
80
|
-
action == Guardrails::Action::"call_tool",
|
|
81
|
-
resource
|
|
82
|
-
) when {
|
|
83
|
-
context.tool_risk_score > 60
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
@id("data-block-output-secrets")
|
|
87
|
-
@name("Block secrets in pipeline outputs")
|
|
88
|
-
@description("Prevents data pipeline from writing secrets to any output")
|
|
89
|
-
@severity("critical")
|
|
90
|
-
@tags("profile,data-pipeline,secrets,output")
|
|
91
|
-
forbid (
|
|
92
|
-
principal,
|
|
93
|
-
action == Guardrails::Action::"write_file",
|
|
94
|
-
resource
|
|
95
|
-
) when {
|
|
96
|
-
context.contains_secrets == true ||
|
|
97
|
-
context.secret_count > 0
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
@id("data-injection-defense")
|
|
101
|
-
@name("Pipeline injection defense")
|
|
102
|
-
@description("Lower injection threshold for data pipelines — RAG inputs are high-risk for injection")
|
|
103
|
-
@severity("high")
|
|
104
|
-
@tags("profile,data-pipeline,injection,security")
|
|
105
|
-
forbid (
|
|
106
|
-
principal,
|
|
107
|
-
action == Guardrails::Action::"process_prompt",
|
|
108
|
-
resource
|
|
109
|
-
) when {
|
|
110
|
-
context.injection_score > 65
|
|
111
|
-
};
|