@highflame/policy 2.1.2 → 2.1.4
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/guardrails/context.json +37 -73
- package/_schemas/overwatch/context.json +211 -1
- package/_schemas/palisade/context.json +1 -1
- package/_schemas/sentry/context.json +1165 -0
- package/_schemas/sentry/schema.cedarschema +388 -0
- package/_schemas/sentry/templates/defaults/baseline.cedar +24 -0
- package/_schemas/sentry/templates/defaults/content_safety.cedar +232 -0
- package/_schemas/sentry/templates/defaults/file_safety.cedar +174 -0
- package/_schemas/sentry/templates/defaults/organization.cedar +207 -0
- package/_schemas/sentry/templates/defaults/pii.cedar +229 -0
- package/_schemas/sentry/templates/defaults/semantic.cedar +167 -0
- package/_schemas/sentry/templates/templates.json +93 -0
- package/dist/builder.d.ts +32 -0
- package/dist/builder.js +6 -6
- package/dist/condition-groups.d.ts +69 -0
- package/dist/condition-groups.js +305 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/overwatch-context.gen.d.ts +7 -0
- package/dist/overwatch-context.gen.js +7 -0
- package/dist/overwatch-defaults.gen.js +358 -370
- package/dist/sentry-context.gen.d.ts +76 -0
- package/dist/sentry-context.gen.js +77 -0
- package/dist/sentry-defaults.gen.d.ts +61 -0
- package/dist/sentry-defaults.gen.js +1235 -0
- package/dist/sentry-entities.gen.d.ts +11 -0
- package/dist/sentry-entities.gen.js +33 -0
- package/dist/service-schemas.gen.d.ts +10 -0
- package/dist/service-schemas.gen.js +659 -6
- package/dist/types.d.ts +6 -1
- package/dist/types.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context attribute keys for Sentry Sentry browser security — monitors AI chat interactions and enforces data-protection, content-safety, and compliance policies.
|
|
3
|
+
*
|
|
4
|
+
* These constants correspond to the context attributes defined in the
|
|
5
|
+
* Sentry Cedar schema and are used at policy evaluation time.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SentryContextKey: {
|
|
8
|
+
readonly CodeLanguages: "code_languages";
|
|
9
|
+
readonly CodeRatio: "code_ratio";
|
|
10
|
+
readonly ContainsCode: "contains_code";
|
|
11
|
+
readonly ContainsInvisibleChars: "contains_invisible_chars";
|
|
12
|
+
readonly ContainsSecrets: "contains_secrets";
|
|
13
|
+
readonly Content: "content";
|
|
14
|
+
readonly ContentTopics: "content_topics";
|
|
15
|
+
readonly CrimeScore: "crime_score";
|
|
16
|
+
readonly DetectedLanguage: "detected_language";
|
|
17
|
+
readonly DetectedScript: "detected_script";
|
|
18
|
+
readonly DetectedThreats: "detected_threats";
|
|
19
|
+
readonly EncodedContentDetected: "encoded_content_detected";
|
|
20
|
+
readonly EncodedCount: "encoded_count";
|
|
21
|
+
readonly EncodedScore: "encoded_score";
|
|
22
|
+
readonly EncodedTypes: "encoded_types";
|
|
23
|
+
readonly Event: "event";
|
|
24
|
+
readonly FactualityScore: "factuality_score";
|
|
25
|
+
readonly FileExtension: "file_extension";
|
|
26
|
+
readonly FileName: "file_name";
|
|
27
|
+
readonly FileSizeBytes: "file_size_bytes";
|
|
28
|
+
readonly FileType: "file_type";
|
|
29
|
+
readonly HallucinationScore: "hallucination_score";
|
|
30
|
+
readonly HateSpeechScore: "hate_speech_score";
|
|
31
|
+
readonly HighestSeverity: "highest_severity";
|
|
32
|
+
readonly InjectionScore: "injection_score";
|
|
33
|
+
readonly InvisibleCharsScore: "invisible_chars_score";
|
|
34
|
+
readonly IsEncrypted: "is_encrypted";
|
|
35
|
+
readonly IsEnglish: "is_english";
|
|
36
|
+
readonly IsLatinScript: "is_latin_script";
|
|
37
|
+
readonly IsRightsManaged: "is_rights_managed";
|
|
38
|
+
readonly JailbreakScore: "jailbreak_score";
|
|
39
|
+
readonly KeywordCategories: "keyword_categories";
|
|
40
|
+
readonly KeywordCount: "keyword_count";
|
|
41
|
+
readonly KeywordMatched: "keyword_matched";
|
|
42
|
+
readonly LanguageConfidence: "language_confidence";
|
|
43
|
+
readonly MaxThreatSeverity: "max_threat_severity";
|
|
44
|
+
readonly MipLabelId: "mip_label_id";
|
|
45
|
+
readonly MipLabelName: "mip_label_name";
|
|
46
|
+
readonly PasteLength: "paste_length";
|
|
47
|
+
readonly PasteSourceApp: "paste_source_app";
|
|
48
|
+
readonly PasteSourceUrl: "paste_source_url";
|
|
49
|
+
readonly PhishingDetected: "phishing_detected";
|
|
50
|
+
readonly PiiConfidence: "pii_confidence";
|
|
51
|
+
readonly PiiCount: "pii_count";
|
|
52
|
+
readonly PiiDetected: "pii_detected";
|
|
53
|
+
readonly PiiTypes: "pii_types";
|
|
54
|
+
readonly ProfanityScore: "profanity_score";
|
|
55
|
+
readonly ScriptConfidence: "script_confidence";
|
|
56
|
+
readonly SecretCount: "secret_count";
|
|
57
|
+
readonly SecretTypes: "secret_types";
|
|
58
|
+
readonly SensitivityLevel: "sensitivity_level";
|
|
59
|
+
readonly SessionInjectionDetected: "session_injection_detected";
|
|
60
|
+
readonly SessionPiiDetected: "session_pii_detected";
|
|
61
|
+
readonly SessionPiiTypes: "session_pii_types";
|
|
62
|
+
readonly SessionSecretTypes: "session_secret_types";
|
|
63
|
+
readonly SessionSecretsDetected: "session_secrets_detected";
|
|
64
|
+
readonly SessionThreatTurns: "session_threat_turns";
|
|
65
|
+
readonly SexualScore: "sexual_score";
|
|
66
|
+
readonly Source: "source";
|
|
67
|
+
readonly TargetApp: "target_app";
|
|
68
|
+
readonly TargetUrl: "target_url";
|
|
69
|
+
readonly ThreatCategories: "threat_categories";
|
|
70
|
+
readonly ThreatCount: "threat_count";
|
|
71
|
+
readonly TopicConfidence: "topic_confidence";
|
|
72
|
+
readonly UserEmail: "user_email";
|
|
73
|
+
readonly ViolenceScore: "violence_score";
|
|
74
|
+
readonly WeaponsScore: "weapons_score";
|
|
75
|
+
};
|
|
76
|
+
export type SentryContextKey = (typeof SentryContextKey)[keyof typeof SentryContextKey];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Code generated by highflame-policy-codegen. DO NOT EDIT.
|
|
2
|
+
// Source: schemas/sentry/context.json
|
|
3
|
+
/**
|
|
4
|
+
* Context attribute keys for Sentry Sentry browser security — monitors AI chat interactions and enforces data-protection, content-safety, and compliance policies.
|
|
5
|
+
*
|
|
6
|
+
* These constants correspond to the context attributes defined in the
|
|
7
|
+
* Sentry Cedar schema and are used at policy evaluation time.
|
|
8
|
+
*/
|
|
9
|
+
export const SentryContextKey = {
|
|
10
|
+
CodeLanguages: 'code_languages',
|
|
11
|
+
CodeRatio: 'code_ratio',
|
|
12
|
+
ContainsCode: 'contains_code',
|
|
13
|
+
ContainsInvisibleChars: 'contains_invisible_chars',
|
|
14
|
+
ContainsSecrets: 'contains_secrets',
|
|
15
|
+
Content: 'content',
|
|
16
|
+
ContentTopics: 'content_topics',
|
|
17
|
+
CrimeScore: 'crime_score',
|
|
18
|
+
DetectedLanguage: 'detected_language',
|
|
19
|
+
DetectedScript: 'detected_script',
|
|
20
|
+
DetectedThreats: 'detected_threats',
|
|
21
|
+
EncodedContentDetected: 'encoded_content_detected',
|
|
22
|
+
EncodedCount: 'encoded_count',
|
|
23
|
+
EncodedScore: 'encoded_score',
|
|
24
|
+
EncodedTypes: 'encoded_types',
|
|
25
|
+
Event: 'event',
|
|
26
|
+
FactualityScore: 'factuality_score',
|
|
27
|
+
FileExtension: 'file_extension',
|
|
28
|
+
FileName: 'file_name',
|
|
29
|
+
FileSizeBytes: 'file_size_bytes',
|
|
30
|
+
FileType: 'file_type',
|
|
31
|
+
HallucinationScore: 'hallucination_score',
|
|
32
|
+
HateSpeechScore: 'hate_speech_score',
|
|
33
|
+
HighestSeverity: 'highest_severity',
|
|
34
|
+
InjectionScore: 'injection_score',
|
|
35
|
+
InvisibleCharsScore: 'invisible_chars_score',
|
|
36
|
+
IsEncrypted: 'is_encrypted',
|
|
37
|
+
IsEnglish: 'is_english',
|
|
38
|
+
IsLatinScript: 'is_latin_script',
|
|
39
|
+
IsRightsManaged: 'is_rights_managed',
|
|
40
|
+
JailbreakScore: 'jailbreak_score',
|
|
41
|
+
KeywordCategories: 'keyword_categories',
|
|
42
|
+
KeywordCount: 'keyword_count',
|
|
43
|
+
KeywordMatched: 'keyword_matched',
|
|
44
|
+
LanguageConfidence: 'language_confidence',
|
|
45
|
+
MaxThreatSeverity: 'max_threat_severity',
|
|
46
|
+
MipLabelId: 'mip_label_id',
|
|
47
|
+
MipLabelName: 'mip_label_name',
|
|
48
|
+
PasteLength: 'paste_length',
|
|
49
|
+
PasteSourceApp: 'paste_source_app',
|
|
50
|
+
PasteSourceUrl: 'paste_source_url',
|
|
51
|
+
PhishingDetected: 'phishing_detected',
|
|
52
|
+
PiiConfidence: 'pii_confidence',
|
|
53
|
+
PiiCount: 'pii_count',
|
|
54
|
+
PiiDetected: 'pii_detected',
|
|
55
|
+
PiiTypes: 'pii_types',
|
|
56
|
+
ProfanityScore: 'profanity_score',
|
|
57
|
+
ScriptConfidence: 'script_confidence',
|
|
58
|
+
SecretCount: 'secret_count',
|
|
59
|
+
SecretTypes: 'secret_types',
|
|
60
|
+
SensitivityLevel: 'sensitivity_level',
|
|
61
|
+
SessionInjectionDetected: 'session_injection_detected',
|
|
62
|
+
SessionPiiDetected: 'session_pii_detected',
|
|
63
|
+
SessionPiiTypes: 'session_pii_types',
|
|
64
|
+
SessionSecretTypes: 'session_secret_types',
|
|
65
|
+
SessionSecretsDetected: 'session_secrets_detected',
|
|
66
|
+
SessionThreatTurns: 'session_threat_turns',
|
|
67
|
+
SexualScore: 'sexual_score',
|
|
68
|
+
Source: 'source',
|
|
69
|
+
TargetApp: 'target_app',
|
|
70
|
+
TargetUrl: 'target_url',
|
|
71
|
+
ThreatCategories: 'threat_categories',
|
|
72
|
+
ThreatCount: 'threat_count',
|
|
73
|
+
TopicConfidence: 'topic_confidence',
|
|
74
|
+
UserEmail: 'user_email',
|
|
75
|
+
ViolenceScore: 'violence_score',
|
|
76
|
+
WeaponsScore: 'weapons_score',
|
|
77
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sentry policy category identifiers.
|
|
3
|
+
* Maps to UI tab names in Studio.
|
|
4
|
+
*/
|
|
5
|
+
export type SentryCategory = 'pii' | 'semantic' | 'content_safety' | 'file_safety' | 'organization';
|
|
6
|
+
/**
|
|
7
|
+
* Category metadata for UI display.
|
|
8
|
+
*/
|
|
9
|
+
export interface SentryCategoryInfo {
|
|
10
|
+
id: SentryCategory;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A default policy that is auto-created for new projects.
|
|
16
|
+
*/
|
|
17
|
+
export interface SentryDefaultPolicy {
|
|
18
|
+
/** Template identifier */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Human-readable name */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Description for UI display */
|
|
23
|
+
description: string;
|
|
24
|
+
/** Policy category */
|
|
25
|
+
category: SentryCategory;
|
|
26
|
+
/** Cedar policy text (source of truth) */
|
|
27
|
+
cedarText: string;
|
|
28
|
+
/** Severity level */
|
|
29
|
+
severity: string;
|
|
30
|
+
/** Tags for filtering */
|
|
31
|
+
tags: string[];
|
|
32
|
+
/** Whether this default should be activated immediately */
|
|
33
|
+
isActive: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A policy template available for users to create from.
|
|
37
|
+
*/
|
|
38
|
+
export interface SentryTemplate {
|
|
39
|
+
/** Template identifier */
|
|
40
|
+
id: string;
|
|
41
|
+
/** Human-readable name */
|
|
42
|
+
name: string;
|
|
43
|
+
/** Description for UI display */
|
|
44
|
+
description: string;
|
|
45
|
+
/** Policy category */
|
|
46
|
+
category: SentryCategory;
|
|
47
|
+
/** Cedar policy text */
|
|
48
|
+
cedarText: string;
|
|
49
|
+
/** Severity level */
|
|
50
|
+
severity: string;
|
|
51
|
+
/** Tags for filtering */
|
|
52
|
+
tags: string[];
|
|
53
|
+
}
|
|
54
|
+
export declare const SENTRY_CATEGORIES: SentryCategoryInfo[];
|
|
55
|
+
export declare const SENTRY_DEFAULTS: SentryDefaultPolicy[];
|
|
56
|
+
export declare const SENTRY_TEMPLATES: SentryTemplate[];
|
|
57
|
+
/** Raw templates.json metadata for the Sentry service. */
|
|
58
|
+
export declare const SENTRY_TEMPLATES_JSON: string;
|
|
59
|
+
export declare function getSentryDefaultsByCategory(category: SentryCategory): SentryDefaultPolicy[];
|
|
60
|
+
export declare function getSentryTemplatesByCategory(category: SentryCategory): SentryTemplate[];
|
|
61
|
+
export declare function getSentryTemplateById(id: string): SentryTemplate | undefined;
|