@highflame/policy 2.2.40 → 2.2.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/_schemas/agent_ops/templates/ported/organization/organization_deny_baseline.cedar +2 -2
  2. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_mcp_server_allowlist.cedar +24 -4
  3. package/_schemas/ai_gateway/context.json +300 -0
  4. package/_schemas/ai_gateway/detectors.json +928 -0
  5. package/_schemas/ai_gateway/schema.cedarschema +107 -3
  6. package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +24 -4
  7. package/_schemas/guardrails/detectors.json +2193 -0
  8. package/_schemas/guardrails/templates/mcp_server_allowlist.cedar +24 -4
  9. package/_schemas/guardrails/templates/profiles/output_protection/credentials.cedar +35 -0
  10. package/_schemas/guardrails/templates/profiles/output_protection/data_leakage.cedar +63 -0
  11. package/_schemas/guardrails/templates/profiles/output_protection/harmful_content.cedar +58 -0
  12. package/_schemas/guardrails/templates/profiles/output_protection/injection_carried_back.cedar +39 -0
  13. package/_schemas/guardrails/templates/templates.json +107 -11
  14. package/_schemas/overwatch/context.json +65 -0
  15. package/_schemas/overwatch/detectors.json +1129 -0
  16. package/_schemas/overwatch/schema.cedarschema +90 -0
  17. package/_schemas/sentry/detectors.json +857 -0
  18. package/dist/agent_ops-defaults.gen.js +26 -6
  19. package/dist/ai_gateway-defaults.gen.js +24 -4
  20. package/dist/ai_gateway-detectors.gen.d.ts +1 -1
  21. package/dist/ai_gateway-detectors.gen.js +22 -8
  22. package/dist/ai_gateway-entities.gen.js +5 -1
  23. package/dist/guardrails-defaults.gen.js +366 -15
  24. package/dist/guardrails-detectors.gen.d.ts +1 -1
  25. package/dist/guardrails-detectors.gen.js +22 -8
  26. package/dist/overwatch-context.gen.d.ts +3 -1
  27. package/dist/overwatch-context.gen.js +4 -0
  28. package/dist/overwatch-defaults.gen.js +25 -5
  29. package/dist/overwatch-detectors.gen.d.ts +1 -1
  30. package/dist/overwatch-detectors.gen.js +38 -8
  31. package/dist/service-schemas.gen.d.ts +2 -2
  32. package/dist/service-schemas.gen.js +267 -8
  33. package/package.json +1 -1
@@ -10,8 +10,8 @@
10
10
  // =============================================================================
11
11
 
12
12
  @id("organization.deny-baseline")
13
- @name("Block all actions (deny baseline)")
14
- @description("Blocks all actions; pair with scoped permit rules for a deny-by-default posture.")
13
+ @name("Block all actions (kill switch)")
14
+ @description("Blocks all actions unconditionally. A kill switch, not a baseline: forbid beats permit in Cedar, so this also disables every permit in the set.")
15
15
  @severity("high")
16
16
  @tags("category:organization,posture:deny-default,scope:org-wide")
17
17
  @reject_message("Request blocked: this organization uses a deny-by-default baseline — only explicitly permitted actions are allowed.")
@@ -2,8 +2,23 @@
2
2
  // MCP Server Allowlist
3
3
  // =============================================================================
4
4
  // Restricts MCP server connections to a pre-approved list. Customize the
5
- // `context.mcp_server` values in the permit rule to match the allowed
6
- // servers for your environment.
5
+ // `context.mcp_server` values to match the allowed servers for your
6
+ // environment the SAME list appears in both rules and both must be edited.
7
+ //
8
+ // Both rules are conditional on the allowlist, and both are needed:
9
+ //
10
+ // permit ... when { allowlisted } grants access; Cedar is default-deny,
11
+ // so without this nothing allows the
12
+ // allowlisted servers either.
13
+ // forbid ... unless { allowlisted } claws back everything else, including
14
+ // when a broad Baseline Permit is loaded.
15
+ //
16
+ // The forbid MUST carry the negation. `forbid` always beats `permit` in Cedar,
17
+ // so an UNCONDITIONAL forbid denies the allowlisted servers too — which is
18
+ // what this template used to do (highflame-policy#186).
19
+ //
20
+ // The `context has mcp_server` guard stays inside both conditions: a request
21
+ // naming no server cannot be on the allowlist, so it is denied.
7
22
  //
8
23
  // Context keys consumed:
9
24
  // - mcp_server: String
@@ -30,7 +45,7 @@ when {
30
45
 
31
46
  @id("tools.deny-non-allowlisted-mcp")
32
47
  @name("Block non-allowlisted MCP servers")
33
- @description("Blocks connect_server unconditionally so only the allowlist permit applies.")
48
+ @description("Blocks connect_server unless mcp_server is in the allowlist.")
34
49
  @severity("medium")
35
50
  @tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
36
51
  @reject_message("MCP server connection blocked: server is not on the allowlist.")
@@ -38,4 +53,9 @@ forbid (
38
53
  principal,
39
54
  action == AgentOps::Action::"connect_server",
40
55
  resource
41
- );
56
+ )
57
+ unless {
58
+ context has mcp_server &&
59
+ (context.mcp_server == "filesystem" ||
60
+ context.mcp_server == "playwright")
61
+ };
@@ -779,6 +779,306 @@
779
779
  }
