@highflame/policy 2.2.36 → 2.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_schemas/agent_ops/context.json +792 -0
- package/_schemas/agent_ops/schema.cedarschema +127 -109
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar +6 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_escalation.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_inter_agent_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_claude_block_injection.cedar +2 -2
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_defaults.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_trust.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_defaults.cedar +18 -12
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_semantic.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_toxicity.cedar +4 -4
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_advanced_secrets.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_data_pipeline.cedar +2 -1
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_defaults.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_advanced_pii.cedar +42 -21
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_defaults.cedar +14 -7
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_pii_model.cedar +10 -5
- package/_schemas/agent_ops/templates/ported/organization/organization_team_permissions.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_advanced_block_critical_severity.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/security_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/threat-detection/security_data_pipeline_block_injection.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +5 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +9 -7
- package/_schemas/ai_gateway/context.json +278 -0
- package/_schemas/ai_gateway/schema.cedarschema +37 -7
- package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +5 -16
- package/_schemas/ai_gateway/templates/defaults/pii.cedar +14 -7
- package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +42 -21
- package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/ai_gateway/templates/defaults/semantic.cedar +9 -74
- package/_schemas/ai_gateway/templates/defaults/tools.cedar +7 -38
- package/_schemas/ai_gateway/templates/secrets.cedar +3 -3
- package/_schemas/guardrails/context.json +671 -0
- package/_schemas/guardrails/schema.cedarschema +23 -2
- package/_schemas/guardrails/templates/defaults/agent_identity.cedar +3 -3
- package/_schemas/guardrails/templates/defaults/injection.cedar +9 -8
- package/_schemas/guardrails/templates/defaults/pii.cedar +14 -7
- package/_schemas/guardrails/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/guardrails/templates/defaults/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/defaults/security_patterns.cedar +5 -3
- package/_schemas/guardrails/templates/defaults/semantic.cedar +6 -6
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +6 -6
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +6 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +9 -8
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +42 -21
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +2 -1
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +3 -2
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +6 -6
- package/_schemas/guardrails/templates/templates.json +0 -9
- package/dist/agent_ops-defaults.gen.js +177 -120
- package/dist/agent_ops-entities.gen.js +5 -1
- package/dist/ai_gateway-defaults.gen.js +90 -164
- package/dist/ai_gateway-entities.gen.js +6 -2
- package/dist/engine.d.ts +10 -0
- package/dist/engine.js +25 -1
- package/dist/guardrails-defaults.gen.js +144 -145
- package/dist/guardrails-entities.gen.js +5 -1
- package/dist/service-schemas.gen.d.ts +3 -3
- package/dist/service-schemas.gen.js +480 -118
- package/package.json +1 -1
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +0 -30
- package/_schemas/mcp_gateway/context.json +0 -655
- package/_schemas/mcp_gateway/schema.cedarschema +0 -342
- package/_schemas/mcp_gateway/templates/defaults/agent_security.cedar +0 -140
- package/_schemas/mcp_gateway/templates/defaults/baseline.cedar +0 -23
- package/_schemas/mcp_gateway/templates/defaults/semantic.cedar +0 -105
- package/_schemas/mcp_gateway/templates/defaults/tools.cedar +0 -92
- package/_schemas/mcp_gateway/templates/mcp_server_allowlist.cedar +0 -33
- package/_schemas/mcp_gateway/templates/mcp_tool_permissions.cedar +0 -77
- package/_schemas/mcp_gateway/templates/templates.json +0 -89
- package/dist/mcp_gateway-context.gen.d.ts +0 -51
- package/dist/mcp_gateway-context.gen.js +0 -52
- package/dist/mcp_gateway-defaults.gen.d.ts +0 -61
- package/dist/mcp_gateway-defaults.gen.js +0 -668
- package/dist/mcp_gateway-entities.gen.d.ts +0 -11
- package/dist/mcp_gateway-entities.gen.js +0 -37
|
@@ -795,6 +795,798 @@
|
|
|
795
795
|
}
|
|
796
796
|
]
|
|
797
797
|
},
|
|
798
|
+
{
|
|
799
|
+
"name": "process_response",
|
|
800
|
+
"description": "Process a model response (LLM chat completion output) — threat focus: data leakage in output, harmful content, hallucination, indirect injection carried back to the caller. Distinct trigger from process_prompt (ADR 0031) so a policy can be scoped to one direction from its head and prompt-only detectors stay off the egress path.",
|
|
801
|
+
"context_attributes": [
|
|
802
|
+
{
|
|
803
|
+
"key": "role",
|
|
804
|
+
"type": "string",
|
|
805
|
+
"required": false,
|
|
806
|
+
"description": "Caller's RBAC role projected from the principal's token (AARM R6 / CAP-IDN-011)"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"key": "privilege_scope",
|
|
810
|
+
"type": "array",
|
|
811
|
+
"required": false,
|
|
812
|
+
"description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011)"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"key": "identity_type",
|
|
816
|
+
"type": "string",
|
|
817
|
+
"required": false,
|
|
818
|
+
"description": "Principal identity class projected from the token: 'human', 'agent', 'service', or 'mcp_server'"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"key": "principal",
|
|
822
|
+
"type": "string",
|
|
823
|
+
"required": false,
|
|
824
|
+
"description": "Stable principal identifier projected from the token (e.g. a ZeroID / WIMSE URI or user id)"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"key": "request_id",
|
|
828
|
+
"type": "string",
|
|
829
|
+
"required": true,
|
|
830
|
+
"description": "Unique identifier for this request, useful for audit trails and debugging"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"key": "timestamp",
|
|
834
|
+
"type": "number",
|
|
835
|
+
"required": true,
|
|
836
|
+
"description": "Unix timestamp in milliseconds when the request was processed"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"key": "direction",
|
|
840
|
+
"type": "string",
|
|
841
|
+
"required": true,
|
|
842
|
+
"description": "Content flow direction: 'input' for user prompts, 'output' for AI responses"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"key": "content_type",
|
|
846
|
+
"type": "string",
|
|
847
|
+
"required": true,
|
|
848
|
+
"description": "Type of content being analyzed: 'prompt', 'response', 'tool_call', 'file', or 'clipboard'"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"key": "detector_count",
|
|
852
|
+
"type": "number",
|
|
853
|
+
"required": true,
|
|
854
|
+
"description": "Number of detectors that were executed for this request"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"key": "source",
|
|
858
|
+
"type": "string",
|
|
859
|
+
"required": false,
|
|
860
|
+
"description": "Traffic origin: 'ide' | 'cli' | 'api' | 'browser'. Present for Overwatch/code-agent traffic."
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"key": "event",
|
|
864
|
+
"type": "string",
|
|
865
|
+
"required": false,
|
|
866
|
+
"description": "Event type: 'prompt' | 'tool_call' | 'file_read' | 'file_write' | 'connect_server'. Present for Overwatch traffic."
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"key": "user_email",
|
|
870
|
+
"type": "string",
|
|
871
|
+
"required": false,
|
|
872
|
+
"description": "Human operator email (IDE sessions)"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"key": "cwd",
|
|
876
|
+
"type": "string",
|
|
877
|
+
"required": false,
|
|
878
|
+
"description": "Current working directory (IDE sessions)"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"key": "workspace_root",
|
|
882
|
+
"type": "string",
|
|
883
|
+
"required": false,
|
|
884
|
+
"description": "IDE workspace root path"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"key": "model_name",
|
|
888
|
+
"type": "string",
|
|
889
|
+
"required": false,
|
|
890
|
+
"description": "LLM model name: 'claude-3-5-sonnet', 'gpt-4o', etc. Present for AI Gateway traffic."
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"key": "model_provider",
|
|
894
|
+
"type": "string",
|
|
895
|
+
"required": false,
|
|
896
|
+
"description": "Model provider: 'anthropic' | 'openai' | 'google' | 'meta'. Present for AI Gateway traffic."
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"key": "injection_score",
|
|
900
|
+
"type": "number",
|
|
901
|
+
"required": false,
|
|
902
|
+
"description": "Combined prompt injection confidence (0-100). MAX of all detector scores.",
|
|
903
|
+
"range": "0-100"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"key": "jailbreak_score",
|
|
907
|
+
"type": "number",
|
|
908
|
+
"required": false,
|
|
909
|
+
"description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores.",
|
|
910
|
+
"range": "0-100"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"key": "injection_pulse_score",
|
|
914
|
+
"type": "number",
|
|
915
|
+
"required": false,
|
|
916
|
+
"description": "Highflame single-turn classifier score for prompt injection (0-100).",
|
|
917
|
+
"range": "0-100"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"key": "injection_deep_context_score",
|
|
921
|
+
"type": "number",
|
|
922
|
+
"required": false,
|
|
923
|
+
"description": "DeepContext multi-turn analyzer score for prompt injection (0-100).",
|
|
924
|
+
"range": "0-100"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"key": "jailbreak_pulse_score",
|
|
928
|
+
"type": "number",
|
|
929
|
+
"required": false,
|
|
930
|
+
"description": "Highflame single-turn classifier score for jailbreak attempts (0-100).",
|
|
931
|
+
"range": "0-100"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"key": "jailbreak_deep_context_score",
|
|
935
|
+
"type": "number",
|
|
936
|
+
"required": false,
|
|
937
|
+
"description": "DeepContext multi-turn analyzer score for jailbreak attempts (0-100).",
|
|
938
|
+
"range": "0-100"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"key": "injection_type",
|
|
942
|
+
"type": "string",
|
|
943
|
+
"required": false,
|
|
944
|
+
"description": "Type of injection detected: 'prompt', 'sql', 'command', or 'none'"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"key": "indirect_injection_score",
|
|
948
|
+
"type": "number",
|
|
949
|
+
"required": false,
|
|
950
|
+
"description": "Indirect prompt injection risk score (0-100) — injection via tool outputs, retrieved documents, or external content.",
|
|
951
|
+
"range": "0-100"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"key": "indirect_injection_type",
|
|
955
|
+
"type": "string",
|
|
956
|
+
"required": false,
|
|
957
|
+
"description": "Type of indirect injection detected in content (e.g., instruction override, authority hijack)"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"key": "secrets_detected",
|
|
961
|
+
"type": "boolean",
|
|
962
|
+
"required": false,
|
|
963
|
+
"description": "Whether any API keys, tokens, passwords, or credentials were detected"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"key": "secret_count",
|
|
967
|
+
"type": "number",
|
|
968
|
+
"required": false,
|
|
969
|
+
"description": "Total number of secret matches found"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"key": "secret_types",
|
|
973
|
+
"type": "array",
|
|
974
|
+
"required": false,
|
|
975
|
+
"description": "Array of secret types found (e.g., ['aws_access_key', 'github_token'])"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"key": "pii_detected",
|
|
979
|
+
"type": "boolean",
|
|
980
|
+
"required": false,
|
|
981
|
+
"description": "Whether personally identifiable information (PII) was found"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"key": "pii_count",
|
|
985
|
+
"type": "number",
|
|
986
|
+
"required": false,
|
|
987
|
+
"description": "Total number of PII matches found"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"key": "pii_types",
|
|
991
|
+
"type": "array",
|
|
992
|
+
"required": false,
|
|
993
|
+
"description": "Array of PII types detected (e.g., ['email', 'phone', 'ssn', 'credit_card'])"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"key": "pii_score",
|
|
997
|
+
"type": "number",
|
|
998
|
+
"required": false,
|
|
999
|
+
"description": "PII detection ML classifier confidence (0-100).",
|
|
1000
|
+
"range": "0-100"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"key": "highest_severity",
|
|
1004
|
+
"type": "string",
|
|
1005
|
+
"required": false,
|
|
1006
|
+
"description": "Highest severity level: 'critical', 'high', 'medium', 'low', or 'none'"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"key": "threat_count",
|
|
1010
|
+
"type": "number",
|
|
1011
|
+
"required": false,
|
|
1012
|
+
"description": "Total number of threats detected across all detectors"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"key": "threat_categories",
|
|
1016
|
+
"type": "array",
|
|
1017
|
+
"required": false,
|
|
1018
|
+
"description": "Array of threat category names detected (e.g., ['injection', 'pii', 'secrets'])"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"key": "detected_threats",
|
|
1022
|
+
"type": "array",
|
|
1023
|
+
"required": false,
|
|
1024
|
+
"description": "Array of specific threat names detected"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"key": "violence_score",
|
|
1028
|
+
"type": "number",
|
|
1029
|
+
"required": false,
|
|
1030
|
+
"description": "ML-based score for violent content references (0-100).",
|
|
1031
|
+
"range": "0-100"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"key": "hate_speech_score",
|
|
1035
|
+
"type": "number",
|
|
1036
|
+
"required": false,
|
|
1037
|
+
"description": "ML-based score for hate speech or discriminatory language (0-100).",
|
|
1038
|
+
"range": "0-100"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"key": "sexual_score",
|
|
1042
|
+
"type": "number",
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"description": "ML-based score for sexual or adult content (0-100).",
|
|
1045
|
+
"range": "0-100"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"key": "weapons_score",
|
|
1049
|
+
"type": "number",
|
|
1050
|
+
"required": false,
|
|
1051
|
+
"description": "ML-based score for weapons references (0-100).",
|
|
1052
|
+
"range": "0-100"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"key": "crime_score",
|
|
1056
|
+
"type": "number",
|
|
1057
|
+
"required": false,
|
|
1058
|
+
"description": "ML-based score for criminal activity discussions (0-100).",
|
|
1059
|
+
"range": "0-100"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"key": "profanity_score",
|
|
1063
|
+
"type": "number",
|
|
1064
|
+
"required": false,
|
|
1065
|
+
"description": "ML-based score for profanity and vulgar language (0-100).",
|
|
1066
|
+
"range": "0-100"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
"key": "content_topics",
|
|
1070
|
+
"type": "array",
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"description": "Semantic topics detected in content (e.g., ['controlled_substances', 'weapons_manufacturing'])"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"key": "topic_confidence",
|
|
1076
|
+
"type": "number",
|
|
1077
|
+
"required": false,
|
|
1078
|
+
"description": "Confidence score from topic classifier (0-100).",
|
|
1079
|
+
"range": "0-100"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"key": "invisible_chars_detected",
|
|
1083
|
+
"type": "boolean",
|
|
1084
|
+
"required": false,
|
|
1085
|
+
"description": "Whether invisible Unicode characters were detected in the content"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"key": "invisible_chars_score",
|
|
1089
|
+
"type": "number",
|
|
1090
|
+
"required": false,
|
|
1091
|
+
"description": "Density score for invisible characters (0-100).",
|
|
1092
|
+
"range": "0-100"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"key": "command_injection_detected",
|
|
1096
|
+
"type": "boolean",
|
|
1097
|
+
"required": false,
|
|
1098
|
+
"description": "Whether command injection patterns were detected"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"key": "command_injection_type",
|
|
1102
|
+
"type": "string",
|
|
1103
|
+
"required": false,
|
|
1104
|
+
"description": "Type of command injection: 'reverse_shell', 'privilege_escalation', 'code_execution', 'destructive_command', or 'data_exfiltration'"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"key": "command_injection_score",
|
|
1108
|
+
"type": "number",
|
|
1109
|
+
"required": false,
|
|
1110
|
+
"description": "Confidence score for command injection detection (0-100).",
|
|
1111
|
+
"range": "0-100"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"key": "path_traversal_detected",
|
|
1115
|
+
"type": "boolean",
|
|
1116
|
+
"required": false,
|
|
1117
|
+
"description": "Whether path traversal patterns were detected"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"key": "path_traversal_severity",
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"required": false,
|
|
1123
|
+
"description": "Severity of path traversal: 'critical', 'high', 'medium', 'low', or 'none'"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"key": "path_traversal_type",
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"required": false,
|
|
1129
|
+
"description": "Type of path traversal detected"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"key": "sql_injection_detected",
|
|
1133
|
+
"type": "boolean",
|
|
1134
|
+
"required": false,
|
|
1135
|
+
"description": "Whether SQL injection patterns were detected"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"key": "sql_injection_type",
|
|
1139
|
+
"type": "string",
|
|
1140
|
+
"required": false,
|
|
1141
|
+
"description": "Type of SQL injection: 'tautology', 'union_based', 'destructive', 'blind', or 'error_based'"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"key": "sql_injection_score",
|
|
1145
|
+
"type": "number",
|
|
1146
|
+
"required": false,
|
|
1147
|
+
"description": "Confidence score for SQL injection detection (0-100).",
|
|
1148
|
+
"range": "0-100"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"key": "cross_origin_detected",
|
|
1152
|
+
"type": "boolean",
|
|
1153
|
+
"required": false,
|
|
1154
|
+
"description": "Whether cross-origin escalation patterns were detected"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"key": "cross_origin_type",
|
|
1158
|
+
"type": "string",
|
|
1159
|
+
"required": false,
|
|
1160
|
+
"description": "Type of cross-origin escalation: 'cross_origin_tool', 'cross_origin_server', or 'none'"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"key": "cross_origin_score",
|
|
1164
|
+
"type": "number",
|
|
1165
|
+
"required": false,
|
|
1166
|
+
"description": "Risk score for cross-origin escalation (0-100).",
|
|
1167
|
+
"range": "0-100"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"key": "encoded_content_detected",
|
|
1171
|
+
"type": "boolean",
|
|
1172
|
+
"required": false,
|
|
1173
|
+
"description": "Whether encoded content was detected (base64, hex, unicode, URL encoding)"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"key": "encoded_types",
|
|
1177
|
+
"type": "array",
|
|
1178
|
+
"required": false,
|
|
1179
|
+
"description": "Array of encoding types detected (e.g., ['base64', 'hex', 'unicode', 'url'])"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"key": "encoded_count",
|
|
1183
|
+
"type": "number",
|
|
1184
|
+
"required": false,
|
|
1185
|
+
"description": "Number of encoded segments found"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"key": "encoded_score",
|
|
1189
|
+
"type": "number",
|
|
1190
|
+
"required": false,
|
|
1191
|
+
"description": "Risk score for encoded injection attempts (0-100).",
|
|
1192
|
+
"range": "0-100"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"key": "detected_language",
|
|
1196
|
+
"type": "string",
|
|
1197
|
+
"required": false,
|
|
1198
|
+
"description": "ISO language code of the detected language (e.g., 'en', 'fr', 'zh')"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"key": "is_english",
|
|
1202
|
+
"type": "boolean",
|
|
1203
|
+
"required": false,
|
|
1204
|
+
"description": "Whether the content is in English"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"key": "language_confidence",
|
|
1208
|
+
"type": "number",
|
|
1209
|
+
"required": false,
|
|
1210
|
+
"description": "Confidence score for language detection (0-100).",
|
|
1211
|
+
"range": "0-100"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"key": "detected_script",
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"required": false,
|
|
1217
|
+
"description": "Writing script detected: 'latin', 'cyrillic', 'arabic', 'cjk', 'unknown', etc."
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"key": "is_latin_script",
|
|
1221
|
+
"type": "boolean",
|
|
1222
|
+
"required": false,
|
|
1223
|
+
"description": "Whether the content uses Latin script"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"key": "script_confidence",
|
|
1227
|
+
"type": "number",
|
|
1228
|
+
"required": false,
|
|
1229
|
+
"description": "Confidence score for script detection (0-100).",
|
|
1230
|
+
"range": "0-100"
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"key": "hallucination_score",
|
|
1234
|
+
"type": "number",
|
|
1235
|
+
"required": false,
|
|
1236
|
+
"description": "ML-based score for hallucinated or fabricated content (0-100).",
|
|
1237
|
+
"range": "0-100"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"key": "factuality_score",
|
|
1241
|
+
"type": "number",
|
|
1242
|
+
"required": false,
|
|
1243
|
+
"description": "ML-based factuality assessment score (0-100).",
|
|
1244
|
+
"range": "0-100"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"key": "sentiment_score",
|
|
1248
|
+
"type": "number",
|
|
1249
|
+
"required": false,
|
|
1250
|
+
"description": "Sentiment analysis score.",
|
|
1251
|
+
"range": "0-100"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"key": "contains_code",
|
|
1255
|
+
"type": "boolean",
|
|
1256
|
+
"required": false,
|
|
1257
|
+
"description": "Whether code snippets were detected in the content"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"key": "code_languages",
|
|
1261
|
+
"type": "array",
|
|
1262
|
+
"required": false,
|
|
1263
|
+
"description": "Array of programming languages detected in code snippets"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"key": "code_ratio",
|
|
1267
|
+
"type": "number",
|
|
1268
|
+
"required": false,
|
|
1269
|
+
"description": "Percentage of content that consists of code (0-100).",
|
|
1270
|
+
"range": "0-100"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"key": "keyword_matched",
|
|
1274
|
+
"type": "boolean",
|
|
1275
|
+
"required": false,
|
|
1276
|
+
"description": "Whether any configured keywords or phrases were matched"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"key": "keyword_categories",
|
|
1280
|
+
"type": "array",
|
|
1281
|
+
"required": false,
|
|
1282
|
+
"description": "Array of keyword categories matched (e.g., ['competitor_names', 'restricted_topics'])"
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
"key": "keyword_count",
|
|
1286
|
+
"type": "number",
|
|
1287
|
+
"required": false,
|
|
1288
|
+
"description": "Number of keyword matches found"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"key": "contains_non_ascii",
|
|
1292
|
+
"type": "boolean",
|
|
1293
|
+
"required": false,
|
|
1294
|
+
"description": "Whether non-ASCII characters were detected"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"key": "phishing_detected",
|
|
1298
|
+
"type": "boolean",
|
|
1299
|
+
"required": false,
|
|
1300
|
+
"description": "Whether phishing patterns were detected"
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"key": "content_safety_score",
|
|
1304
|
+
"type": "number",
|
|
1305
|
+
"required": false,
|
|
1306
|
+
"description": "Aggregate content safety score (0-100).",
|
|
1307
|
+
"range": "0-100"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"key": "content_safety_blocked",
|
|
1311
|
+
"type": "boolean",
|
|
1312
|
+
"required": false,
|
|
1313
|
+
"description": "Whether content was flagged for blocking by the content safety system"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
"key": "conversation_turn",
|
|
1317
|
+
"type": "number",
|
|
1318
|
+
"required": false,
|
|
1319
|
+
"description": "Current conversation turn number"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"key": "multi_turn_detection",
|
|
1323
|
+
"type": "boolean",
|
|
1324
|
+
"required": false,
|
|
1325
|
+
"description": "Whether multi-turn injection patterns were detected"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"key": "budget_remaining_pct",
|
|
1329
|
+
"type": "number",
|
|
1330
|
+
"required": false,
|
|
1331
|
+
"description": "Remaining token budget as percentage (0-100).",
|
|
1332
|
+
"range": "0-100"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"key": "budget_exceeded",
|
|
1336
|
+
"type": "boolean",
|
|
1337
|
+
"required": false,
|
|
1338
|
+
"description": "Whether the token budget has been exceeded"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"key": "rpm_remaining_pct",
|
|
1342
|
+
"type": "number",
|
|
1343
|
+
"required": false,
|
|
1344
|
+
"description": "Remaining RPM percentage (0-100). Gateway-metered, Shield-decided (ADR 0014).",
|
|
1345
|
+
"range": "0-100"
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"key": "rpm_exceeded",
|
|
1349
|
+
"type": "boolean",
|
|
1350
|
+
"required": false,
|
|
1351
|
+
"description": "Whether the RPM limit has been exceeded"
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"key": "tpm_remaining_pct",
|
|
1355
|
+
"type": "number",
|
|
1356
|
+
"required": false,
|
|
1357
|
+
"description": "Remaining TPM percentage (0-100). Gateway-metered, Shield-decided (ADR 0014).",
|
|
1358
|
+
"range": "0-100"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"key": "tpm_exceeded",
|
|
1362
|
+
"type": "boolean",
|
|
1363
|
+
"required": false,
|
|
1364
|
+
"description": "Whether the TPM limit has been exceeded"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"key": "session_pii_detected",
|
|
1368
|
+
"type": "boolean",
|
|
1369
|
+
"required": false,
|
|
1370
|
+
"description": "Whether PII was detected in any previous turn of the session"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"key": "session_pii_types",
|
|
1374
|
+
"type": "array",
|
|
1375
|
+
"required": false,
|
|
1376
|
+
"description": "PII types detected across the session (accumulated)"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"key": "session_secrets_detected",
|
|
1380
|
+
"type": "boolean",
|
|
1381
|
+
"required": false,
|
|
1382
|
+
"description": "Whether secrets were detected in any previous turn of the session"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"key": "session_secret_types",
|
|
1386
|
+
"type": "array",
|
|
1387
|
+
"required": false,
|
|
1388
|
+
"description": "Secret types detected across the session (accumulated)"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"key": "session_injection_detected",
|
|
1392
|
+
"type": "boolean",
|
|
1393
|
+
"required": false,
|
|
1394
|
+
"description": "Whether prompt injection was detected in any previous turn of the session"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"key": "session_command_injection",
|
|
1398
|
+
"type": "boolean",
|
|
1399
|
+
"required": false,
|
|
1400
|
+
"description": "Whether command injection was detected in any previous turn of the session"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"key": "session_threat_turns",
|
|
1404
|
+
"type": "number",
|
|
1405
|
+
"required": false,
|
|
1406
|
+
"description": "Number of turns in the session where threats were detected"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"key": "session_max_injection_score",
|
|
1410
|
+
"type": "number",
|
|
1411
|
+
"required": false,
|
|
1412
|
+
"description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions",
|
|
1413
|
+
"range": "0-100"
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"key": "session_max_jailbreak_score",
|
|
1417
|
+
"type": "number",
|
|
1418
|
+
"required": false,
|
|
1419
|
+
"description": "Highest jailbreak detection score seen in any turn of the session (0-100)",
|
|
1420
|
+
"range": "0-100"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"key": "session_max_command_injection_score",
|
|
1424
|
+
"type": "number",
|
|
1425
|
+
"required": false,
|
|
1426
|
+
"description": "Highest command injection score seen in any turn of the session (0-100)",
|
|
1427
|
+
"range": "0-100"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"key": "session_max_pii_score",
|
|
1431
|
+
"type": "number",
|
|
1432
|
+
"required": false,
|
|
1433
|
+
"description": "Highest PII risk score seen in any turn of the session (0-100)",
|
|
1434
|
+
"range": "0-100"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"key": "session_max_secret_score",
|
|
1438
|
+
"type": "number",
|
|
1439
|
+
"required": false,
|
|
1440
|
+
"description": "Highest secret detection score seen in any turn of the session (0-100)",
|
|
1441
|
+
"range": "0-100"
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"key": "session_cumulative_risk_score",
|
|
1445
|
+
"type": "number",
|
|
1446
|
+
"required": false,
|
|
1447
|
+
"description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"key": "session_max_sensitivity",
|
|
1451
|
+
"type": "string",
|
|
1452
|
+
"required": false,
|
|
1453
|
+
"description": "Highest data-sensitivity tier observed across the session (e.g. 'public', 'internal', 'confidential', 'restricted')"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"key": "session_original_request",
|
|
1457
|
+
"type": "string",
|
|
1458
|
+
"required": false,
|
|
1459
|
+
"description": "The session's first user request, retained for drift / goal-hijack policies that compare later turns against the original intent"
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
"key": "agent_id",
|
|
1463
|
+
"type": "string",
|
|
1464
|
+
"required": false,
|
|
1465
|
+
"description": "Unique identifier of the authenticated AI agent making this request. Empty string for human user requests."
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"key": "agent_type",
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"required": false,
|
|
1471
|
+
"description": "Type of the authenticated agent: 'orchestrator', 'autonomous', 'tool_agent', or 'human_proxy'. Empty string for human users."
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"key": "agent_trust_level",
|
|
1475
|
+
"type": "string",
|
|
1476
|
+
"required": false,
|
|
1477
|
+
"description": "Trust level of the authenticated agent: 'first_party', 'verified_third_party', or 'unverified'."
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"key": "agent_framework",
|
|
1481
|
+
"type": "string",
|
|
1482
|
+
"required": false,
|
|
1483
|
+
"description": "Framework or SDK the agent is built with (e.g., 'claude-code', 'langchain', 'crewai', 'autogen')."
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"key": "agent_publisher",
|
|
1487
|
+
"type": "string",
|
|
1488
|
+
"required": false,
|
|
1489
|
+
"description": "Organization that published the agent (e.g., 'anthropic', 'internal', 'acme-corp')."
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"key": "flow_confidentiality",
|
|
1493
|
+
"type": "string",
|
|
1494
|
+
"required": false,
|
|
1495
|
+
"description": "Confidentiality tier of the data this action carries or targets (ADR 0020): 'public', 'internal', 'confidential', 'restricted', or 'unknown'. Shares the ladder with session_max_sensitivity but is a per-value fact, not a session scalar. 'unknown' MUST NOT be treated as 'public' — guard with has and let policy DENY/STEP_UP/DEFER per flow_resolution_status."
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"key": "flow_integrity",
|
|
1499
|
+
"type": "string",
|
|
1500
|
+
"required": false,
|
|
1501
|
+
"description": "Integrity/influence tier of the data this action carries (ADR 0020): 'trusted', 'untrusted', 'mixed', or 'unknown'. Orthogonal to confidentiality: untrusted content may inform a pure analysis but MUST NOT authorize a side-effecting sink. Least-trusted contributor wins on join."
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"key": "flow_data_types",
|
|
1505
|
+
"type": "array",
|
|
1506
|
+
"required": false,
|
|
1507
|
+
"description": "Sensitive data categories present in the value (ADR 0020), e.g. 'pii', 'secrets', 'source_code', 'financial', 'health'. Union of all contributing inputs. Set<String>."
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"key": "flow_compartments",
|
|
1511
|
+
"type": "array",
|
|
1512
|
+
"required": false,
|
|
1513
|
+
"description": "Compartments the value belongs to (ADR 0020), e.g. 'tenant:acme', 'customer:123', 'project:x'. Union of all contributing inputs — cross-compartment composition is expressible by cardinality. Set<String>."
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"key": "flow_resolution_status",
|
|
1517
|
+
"type": "string",
|
|
1518
|
+
"required": false,
|
|
1519
|
+
"description": "How the flow label was resolved (ADR 0020): 'known', 'inferred', 'unknown', or 'conflicted'. Policy authors choose the posture for 'unknown' per sink (DENY external, STEP_UP, DEFER while a classifier runs, or allow-and-record). Never silently resolves to public."
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"key": "flow_origins",
|
|
1523
|
+
"type": "array",
|
|
1524
|
+
"required": false,
|
|
1525
|
+
"description": "Origin kinds that produced or influenced the value (ADR 0020): 'mcp_tool_result', 'model', 'file', 'database', 'user'. Provenance fact for lineage-aware policy. Set<String>."
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"key": "flow_sink",
|
|
1529
|
+
"type": "string",
|
|
1530
|
+
"required": false,
|
|
1531
|
+
"description": "Logical destination this action releases the value to (ADR 0020), e.g. 'external_model', 'local_model', 'external_mcp', 'trusted_mcp', 'user_secure_output', 'public_network', 'file'. The 'where' half of a flow decision — pair with flow_confidentiality/flow_integrity."
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"key": "flow_sink_is_external",
|
|
1535
|
+
"type": "boolean",
|
|
1536
|
+
"required": false,
|
|
1537
|
+
"description": "Whether the destination is outside the tenant trust boundary (ADR 0020). Lets a single policy express 'confidential data MUST NOT leave to any external sink' without enumerating sink ids."
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"key": "flow_sink_effects",
|
|
1541
|
+
"type": "array",
|
|
1542
|
+
"required": false,
|
|
1543
|
+
"description": "Side effects the destination can exercise (ADR 0020), e.g. 'network.send', 'financial.transfer', 'filesystem.write'. Enables 'untrusted content MUST NOT reach a financial.transfer sink'. Set<String>."
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"key": "principal_clearances",
|
|
1547
|
+
"type": "array",
|
|
1548
|
+
"required": false,
|
|
1549
|
+
"description": "Clearances AuthN/ZeroID mints for the principal (ADR 0020 D8), e.g. 'restricted', 'pii'. Coarse scopes gate the capability; clearances gate which protected data that capability may touch. Set<String>."
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"key": "principal_compartments",
|
|
1553
|
+
"type": "array",
|
|
1554
|
+
"required": false,
|
|
1555
|
+
"description": "Compartments the principal is admitted to (ADR 0020 D8), e.g. 'tenant:acme', 'customer:123'. A flow into a compartment the principal lacks is deniable independent of confidentiality tier. Set<String>."
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"key": "surface",
|
|
1559
|
+
"type": "string",
|
|
1560
|
+
"required": true,
|
|
1561
|
+
"description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: 'guardrails', 'overwatch', 'ai_gateway' ('sentry' joins at D17 phase 2). The 'Applies to' narrowing target: test with an ordinary condition (context.surface == 'ai_gateway'); no 'has' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later."
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"key": "malicious_package_detected",
|
|
1565
|
+
"type": "boolean",
|
|
1566
|
+
"required": false,
|
|
1567
|
+
"description": "Whether a referenced package carries a known-malicious osv.dev (MAL-) advisory."
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
"key": "package_install_detected",
|
|
1571
|
+
"type": "boolean",
|
|
1572
|
+
"required": false,
|
|
1573
|
+
"description": "Whether the request installs or downloads a package (pip/npm/cargo/etc.)."
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"key": "package_check_status",
|
|
1577
|
+
"type": "string",
|
|
1578
|
+
"required": false,
|
|
1579
|
+
"description": "Malicious-package lookup status: empty (ok) or degraded (OSV unavailable, fail-open)."
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"key": "max_threat_severity",
|
|
1583
|
+
"type": "number",
|
|
1584
|
+
"required": false,
|
|
1585
|
+
"description": "Aggregate max threat severity across detectors (0=none,1=low,2=medium,3=high,4=critical).",
|
|
1586
|
+
"range": "0-4"
|
|
1587
|
+
}
|
|
1588
|
+
]
|
|
1589
|
+
},
|
|
798
1590
|
{
|
|
799
1591
|
"name": "call_tool",
|
|
800
1592
|
"description": "Execute agentic tool calls, including shell commands, file operations, and MCP tools",
|