@highflame/policy 2.2.35 → 2.2.37
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 +822 -0
- package/_schemas/agent_ops/schema.cedarschema +134 -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 +308 -0
- package/_schemas/ai_gateway/schema.cedarschema +44 -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 +701 -0
- package/_schemas/guardrails/schema.cedarschema +30 -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/_schemas/overwatch/context.json +30 -0
- package/_schemas/overwatch/schema.cedarschema +7 -0
- package/dist/agent_ops-context.gen.d.ts +6 -1
- package/dist/agent_ops-context.gen.js +10 -0
- package/dist/agent_ops-defaults.gen.js +177 -120
- package/dist/agent_ops-entities.gen.js +5 -1
- package/dist/ai_gateway-context.gen.d.ts +6 -1
- package/dist/ai_gateway-context.gen.js +10 -0
- package/dist/ai_gateway-defaults.gen.js +90 -164
- package/dist/ai_gateway-detectors.gen.js +6 -1
- package/dist/ai_gateway-entities.gen.js +6 -2
- package/dist/guardrails-context.gen.d.ts +6 -1
- package/dist/guardrails-context.gen.js +10 -0
- package/dist/guardrails-defaults.gen.js +144 -145
- package/dist/guardrails-detectors.gen.js +6 -1
- package/dist/guardrails-entities.gen.js +5 -1
- package/dist/overwatch-context.gen.d.ts +6 -1
- package/dist/overwatch-context.gen.js +10 -0
- package/dist/overwatch-detectors.gen.js +6 -1
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +528 -118
- package/package.json +1 -1
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +0 -30
|
@@ -674,6 +674,677 @@
|
|
|
674
674
|
}
|
|
675
675
|
]
|
|
676
676
|
},
|
|
677
|
+
{
|
|
678
|
+
"name": "process_response",
|
|
679
|
+
"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.",
|
|
680
|
+
"context_attributes": [
|
|
681
|
+
{
|
|
682
|
+
"key": "role",
|
|
683
|
+
"type": "string",
|
|
684
|
+
"required": false,
|
|
685
|
+
"description": "Caller's RBAC role projected from the principal's token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim."
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"key": "privilege_scope",
|
|
689
|
+
"type": "array",
|
|
690
|
+
"required": false,
|
|
691
|
+
"description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim."
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"key": "identity_type",
|
|
695
|
+
"type": "string",
|
|
696
|
+
"required": false,
|
|
697
|
+
"description": "Principal identity class projected from the token: 'human', 'agent', or 'service'. Use to apply identity-class-specific policies"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"key": "principal",
|
|
701
|
+
"type": "string",
|
|
702
|
+
"required": false,
|
|
703
|
+
"description": "Stable principal identifier projected from the token (e.g. a ZeroID / WIMSE URI or user id). Absent when the token carries no principal claim"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"key": "request_id",
|
|
707
|
+
"type": "string",
|
|
708
|
+
"required": true,
|
|
709
|
+
"description": "Unique identifier for this request, useful for audit trails and debugging"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"key": "timestamp",
|
|
713
|
+
"type": "number",
|
|
714
|
+
"required": true,
|
|
715
|
+
"description": "Unix timestamp in milliseconds when the request was processed"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"key": "direction",
|
|
719
|
+
"type": "string",
|
|
720
|
+
"required": true,
|
|
721
|
+
"description": "Content flow direction: 'input' for user prompts, 'output' for AI responses. Use this to apply different policies to inputs vs outputs (e.g., block PII only in outputs)"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"key": "content_type",
|
|
725
|
+
"type": "string",
|
|
726
|
+
"required": true,
|
|
727
|
+
"description": "Type of content being analyzed: 'prompt', 'response', 'tool_call', 'file', or 'clipboard'"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"key": "detector_count",
|
|
731
|
+
"type": "number",
|
|
732
|
+
"required": true,
|
|
733
|
+
"description": "Number of detectors that were executed for this request"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"key": "injection_score",
|
|
737
|
+
"type": "number",
|
|
738
|
+
"required": false,
|
|
739
|
+
"description": "Combined prompt injection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use injection_pulse_score / injection_deep_context_score for individual detector control",
|
|
740
|
+
"range": "0-100"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"key": "jailbreak_score",
|
|
744
|
+
"type": "number",
|
|
745
|
+
"required": false,
|
|
746
|
+
"description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use jailbreak_pulse_score / jailbreak_deep_context_score for individual detector control",
|
|
747
|
+
"range": "0-100"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"key": "injection_pulse_score",
|
|
751
|
+
"type": "number",
|
|
752
|
+
"required": false,
|
|
753
|
+
"description": "Highflame single-turn classifier score for prompt injection (0-100). Raw score from Pulse detector before combination with deep-context. Use for per-detector policy control",
|
|
754
|
+
"range": "0-100"
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"key": "injection_deep_context_score",
|
|
758
|
+
"type": "number",
|
|
759
|
+
"required": false,
|
|
760
|
+
"description": "DeepContext multi-turn analyzer score for prompt injection (0-100). Tracks injection patterns across conversation history. Generally higher confidence than single-turn",
|
|
761
|
+
"range": "0-100"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"key": "jailbreak_pulse_score",
|
|
765
|
+
"type": "number",
|
|
766
|
+
"required": false,
|
|
767
|
+
"description": "Highflame single-turn classifier score for jailbreak attempts (0-100). Raw score from Pulse detector before combination with deep-context",
|
|
768
|
+
"range": "0-100"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"key": "jailbreak_deep_context_score",
|
|
772
|
+
"type": "number",
|
|
773
|
+
"required": false,
|
|
774
|
+
"description": "DeepContext multi-turn analyzer score for jailbreak attempts (0-100). Detects jailbreak escalation patterns across conversation turns",
|
|
775
|
+
"range": "0-100"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"key": "injection_type",
|
|
779
|
+
"type": "string",
|
|
780
|
+
"required": false,
|
|
781
|
+
"description": "Type of injection detected: 'prompt', 'sql', 'command', or 'none'. Use this to apply different policies per injection type"
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"key": "secrets_detected",
|
|
785
|
+
"type": "boolean",
|
|
786
|
+
"required": false,
|
|
787
|
+
"description": "Whether any API keys, tokens, passwords, or credentials were detected in the content. True indicates presence of secrets"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"key": "secret_count",
|
|
791
|
+
"type": "number",
|
|
792
|
+
"required": false,
|
|
793
|
+
"description": "Total number of secret matches found. Multiple matches may indicate data dumps or accidental credential exposure"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"key": "secret_types",
|
|
797
|
+
"type": "array",
|
|
798
|
+
"required": false,
|
|
799
|
+
"description": "Array of secret types found (e.g., ['aws_access_key', 'github_token']). Use set operations like .contains() to check for specific types"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"key": "pii_detected",
|
|
803
|
+
"type": "boolean",
|
|
804
|
+
"required": false,
|
|
805
|
+
"description": "Whether personally identifiable information (PII) was found in the content. Commonly used to block PII in outputs to prevent data leakage"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"key": "pii_count",
|
|
809
|
+
"type": "number",
|
|
810
|
+
"required": false,
|
|
811
|
+
"description": "Total number of PII matches found (emails, phone numbers, SSNs, etc.)"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"key": "pii_types",
|
|
815
|
+
"type": "array",
|
|
816
|
+
"required": false,
|
|
817
|
+
"description": "Array of PII types detected (e.g., ['email', 'phone', 'ssn', 'credit_card']). Use .contains() to block specific sensitive types"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"key": "pii_score",
|
|
821
|
+
"type": "number",
|
|
822
|
+
"required": false,
|
|
823
|
+
"description": "PII detection ML classifier confidence (0-100). Catches novel PII patterns including names, addresses, and identifiers that regex rules may miss. Typical threshold: >=80 for high-confidence blocking",
|
|
824
|
+
"range": "0-100"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"key": "highest_severity",
|
|
828
|
+
"type": "string",
|
|
829
|
+
"required": false,
|
|
830
|
+
"description": "Highest severity level across all detection engines: 'critical', 'high', 'medium', 'low', or 'none'. Use for severity-based catch-all policies (e.g., block any content flagged as critical)"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"key": "violence_score",
|
|
834
|
+
"type": "number",
|
|
835
|
+
"required": false,
|
|
836
|
+
"description": "ML-based score for violent content references (0-100). Typical threshold: >90 for critical blocks, >60 for warnings",
|
|
837
|
+
"range": "0-100"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"key": "hate_speech_score",
|
|
841
|
+
"type": "number",
|
|
842
|
+
"required": false,
|
|
843
|
+
"description": "ML-based score for hate speech, discriminatory language, or targeted harassment (0-100). Typical threshold: >75 for blocks",
|
|
844
|
+
"range": "0-100"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"key": "sexual_score",
|
|
848
|
+
"type": "number",
|
|
849
|
+
"required": false,
|
|
850
|
+
"description": "ML-based score for sexual or adult content (0-100). Adjust thresholds based on your application's audience",
|
|
851
|
+
"range": "0-100"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"key": "weapons_score",
|
|
855
|
+
"type": "number",
|
|
856
|
+
"required": false,
|
|
857
|
+
"description": "ML-based score for weapons references or violent imagery (0-100)",
|
|
858
|
+
"range": "0-100"
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"key": "crime_score",
|
|
862
|
+
"type": "number",
|
|
863
|
+
"required": false,
|
|
864
|
+
"description": "ML-based score for criminal activity discussions (0-100)",
|
|
865
|
+
"range": "0-100"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"key": "profanity_score",
|
|
869
|
+
"type": "number",
|
|
870
|
+
"required": false,
|
|
871
|
+
"description": "ML-based score for profanity and vulgar language (0-100)",
|
|
872
|
+
"range": "0-100"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"key": "content_topics",
|
|
876
|
+
"type": "array",
|
|
877
|
+
"required": false,
|
|
878
|
+
"description": "Semantic topics detected in content (e.g., ['controlled_substances', 'weapons_manufacturing']). Use .contains() to block specific topics per application"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"key": "topic_confidence",
|
|
882
|
+
"type": "number",
|
|
883
|
+
"required": false,
|
|
884
|
+
"description": "Confidence score from topic classifier (0-100). Use with content_topics to tune sensitivity — higher thresholds reduce false positives",
|
|
885
|
+
"range": "0-100"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"key": "invisible_chars_detected",
|
|
889
|
+
"type": "boolean",
|
|
890
|
+
"required": false,
|
|
891
|
+
"description": "Whether invisible Unicode characters (zero-width joiners, RTL marks, etc.) were detected in the content. Commonly used for prompt injection evasion"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"key": "invisible_chars_score",
|
|
895
|
+
"type": "number",
|
|
896
|
+
"required": false,
|
|
897
|
+
"description": "Density score for invisible characters in the content (0-100). Higher scores indicate more invisible characters, suggesting evasion attempts",
|
|
898
|
+
"range": "0-100"
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"key": "command_injection_detected",
|
|
902
|
+
"type": "boolean",
|
|
903
|
+
"required": false,
|
|
904
|
+
"description": "Whether command injection patterns were detected in the content (reverse shells, privilege escalation, destructive commands)"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"key": "command_injection_type",
|
|
908
|
+
"type": "string",
|
|
909
|
+
"required": false,
|
|
910
|
+
"description": "Type of command injection: 'reverse_shell', 'privilege_escalation', 'code_execution', 'destructive_command', or 'data_exfiltration'"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"key": "command_injection_score",
|
|
914
|
+
"type": "number",
|
|
915
|
+
"required": false,
|
|
916
|
+
"description": "Confidence score for command injection detection (0-100). Higher scores indicate stronger pattern matches",
|
|
917
|
+
"range": "0-100"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"key": "path_traversal_detected",
|
|
921
|
+
"type": "boolean",
|
|
922
|
+
"required": false,
|
|
923
|
+
"description": "Whether path traversal patterns were detected (e.g., ../../../etc/passwd, URL-encoded variants)"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"key": "path_traversal_severity",
|
|
927
|
+
"type": "string",
|
|
928
|
+
"required": false,
|
|
929
|
+
"description": "Severity of path traversal: 'critical' (sensitive system files), 'high' (deep traversal), 'medium' (moderate traversal), 'low', or 'none'"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"key": "path_traversal_type",
|
|
933
|
+
"type": "string",
|
|
934
|
+
"required": false,
|
|
935
|
+
"description": "Type of path traversal detected (e.g., 'sensitive_file', 'deep_traversal', 'encoded_traversal')"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"key": "sql_injection_detected",
|
|
939
|
+
"type": "boolean",
|
|
940
|
+
"required": false,
|
|
941
|
+
"description": "Whether SQL injection patterns were detected (tautologies, UNION-based, destructive queries)"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"key": "sql_injection_type",
|
|
945
|
+
"type": "string",
|
|
946
|
+
"required": false,
|
|
947
|
+
"description": "Type of SQL injection: 'tautology', 'union_based', 'destructive', 'blind', or 'error_based'"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"key": "sql_injection_score",
|
|
951
|
+
"type": "number",
|
|
952
|
+
"required": false,
|
|
953
|
+
"description": "Confidence score for SQL injection detection (0-100). Typical threshold: >=75 for blocks",
|
|
954
|
+
"range": "0-100"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"key": "cross_origin_detected",
|
|
958
|
+
"type": "boolean",
|
|
959
|
+
"required": false,
|
|
960
|
+
"description": "Whether cross-origin escalation patterns were detected (tool calls or references crossing trust boundaries)"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"key": "cross_origin_type",
|
|
964
|
+
"type": "string",
|
|
965
|
+
"required": false,
|
|
966
|
+
"description": "Type of cross-origin escalation: 'cross_origin_tool', 'cross_origin_server', or 'none'"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"key": "cross_origin_score",
|
|
970
|
+
"type": "number",
|
|
971
|
+
"required": false,
|
|
972
|
+
"description": "Risk score for cross-origin escalation (0-100). Higher scores indicate more suspicious cross-boundary activity",
|
|
973
|
+
"range": "0-100"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"key": "package_install_detected",
|
|
977
|
+
"type": "boolean",
|
|
978
|
+
"required": false,
|
|
979
|
+
"description": "Whether the event contains a recognized package install/download command (pip, npm, yarn, pnpm, bun, uv, gem, cargo, go, composer)"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"key": "packages_checked",
|
|
983
|
+
"type": "number",
|
|
984
|
+
"required": false,
|
|
985
|
+
"description": "Number of unique packages checked against the osv.dev database for this event"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"key": "malicious_package_detected",
|
|
989
|
+
"type": "boolean",
|
|
990
|
+
"required": false,
|
|
991
|
+
"description": "Whether any referenced package has a known-malicious OSV advisory (OpenSSF MAL- ID). Use to block supply-chain attacks at install time"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"key": "malicious_package_score",
|
|
995
|
+
"type": "number",
|
|
996
|
+
"required": false,
|
|
997
|
+
"description": "100 when a malicious package was detected, 0 otherwise",
|
|
998
|
+
"range": "0-100"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"key": "malicious_packages",
|
|
1002
|
+
"type": "array",
|
|
1003
|
+
"required": false,
|
|
1004
|
+
"description": "Malicious packages as ecosystem/name[@version] strings (e.g. 'PyPI/evil-pkg@1.0.0')"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"key": "package_names",
|
|
1008
|
+
"type": "array",
|
|
1009
|
+
"required": false,
|
|
1010
|
+
"description": "Names of all packages parsed from the install command (without ecosystem prefix), e.g. ['requests', 'left-pad']. Available even when the osv.dev lookup fails."
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"key": "package_ecosystems",
|
|
1014
|
+
"type": "array",
|
|
1015
|
+
"required": false,
|
|
1016
|
+
"description": "Unique package ecosystems seen in this event, e.g. ['PyPI', 'npm']. Useful for policy rules that restrict which ecosystems are permitted."
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"key": "package_advisory_count",
|
|
1020
|
+
"type": "number",
|
|
1021
|
+
"required": false,
|
|
1022
|
+
"description": "Total number of non-malicious OSV advisories (GHSA- / CVE- IDs) found across all checked packages. Excludes MAL- entries counted in malicious_package_detected."
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"key": "package_risk_score",
|
|
1026
|
+
"type": "number",
|
|
1027
|
+
"required": false,
|
|
1028
|
+
"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.",
|
|
1029
|
+
"range": "0-100"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"key": "package_check_status",
|
|
1033
|
+
"type": "string",
|
|
1034
|
+
"required": false,
|
|
1035
|
+
"description": "Set to 'degraded' when the osv.dev lookup failed and packages could not be verified (fail-open). Combine with package_install_detected to fail closed"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"key": "encoded_content_detected",
|
|
1039
|
+
"type": "boolean",
|
|
1040
|
+
"required": false,
|
|
1041
|
+
"description": "Whether encoded content was detected (base64, hex, unicode, URL encoding) that may hide malicious payloads"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"key": "encoded_types",
|
|
1045
|
+
"type": "array",
|
|
1046
|
+
"required": false,
|
|
1047
|
+
"description": "Array of encoding types detected (e.g., ['base64', 'hex', 'unicode', 'url']). Use .contains() to check for specific encoding types"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"key": "encoded_count",
|
|
1051
|
+
"type": "number",
|
|
1052
|
+
"required": false,
|
|
1053
|
+
"description": "Number of encoded segments found in the content"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"key": "encoded_score",
|
|
1057
|
+
"type": "number",
|
|
1058
|
+
"required": false,
|
|
1059
|
+
"description": "Risk score for encoded injection attempts (0-100). Considers encoding density and decoded content patterns",
|
|
1060
|
+
"range": "0-100"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"key": "detected_language",
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"required": false,
|
|
1066
|
+
"description": "ISO language code of the detected language (e.g., 'en', 'fr', 'zh'). Use this for language-specific policy enforcement"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
"key": "is_english",
|
|
1070
|
+
"type": "boolean",
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"description": "Whether the content is in English. Useful for applying English-only policies or flagging non-English content"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"key": "language_confidence",
|
|
1076
|
+
"type": "number",
|
|
1077
|
+
"required": false,
|
|
1078
|
+
"description": "Confidence score for language detection (0-100). Use with detected_language to tune sensitivity",
|
|
1079
|
+
"range": "0-100"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"key": "detected_script",
|
|
1083
|
+
"type": "string",
|
|
1084
|
+
"required": false,
|
|
1085
|
+
"description": "Writing script detected in content: 'latin', 'cyrillic', 'arabic', 'cjk', 'unknown', etc. Use to detect script-switching attacks"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"key": "is_latin_script",
|
|
1089
|
+
"type": "boolean",
|
|
1090
|
+
"required": false,
|
|
1091
|
+
"description": "Whether the content uses Latin script. Useful for detecting non-Latin script injection attempts"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"key": "script_confidence",
|
|
1095
|
+
"type": "number",
|
|
1096
|
+
"required": false,
|
|
1097
|
+
"description": "Confidence score for script detection (0-100)",
|
|
1098
|
+
"range": "0-100"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"key": "hallucination_score",
|
|
1102
|
+
"type": "number",
|
|
1103
|
+
"required": false,
|
|
1104
|
+
"description": "ML-based score for hallucinated or fabricated content (0-100). Higher scores indicate higher likelihood of non-factual claims",
|
|
1105
|
+
"range": "0-100"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"key": "factuality_score",
|
|
1109
|
+
"type": "number",
|
|
1110
|
+
"required": false,
|
|
1111
|
+
"description": "ML-based factuality assessment score (0-100). Higher scores indicate more factually grounded content",
|
|
1112
|
+
"range": "0-100"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"key": "sentiment_score",
|
|
1116
|
+
"type": "number",
|
|
1117
|
+
"required": false,
|
|
1118
|
+
"description": "Sentiment analysis score. Use to detect overly negative or manipulative tone in prompts or responses",
|
|
1119
|
+
"range": "0-100"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"key": "contains_code",
|
|
1123
|
+
"type": "boolean",
|
|
1124
|
+
"required": false,
|
|
1125
|
+
"description": "Whether code snippets were detected in the content"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"key": "code_languages",
|
|
1129
|
+
"type": "array",
|
|
1130
|
+
"required": false,
|
|
1131
|
+
"description": "Array of programming languages detected in code snippets (e.g., ['python', 'javascript'])"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"key": "code_ratio",
|
|
1135
|
+
"type": "number",
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"description": "Percentage of content that consists of code (0-100). High values may indicate code dumps or automated content",
|
|
1138
|
+
"range": "0-100"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"key": "keyword_matched",
|
|
1142
|
+
"type": "boolean",
|
|
1143
|
+
"required": false,
|
|
1144
|
+
"description": "Whether any configured keywords or phrases were matched in the content"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"key": "keyword_categories",
|
|
1148
|
+
"type": "array",
|
|
1149
|
+
"required": false,
|
|
1150
|
+
"description": "Array of keyword categories matched (e.g., ['competitor_names', 'restricted_topics']). Use .contains() for category-specific policies"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"key": "keyword_count",
|
|
1154
|
+
"type": "number",
|
|
1155
|
+
"required": false,
|
|
1156
|
+
"description": "Number of keyword matches found in the content"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"key": "contains_non_ascii",
|
|
1160
|
+
"type": "boolean",
|
|
1161
|
+
"required": false,
|
|
1162
|
+
"description": "Whether non-ASCII characters were detected. May indicate obfuscation or encoding-based evasion attempts"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"key": "phishing_detected",
|
|
1166
|
+
"type": "boolean",
|
|
1167
|
+
"required": false,
|
|
1168
|
+
"description": "Whether phishing patterns were detected in the content (suspicious URLs, impersonation, credential requests)"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"key": "content_safety_score",
|
|
1172
|
+
"type": "number",
|
|
1173
|
+
"required": false,
|
|
1174
|
+
"description": "Aggregate content safety score (0-100). Combines multiple safety signals into a single risk indicator",
|
|
1175
|
+
"range": "0-100"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"key": "content_safety_blocked",
|
|
1179
|
+
"type": "boolean",
|
|
1180
|
+
"required": false,
|
|
1181
|
+
"description": "Whether content was flagged for blocking by the content safety system"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"key": "conversation_turn",
|
|
1185
|
+
"type": "number",
|
|
1186
|
+
"required": false,
|
|
1187
|
+
"description": "Current conversation turn number. Use for policies that escalate strictness over long conversations"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"key": "multi_turn_detection",
|
|
1191
|
+
"type": "boolean",
|
|
1192
|
+
"required": false,
|
|
1193
|
+
"description": "Whether multi-turn injection patterns were detected (attack spread across multiple conversation turns)"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"key": "rpm_remaining_pct",
|
|
1197
|
+
"type": "number",
|
|
1198
|
+
"required": false,
|
|
1199
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)",
|
|
1200
|
+
"range": "0-100"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"key": "rpm_exceeded",
|
|
1204
|
+
"type": "boolean",
|
|
1205
|
+
"required": false,
|
|
1206
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"key": "tpm_remaining_pct",
|
|
1210
|
+
"type": "number",
|
|
1211
|
+
"required": false,
|
|
1212
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)",
|
|
1213
|
+
"range": "0-100"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"key": "tpm_exceeded",
|
|
1217
|
+
"type": "boolean",
|
|
1218
|
+
"required": false,
|
|
1219
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"key": "session_pii_detected",
|
|
1223
|
+
"type": "boolean",
|
|
1224
|
+
"required": false,
|
|
1225
|
+
"description": "Whether PII was detected in any previous turn of the session"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"key": "session_pii_types",
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"required": false,
|
|
1231
|
+
"description": "PII types detected across the session (accumulated)"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"key": "session_secrets_detected",
|
|
1235
|
+
"type": "boolean",
|
|
1236
|
+
"required": false,
|
|
1237
|
+
"description": "Whether secrets were detected in any previous turn of the session"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"key": "session_secret_types",
|
|
1241
|
+
"type": "array",
|
|
1242
|
+
"required": false,
|
|
1243
|
+
"description": "Secret types detected across the session (accumulated)"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"key": "session_injection_detected",
|
|
1247
|
+
"type": "boolean",
|
|
1248
|
+
"required": false,
|
|
1249
|
+
"description": "Whether prompt injection was detected in any previous turn of the session"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"key": "session_command_injection",
|
|
1253
|
+
"type": "boolean",
|
|
1254
|
+
"required": false,
|
|
1255
|
+
"description": "Whether command injection was detected in any previous turn of the session"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"key": "session_threat_turns",
|
|
1259
|
+
"type": "number",
|
|
1260
|
+
"required": false,
|
|
1261
|
+
"description": "Number of turns in the session where threats were detected"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"key": "session_max_injection_score",
|
|
1265
|
+
"type": "number",
|
|
1266
|
+
"required": false,
|
|
1267
|
+
"description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions",
|
|
1268
|
+
"range": "0-100"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"key": "session_max_jailbreak_score",
|
|
1272
|
+
"type": "number",
|
|
1273
|
+
"required": false,
|
|
1274
|
+
"description": "Highest jailbreak detection score seen in any turn of the session (0-100)",
|
|
1275
|
+
"range": "0-100"
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
"key": "session_max_command_injection_score",
|
|
1279
|
+
"type": "number",
|
|
1280
|
+
"required": false,
|
|
1281
|
+
"description": "Highest command injection score seen in any turn of the session (0-100)",
|
|
1282
|
+
"range": "0-100"
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
"key": "session_max_pii_score",
|
|
1286
|
+
"type": "number",
|
|
1287
|
+
"required": false,
|
|
1288
|
+
"description": "Highest PII risk score seen in any turn of the session (0-100)",
|
|
1289
|
+
"range": "0-100"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"key": "session_max_secret_score",
|
|
1293
|
+
"type": "number",
|
|
1294
|
+
"required": false,
|
|
1295
|
+
"description": "Highest secret detection score seen in any turn of the session (0-100)",
|
|
1296
|
+
"range": "0-100"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"key": "session_cumulative_risk_score",
|
|
1300
|
+
"type": "number",
|
|
1301
|
+
"required": false,
|
|
1302
|
+
"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"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"key": "session_max_sensitivity",
|
|
1306
|
+
"type": "string",
|
|
1307
|
+
"required": false,
|
|
1308
|
+
"description": "Highest data-sensitivity tier observed across the session (e.g. 'public', 'internal', 'confidential', 'restricted'). Use for session-level escalation policies"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
"key": "session_original_request",
|
|
1312
|
+
"type": "string",
|
|
1313
|
+
"required": false,
|
|
1314
|
+
"description": "The session's first user request, retained for drift / goal-hijack policies that compare later turns against the original intent"
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
"key": "agent_id",
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"required": false,
|
|
1320
|
+
"description": "Unique identifier of the authenticated AI agent making this request (e.g., 'agent_research_v3'). Empty string for human user requests. Use this to write agent-specific policies"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"key": "agent_type",
|
|
1324
|
+
"type": "string",
|
|
1325
|
+
"required": false,
|
|
1326
|
+
"description": "Type of the authenticated agent: 'orchestrator' (coordinates sub-agents), 'autonomous' (self-directed), 'tool_agent' (single-purpose tool), or 'human_proxy' (acts on behalf of a human). Empty string for human users"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"key": "agent_trust_level",
|
|
1330
|
+
"type": "string",
|
|
1331
|
+
"required": false,
|
|
1332
|
+
"description": "Trust level of the authenticated agent: 'first_party' (your own agents), 'verified_third_party' (audited external agents), or 'unverified' (unknown agents). Use this for tiered access control — e.g., only first_party agents can call dangerous tools"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"key": "agent_framework",
|
|
1336
|
+
"type": "string",
|
|
1337
|
+
"required": false,
|
|
1338
|
+
"description": "Framework or SDK the agent is built with (e.g., 'claude-code', 'langchain', 'crewai', 'autogen'). Use this to apply framework-specific policies"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"key": "agent_publisher",
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"required": false,
|
|
1344
|
+
"description": "Organization that published the agent (e.g., 'anthropic', 'internal', 'acme-corp'). Use this for organization-level trust policies"
|
|
1345
|
+
}
|
|
1346
|
+
]
|
|
1347
|
+
},
|
|
677
1348
|
{
|
|
678
1349
|
"name": "call_tool",
|
|
679
1350
|
"description": "Execute agentic tool calls, including shell commands, file operations, and MCP tools",
|
|
@@ -1066,6 +1737,36 @@
|
|
|
1066
1737
|
"required": false,
|
|
1067
1738
|
"description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: 'readonly', 'write_enabling', 'execute_enabling', 'network_access', 'unknown'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). 'unknown' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy."
|
|
1068
1739
|
},
|
|
1740
|
+
{
|
|
1741
|
+
"key": "resolved_target_paths",
|
|
1742
|
+
"type": "string",
|
|
1743
|
+
"required": false,
|
|
1744
|
+
"description": "Newline-delimited (leading+trailing \\n) union of the statically-resolved absolute target paths a shell command touches, any capability, emitted by the bash AST detector. Cedar like is full-string anchored and every value starts with the \\n delimiter, so patterns must begin with '*': anchored sub-tree \"*\\n/etc/*\" (matches only paths under /etc, unlike the loose \"*/etc/*\" which also hits a project etc/ dir at any depth), bare directory \"*\\n/etc\\n*\" (e.g. rm -rf /etc, no trailing slash), exact file \"*\\n/etc/passwd\\n*\". Resolution is purely lexical (cwd-join + path.Clean; quoting, escapes, wrappers, cd/VAR/bash -c normalized); remote endpoints and dynamic operands are never fabricated."
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"key": "read_target_paths",
|
|
1748
|
+
"type": "string",
|
|
1749
|
+
"required": false,
|
|
1750
|
+
"description": "Newline-delimited resolved absolute paths a shell command reads or enumerates, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"key": "write_target_paths",
|
|
1754
|
+
"type": "string",
|
|
1755
|
+
"required": false,
|
|
1756
|
+
"description": "Newline-delimited resolved absolute paths a shell command writes, creates, or destroys (redirects, cp/mv/dd, curl/wget -o, scp/rsync local dest, tar/unzip/cpio extraction, yq -i), emitted by the bash AST detector. \\n-anchored: e.g. write_target_paths like \"*\\n/etc/cron.d/*\"."
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"key": "exec_target_paths",
|
|
1760
|
+
"type": "string",
|
|
1761
|
+
"required": false,
|
|
1762
|
+
"description": "Newline-delimited resolved absolute paths a shell command executes as a script, emitted by the bash AST detector. \\n-anchored: match with like patterns that begin with '*' (see resolved_target_paths)."
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"key": "unresolved_target",
|
|
1766
|
+
"type": "boolean",
|
|
1767
|
+
"required": false,
|
|
1768
|
+
"description": "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments."
|
|
1769
|
+
},
|
|
1069
1770
|
{
|
|
1070
1771
|
"key": "cross_origin_detected",
|
|
1071
1772
|
"type": "boolean",
|