780
780
  ]
781
781
  },
782
+ {
783
+ "name": "list",
784
+ "description": "Enumerate a server's tools, prompts, or resources — threat focus: tool poisoning and rug pull in the returned descriptions",
785
+ "context_attributes": [
786
+ {
787
+ "key": "role",
788
+ "type": "string",
789
+ "required": false,
790
+ "description": "Caller's RBAC role projected from the principal's token (AARM R6 / CAP-IDN-011)."
791
+ },
792
+ {
793
+ "key": "privilege_scope",
794
+ "type": "array",
795
+ "required": false,
796
+ "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011)."
797
+ },
798
+ {
799
+ "key": "content",
800
+ "type": "string",
801
+ "required": false,
802
+ "description": "The enumerated item's description — the text scanned for poisoning. Absent when the item declares none."
803
+ },
804
+ {
805
+ "key": "mcp_server",
806
+ "type": "string",
807
+ "required": false,
808
+ "description": "MCP server being enumerated"
809
+ },
810
+ {
811
+ "key": "tool_name",
812
+ "type": "string",
813
+ "required": false,
814
+ "description": "Name of the enumerated item being evaluated"
815
+ },
816
+ {
817
+ "key": "tool_risk_score",
818
+ "type": "number",
819
+ "required": false,
820
+ "description": "Tool risk score"
821
+ },
822
+ {
823
+ "key": "tool_category",
824
+ "type": "string",
825
+ "required": false,
826
+ "description": "\"safe\", \"sensitive\", \"dangerous\""
827
+ },
828
+ {
829
+ "key": "tool_is_sensitive",
830
+ "type": "boolean",
831
+ "required": false,
832
+ "description": "Tool is sensitive"
833
+ },
834
+ {
835
+ "key": "tool_is_builtin",
836
+ "type": "boolean",
837
+ "required": false,
838
+ "description": "Tool is builtin"
839
+ },
840
+ {
841
+ "key": "tool_operation_classes",
842
+ "type": "array",
843
+ "required": false,
844
+ "description": "Tool operation classes"
845
+ },
846
+ {
847
+ "key": "threat_count",
848
+ "type": "number",
849
+ "required": false,
850
+ "description": "Total threats detected"
851
+ },
852
+ {
853
+ "key": "highest_severity",
854
+ "type": "string",
855
+ "required": false,
856
+ "description": "Highest threat severity"
857
+ },
858
+ {
859
+ "key": "threat_categories",
860
+ "type": "array",
861
+ "required": false,
862
+ "description": "Threat category names"
863
+ },
864
+ {
865
+ "key": "detected_threats",
866
+ "type": "array",
867
+ "required": false,
868
+ "description": "Detection rule names that matched"
869
+ },
870
+ {
871
+ "key": "max_threat_severity",
872
+ "type": "number",
873
+ "required": false,
874
+ "description": "Numeric severity (0=none, 4=critical)"
875
+ },
876
+ {
877
+ "key": "tool_poisoning_score",
878
+ "type": "number",
879
+ "required": false,
880
+ "description": "Hidden instructions in a tool description"
881
+ },
882
+ {
883
+ "key": "tool_poisoning_detected",
884
+ "type": "boolean",
885
+ "required": false,
886
+ "description": "Hidden instructions found in the description"
887
+ },
888
+ {
889
+ "key": "rug_pull_score",
890
+ "type": "number",
891
+ "required": false,
892
+ "description": "Description drift after trust establishment"
893
+ },
894
+ {
895
+ "key": "rug_pull_detected",
896
+ "type": "boolean",
897
+ "required": false,
898
+ "description": "Description drifted after trust was established"
899
+ },
900
+ {
901
+ "key": "indirect_injection_score",
902
+ "type": "number",
903
+ "required": false,
904
+ "description": "Indirect injection score"
905
+ },
906
+ {
907
+ "key": "injection_score",
908
+ "type": "number",
909
+ "required": false,
910
+ "description": "Prompt injection classifier confidence (0-100)"
911
+ },
912
+ {
913
+ "key": "jailbreak_score",
914
+ "type": "number",
915
+ "required": false,
916
+ "description": "Jailbreak classifier confidence (0-100)"
917
+ },
918
+ {
919
+ "key": "secrets_detected",
920
+ "type": "boolean",
921
+ "required": false,
922
+ "description": "Whether secrets were detected in the description"
923
+ },
924
+ {
925
+ "key": "secret_types",
926
+ "type": "array",
927
+ "required": false,
928
+ "description": "Secret types detected"
929
+ },
930
+ {
931
+ "key": "secret_count",
932
+ "type": "number",
933
+ "required": false,
934
+ "description": "Number of secrets detected"
935
+ },
936
+ {
937
+ "key": "pii_detected",
938
+ "type": "boolean",
939
+ "required": false,
940
+ "description": "Whether PII was detected"
941
+ },
942
+ {
943
+ "key": "pii_types",
944
+ "type": "array",
945
+ "required": false,
946
+ "description": "PII types detected"
947
+ },
948
+ {
949
+ "key": "pii_count",
950
+ "type": "number",
951
+ "required": false,
952
+ "description": "Number of PII entities"
953
+ },
954
+ {
955
+ "key": "pii_score",
956
+ "type": "number",
957
+ "required": false,
958
+ "description": "PII confidence (0-100)"
959
+ },
960
+ {
961
+ "key": "mcp_server_verified",
962
+ "type": "boolean",
963
+ "required": false,
964
+ "description": "Whether the server is from a verified registry"
965
+ },
966
+ {
967
+ "key": "mcp_config_risk",
968
+ "type": "boolean",
969
+ "required": false,
970
+ "description": "Server config flagged risky"
971
+ },
972
+ {
973
+ "key": "mcp_risk_score",
974
+ "type": "number",
975
+ "required": false,
976
+ "description": "Server risk score (0-100)"
977
+ },
978
+ {
979
+ "key": "session_threat_turns",
980
+ "type": "number",
981
+ "required": false,
982
+ "description": "Session-aggregated threat turns across prior turns"
983
+ },
984
+ {
985
+ "key": "session_cumulative_risk_score",
986
+ "type": "number",
987
+ "required": false,
988
+ "description": "Session-aggregated cumulative risk score across prior turns"
989
+ },
990
+ {
991
+ "key": "session_injection_detected",
992
+ "type": "boolean",
993
+ "required": false,
994
+ "description": "Session-aggregated injection detected across prior turns"
995
+ },
996
+ {
997
+ "key": "session_command_injection",
998
+ "type": "boolean",
999
+ "required": false,
1000
+ "description": "Session-aggregated command injection across prior turns"
1001
+ },
1002
+ {
1003
+ "key": "session_pii_detected",
1004
+ "type": "boolean",
1005
+ "required": false,
1006
+ "description": "Session-aggregated pii detected across prior turns"
1007
+ },
1008
+ {
1009
+ "key": "session_pii_types",
1010
+ "type": "array",
1011
+ "required": false,
1012
+ "description": "Session-aggregated pii types across prior turns"
1013
+ },
1014
+ {
1015
+ "key": "session_secrets_detected",
1016
+ "type": "boolean",
1017
+ "required": false,
1018
+ "description": "Session-aggregated secrets detected across prior turns"
1019
+ },
1020
+ {
1021
+ "key": "session_secret_types",
1022
+ "type": "array",
1023
+ "required": false,
1024
+ "description": "Session-aggregated secret types across prior turns"
1025
+ },
1026
+ {
1027
+ "key": "session_max_injection_score",
1028
+ "type": "number",
1029
+ "required": false,
1030
+ "description": "Session-aggregated max injection score across prior turns"
1031
+ },
1032
+ {
1033
+ "key": "session_max_jailbreak_score",
1034
+ "type": "number",
1035
+ "required": false,
1036
+ "description": "Session-aggregated max jailbreak score across prior turns"
1037
+ },
1038
+ {
1039
+ "key": "session_max_command_injection_score",
1040
+ "type": "number",
1041
+ "required": false,
1042
+ "description": "Session-aggregated max command injection score across prior turns"
1043
+ },
1044
+ {
1045
+ "key": "session_max_pii_score",
1046
+ "type": "number",
1047
+ "required": false,
1048
+ "description": "Session-aggregated max pii score across prior turns"
1049
+ },
1050
+ {
1051
+ "key": "session_max_secret_score",
1052
+ "type": "number",
1053
+ "required": false,
1054
+ "description": "Session-aggregated max secret score across prior turns"
1055
+ },
1056
+ {
1057
+ "key": "rpm_remaining_pct",
1058
+ "type": "number",
1059
+ "required": false,
1060
+ "description": "Requests-per-minute headroom remaining"
1061
+ },
1062
+ {
1063
+ "key": "rpm_exceeded",
1064
+ "type": "boolean",
1065
+ "required": false,
1066
+ "description": "RPM limit exceeded"
1067
+ },
1068
+ {
1069
+ "key": "tpm_remaining_pct",
1070
+ "type": "number",
1071
+ "required": false,
1072
+ "description": "Tokens-per-minute headroom remaining"
1073
+ },
1074
+ {
1075
+ "key": "tpm_exceeded",
1076
+ "type": "boolean",
1077
+ "required": false,
1078
+ "description": "TPM limit exceeded"
1079
+ }
1080
+ ]
1081
+ },
782
1082
  {
783
1083
  "name": "process_prompt",
784
1084
  "description": "Process a prompt (MCP or LLM chat completion) — threat focus: injection, jailbreak, secrets, PII, content safety",