@highflame/policy 2.2.4 → 2.2.6

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 (24) hide show
  1. package/_schemas/ai_gateway/templates/defaults/pii.cedar +164 -0
  2. package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +465 -0
  3. package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +90 -0
  4. package/_schemas/ai_gateway/templates/secrets.cedar +46 -0
  5. package/_schemas/ai_gateway/templates/templates.json +88 -11
  6. package/_schemas/guardrails/templates/defaults/pii.cedar +137 -28
  7. package/_schemas/guardrails/templates/defaults/pii_model.cedar +90 -0
  8. package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +433 -31
  9. package/_schemas/guardrails/templates/templates.json +158 -43
  10. package/_schemas/sentry/templates/defaults/clipboard.cedar +3 -18
  11. package/_schemas/sentry/templates/defaults/file_safety.cedar +2 -17
  12. package/_schemas/sentry/templates/defaults/pii.cedar +102 -96
  13. package/_schemas/sentry/templates/defaults/pii_advanced.cedar +465 -0
  14. package/_schemas/sentry/templates/defaults/pii_model.cedar +90 -0
  15. package/_schemas/sentry/templates/templates.json +68 -11
  16. package/dist/ai_gateway-defaults.gen.d.ts +1 -1
  17. package/dist/ai_gateway-defaults.gen.js +838 -59
  18. package/dist/guardrails-defaults.gen.js +834 -226
  19. package/dist/overwatch-defaults.gen.js +703 -114
  20. package/dist/sentry-defaults.gen.js +746 -138
  21. package/package.json +1 -1
  22. package/_schemas/ai_gateway/templates/pii_redaction.cedar +0 -94
  23. package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +0 -35
  24. package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +0 -63
@@ -718,164 +718,725 @@ when {
718
718
  };
719
719
  `;
720
720
  const OVERWATCH_PRIVACY_DEFAULTS_CEDAR = `// =============================================================================
721
- // PII Detection (Default)
721
+ // Structural PII (Tier 1)
722
722
  // =============================================================================
723
- // Blocks personally identifiable information across prompts, tool calls, and
724
- // file operations using Shield's PII detector context keys.
723
+ // Blocks high-sensitivity identifiers that have a deterministic structure (SSNs, credit cards, IBANs, API keys) using fast regex pattern matching — high precision, low latency, few false positives. One forbid rule per identifier group.
725
724
  //
726
- // Severity tiers:
727
- // - Critical: SSN, credit card
728
- // - High: passport, IBAN
729
- // - Medium: email, phone, date of birth
730
- // - Low: IP address (prompt only)
725
+ // Sensitivity tiers and the structural (regex) / contextual (model) type
726
+ // vocabulary are defined canonically in schemas/_shared/pii_taxonomy.json and
727
+ // enforced by tools/lint-templates.
731
728
  //
732
729
  // Context keys consumed:
733
- // - pii_detected: Bool
734
- // - pii_types: Set<String>
735
- // - pii_count: Long
730
+ // - pii_types: Set<String> (union of structural lowercase + contextual uppercase types)
736
731
  //
737
- // Compliance:
738
- // - PCI DSS 3.4/4.1, GDPR Art. 32, HIPAA §164.312, CCPA §1798.150
739
- // - NIST 800-53 SI-4; OWASP LLM06
732
+ // Category: privacy
733
+ // Namespace: Overwatch
734
+ // =============================================================================
735
+
736
+ @id("privacy.block-pii-national-id")
737
+ @name("Block national ID numbers (structural)")
738
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a national ID (SSN, passport, or driver's license).")
739
+ @severity("high")
740
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
741
+ @reject_message("Content blocked: national identifier (SSN, passport, or driver's license) patterns detected.")
742
+ forbid (
743
+ principal,
744
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
745
+ resource
746
+ )
747
+ when {
748
+ context has pii_types &&
749
+ (
750
+ context.pii_types.contains("ssn") ||
751
+ context.pii_types.contains("passport") ||
752
+ context.pii_types.contains("national_id") ||
753
+ context.pii_types.contains("drivers_license")
754
+ )
755
+ };
756
+
757
+ @id("privacy.block-pii-credit-card")
758
+ @name("Block credit card numbers (structural)")
759
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credit card number.")
760
+ @severity("critical")
761
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss,owasp:llm06")
762
+ @reject_message("Content blocked: credit card number patterns detected.")
763
+ forbid (
764
+ principal,
765
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
766
+ resource
767
+ )
768
+ when {
769
+ context has pii_types && context.pii_types.contains("credit_card")
770
+ };
771
+
772
+ @id("privacy.block-pii-bank-account")
773
+ @name("Block bank account numbers (structural)")
774
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a bank account number (IBAN, SWIFT/BIC, or routing number).")
775
+ @severity("critical")
776
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
777
+ @reject_message("Content blocked: bank account (IBAN) number patterns detected.")
778
+ forbid (
779
+ principal,
780
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
781
+ resource
782
+ )
783
+ when {
784
+ context has pii_types &&
785
+ (
786
+ context.pii_types.contains("iban") ||
787
+ context.pii_types.contains("bank_account") ||
788
+ context.pii_types.contains("swift_bic") ||
789
+ context.pii_types.contains("aba_routing")
790
+ )
791
+ };
792
+
793
+ @id("privacy.block-pii-medical")
794
+ @name("Block medical identifiers (structural)")
795
+ @description("Blocks prompts, tool calls, and file reads/writes that contain medical data (record number, MBI, NPI, or blood type).")
796
+ @severity("medium")
797
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:hipaa,owasp:llm06")
798
+ @reject_message("Content blocked: medical record identifier patterns detected.")
799
+ forbid (
800
+ principal,
801
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
802
+ resource
803
+ )
804
+ when {
805
+ context has pii_types &&
806
+ (
807
+ context.pii_types.contains("medical_record") ||
808
+ context.pii_types.contains("patient_record") ||
809
+ context.pii_types.contains("medicare_beneficiary_id") ||
810
+ context.pii_types.contains("npi") ||
811
+ context.pii_types.contains("medical_term") ||
812
+ context.pii_types.contains("blood_type")
813
+ )
814
+ };
815
+
816
+ @id("privacy.block-pii-tax-id")
817
+ @name("Block tax identifiers (structural)")
818
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a tax ID (ITIN, EIN, or PTIN).")
819
+ @severity("high")
820
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
821
+ @reject_message("Content blocked: tax identifier (ITIN or EIN) patterns detected.")
822
+ forbid (
823
+ principal,
824
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
825
+ resource
826
+ )
827
+ when {
828
+ context has pii_types &&
829
+ (
830
+ context.pii_types.contains("itin") ||
831
+ context.pii_types.contains("ein") ||
832
+ context.pii_types.contains("ptin")
833
+ )
834
+ };
835
+
836
+ @id("privacy.block-pii-credential")
837
+ @name("Block credentials (structural)")
838
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credential or secret (API key, token, password hash, or private key).")
839
+ @severity("critical")
840
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
841
+ @reject_message("Content blocked: credential or API key patterns detected.")
842
+ forbid (
843
+ principal,
844
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
845
+ resource
846
+ )
847
+ when {
848
+ context has pii_types &&
849
+ (
850
+ context.pii_types.contains("aws_access_key") ||
851
+ context.pii_types.contains("api_key") ||
852
+ context.pii_types.contains("jwt_token") ||
853
+ context.pii_types.contains("encryption_key") ||
854
+ context.pii_types.contains("http_basic_auth") ||
855
+ context.pii_types.contains("gcp_credential") ||
856
+ context.pii_types.contains("gcp_api_key") ||
857
+ context.pii_types.contains("gcp_signed_policy") ||
858
+ context.pii_types.contains("session_cookie") ||
859
+ context.pii_types.contains("oauth_token") ||
860
+ context.pii_types.contains("tls_certificate") ||
861
+ context.pii_types.contains("password_hash") ||
862
+ context.pii_types.contains("csrf_token")
863
+ )
864
+ };
865
+
866
+ @id("privacy.block-pii-crypto")
867
+ @name("Block cryptocurrency addresses (structural)")
868
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a cryptocurrency wallet address.")
869
+ @severity("high")
870
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
871
+ @reject_message("Content blocked: cryptocurrency wallet address patterns detected.")
872
+ forbid (
873
+ principal,
874
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
875
+ resource
876
+ )
877
+ when {
878
+ context has pii_types &&
879
+ (
880
+ context.pii_types.contains("bitcoin_address") ||
881
+ context.pii_types.contains("ethereum_address")
882
+ )
883
+ };
884
+ `;
885
+ const OVERWATCH_PRIVACY_PII_MODEL_CEDAR = `// =============================================================================
886
+ // Contextual PII (Tier 2)
887
+ // =============================================================================
888
+ // Blocks the same high-sensitivity identifier groups inferred from surrounding context by the ML PII model — catches unstructured or novel PII the structural patterns miss (higher recall). Requires the pii_model detector.
889
+ //
890
+ // Sensitivity tiers and the structural (regex) / contextual (model) type
891
+ // vocabulary are defined canonically in schemas/_shared/pii_taxonomy.json and
892
+ // enforced by tools/lint-templates.
893
+ //
894
+ // Context keys consumed:
895
+ // - pii_types: Set<String> (union of structural lowercase + contextual uppercase types)
740
896
  //
741
897
  // Category: privacy
742
898
  // Namespace: Overwatch
743
899
  // =============================================================================
744
900
 
745
- // ---------------------------------------------------------------------------
746
- // Section 1: Critical PII (SSN, credit card)
747
- // ---------------------------------------------------------------------------
901
+ @id("privacy.block-pii-national-id-model")
902
+ @name("Block national ID numbers (contextual)")
903
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a national ID (SSN, passport, or driver's license).")
904
+ @severity("high")
905
+ @tags("category:privacy,threat:pii,detection:ml,owasp:llm06")
906
+ @reject_message("Content blocked: national identifier (SSN, passport, or driver's license) patterns detected.")
907
+ forbid (
908
+ principal,
909
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
910
+ resource
911
+ )
912
+ when {
913
+ context has pii_types && context.pii_types.contains("NATIONAL_ID")
914
+ };
748
915
 
749
- @id("privacy.block-ssn")
750
- @name("Block Social Security Numbers")
751
- @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"ssn\\".")
916
+ @id("privacy.block-pii-credit-card-model")
917
+ @name("Block credit card numbers (contextual)")
918
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credit card number.")
752
919
  @severity("critical")
753
- @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss,compliance:gdpr")
754
- @reject_message("Content blocked: Social Security Number patterns detected.")
920
+ @tags("category:privacy,threat:pii,detection:ml,compliance:pci-dss,owasp:llm06")
921
+ @reject_message("Content blocked: credit card number patterns detected.")
755
922
  forbid (
756
923
  principal,
757
924
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
758
925
  resource
759
926
  )
760
927
  when {
761
- context has pii_types && context.pii_types.contains("ssn")
928
+ context has pii_types && context.pii_types.contains("CREDIT_CARD")
762
929
  };
763
930
 
764
- @id("privacy.block-credit-card")
765
- @name("Block credit card numbers")
766
- @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"credit_card\\".")
931
+ @id("privacy.block-pii-bank-account-model")
932
+ @name("Block bank account numbers (contextual)")
933
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a bank account number (IBAN, SWIFT/BIC, or routing number).")
767
934
  @severity("critical")
768
- @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss")
769
- @reject_message("Content blocked: credit card number patterns detected — PCI DSS prohibits raw PAN handling.")
935
+ @tags("category:privacy,threat:pii,detection:ml,owasp:llm06")
936
+ @reject_message("Content blocked: bank account (IBAN) number patterns detected.")
770
937
  forbid (
771
938
  principal,
772
939
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
773
940
  resource
774
941
  )
775
942
  when {
776
- context has pii_types && context.pii_types.contains("credit_card")
943
+ context has pii_types && context.pii_types.contains("ACCOUNT_NUMBER")
777
944
  };
778
945
 
779
- // ---------------------------------------------------------------------------
780
- // Section 2: High PII (passport, IBAN)
781
- // ---------------------------------------------------------------------------
946
+ @id("privacy.block-pii-medical-model")
947
+ @name("Block medical identifiers (contextual)")
948
+ @description("Blocks prompts, tool calls, and file reads/writes that contain medical data (record number, MBI, NPI, or blood type).")
949
+ @severity("medium")
950
+ @tags("category:privacy,threat:pii,detection:ml,compliance:hipaa,owasp:llm06")
951
+ @reject_message("Content blocked: medical record identifier patterns detected.")
952
+ forbid (
953
+ principal,
954
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
955
+ resource
956
+ )
957
+ when {
958
+ context has pii_types && context.pii_types.contains("MEDICAL")
959
+ };
960
+
961
+ @id("privacy.block-pii-credential-model")
962
+ @name("Block credentials (contextual)")
963
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credential or secret (API key, token, password hash, or private key).")
964
+ @severity("critical")
965
+ @tags("category:privacy,threat:pii,detection:ml,owasp:llm06")
966
+ @reject_message("Content blocked: credential or API key patterns detected.")
967
+ forbid (
968
+ principal,
969
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
970
+ resource
971
+ )
972
+ when {
973
+ context has pii_types && context.pii_types.contains("CREDENTIAL")
974
+ };
975
+ `;
976
+ const OVERWATCH_PRIVACY_ADVANCED_PII_CEDAR = `// =============================================================================
977
+ // Comprehensive PII (Tier 3)
978
+ // =============================================================================
979
+ // Blocks every PII entity type — structural and contextual, sensitive and situational — one forbid rule per group so any individual type can be toggled off. High false-positive surface; opt-in.
980
+ //
981
+ // Sensitivity tiers and the structural (regex) / contextual (model) type
982
+ // vocabulary are defined canonically in schemas/_shared/pii_taxonomy.json and
983
+ // enforced by tools/lint-templates.
984
+ //
985
+ // Context keys consumed:
986
+ // - pii_types: Set<String> (union of structural lowercase + contextual uppercase types)
987
+ //
988
+ // Category: privacy
989
+ // Namespace: Overwatch
990
+ // =============================================================================
782
991
 
783
- @id("privacy.block-passport")
784
- @name("Block passport numbers")
785
- @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"passport\\".")
992
+ @id("privacy.block-pii-national-id-all")
993
+ @name("Block national ID numbers (comprehensive)")
994
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a national ID (SSN, passport, or driver's license).")
786
995
  @severity("high")
787
- @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
788
- @reject_message("Content blocked: passport number patterns detected.")
996
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
997
+ @reject_message("Content blocked: national identifier (SSN, passport, or driver's license) patterns detected.")
998
+ forbid (
999
+ principal,
1000
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1001
+ resource
1002
+ )
1003
+ when {
1004
+ context has pii_types &&
1005
+ (
1006
+ context.pii_types.contains("ssn") ||
1007
+ context.pii_types.contains("passport") ||
1008
+ context.pii_types.contains("national_id") ||
1009
+ context.pii_types.contains("drivers_license") ||
1010
+ context.pii_types.contains("NATIONAL_ID")
1011
+ )
1012
+ };
1013
+
1014
+ @id("privacy.block-pii-credit-card-all")
1015
+ @name("Block credit card numbers (comprehensive)")
1016
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credit card number.")
1017
+ @severity("critical")
1018
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:pci-dss,owasp:llm06")
1019
+ @reject_message("Content blocked: credit card number patterns detected.")
1020
+ forbid (
1021
+ principal,
1022
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1023
+ resource
1024
+ )
1025
+ when {
1026
+ context has pii_types &&
1027
+ (
1028
+ context.pii_types.contains("credit_card") ||
1029
+ context.pii_types.contains("CREDIT_CARD")
1030
+ )
1031
+ };
1032
+
1033
+ @id("privacy.block-pii-bank-account-all")
1034
+ @name("Block bank account numbers (comprehensive)")
1035
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a bank account number (IBAN, SWIFT/BIC, or routing number).")
1036
+ @severity("critical")
1037
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1038
+ @reject_message("Content blocked: bank account (IBAN) number patterns detected.")
1039
+ forbid (
1040
+ principal,
1041
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1042
+ resource
1043
+ )
1044
+ when {
1045
+ context has pii_types &&
1046
+ (
1047
+ context.pii_types.contains("iban") ||
1048
+ context.pii_types.contains("bank_account") ||
1049
+ context.pii_types.contains("swift_bic") ||
1050
+ context.pii_types.contains("aba_routing") ||
1051
+ context.pii_types.contains("ACCOUNT_NUMBER")
1052
+ )
1053
+ };
1054
+
1055
+ @id("privacy.block-pii-medical-all")
1056
+ @name("Block medical identifiers (comprehensive)")
1057
+ @description("Blocks prompts, tool calls, and file reads/writes that contain medical data (record number, MBI, NPI, or blood type).")
1058
+ @severity("medium")
1059
+ @tags("category:privacy,threat:pii,detection:pattern,compliance:hipaa,owasp:llm06")
1060
+ @reject_message("Content blocked: medical record identifier patterns detected.")
789
1061
  forbid (
790
1062
  principal,
791
1063
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
792
1064
  resource
793
1065
  )
794
1066
  when {
795
- context has pii_types && context.pii_types.contains("passport")
1067
+ context has pii_types &&
1068
+ (
1069
+ context.pii_types.contains("medical_record") ||
1070
+ context.pii_types.contains("patient_record") ||
1071
+ context.pii_types.contains("medicare_beneficiary_id") ||
1072
+ context.pii_types.contains("npi") ||
1073
+ context.pii_types.contains("medical_term") ||
1074
+ context.pii_types.contains("blood_type") ||
1075
+ context.pii_types.contains("MEDICAL")
1076
+ )
796
1077
  };
797
1078
 
798
- @id("privacy.block-iban")
799
- @name("Block bank account numbers")
800
- @description("Blocks process_prompt, call_tool, read_file, and write_file when pii_types contains \\"iban\\".")
1079
+ @id("privacy.block-pii-tax-id-all")
1080
+ @name("Block tax identifiers (comprehensive)")
1081
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a tax ID (ITIN, EIN, or PTIN).")
801
1082
  @severity("high")
802
- @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr,compliance:pci-dss")
803
- @reject_message("Content blocked: IBAN / bank account number patterns detected.")
1083
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1084
+ @reject_message("Content blocked: tax identifier (ITIN or EIN) patterns detected.")
804
1085
  forbid (
805
1086
  principal,
806
1087
  action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
807
1088
  resource
808
1089
  )
809
1090
  when {
810
- context has pii_types && context.pii_types.contains("iban")
1091
+ context has pii_types &&
1092
+ (
1093
+ context.pii_types.contains("itin") ||
1094
+ context.pii_types.contains("ein") ||
1095
+ context.pii_types.contains("ptin")
1096
+ )
811
1097
  };
812
1098
 
813
- // ---------------------------------------------------------------------------
814
- // Section 3: Medium PII (contact info)
815
- // ---------------------------------------------------------------------------
1099
+ @id("privacy.block-pii-credential-all")
1100
+ @name("Block credentials (comprehensive)")
1101
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a credential or secret (API key, token, password hash, or private key).")
1102
+ @severity("critical")
1103
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1104
+ @reject_message("Content blocked: credential or API key patterns detected.")
1105
+ forbid (
1106
+ principal,
1107
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1108
+ resource
1109
+ )
1110
+ when {
1111
+ context has pii_types &&
1112
+ (
1113
+ context.pii_types.contains("aws_access_key") ||
1114
+ context.pii_types.contains("api_key") ||
1115
+ context.pii_types.contains("jwt_token") ||
1116
+ context.pii_types.contains("encryption_key") ||
1117
+ context.pii_types.contains("http_basic_auth") ||
1118
+ context.pii_types.contains("gcp_credential") ||
1119
+ context.pii_types.contains("gcp_api_key") ||
1120
+ context.pii_types.contains("gcp_signed_policy") ||
1121
+ context.pii_types.contains("session_cookie") ||
1122
+ context.pii_types.contains("oauth_token") ||
1123
+ context.pii_types.contains("tls_certificate") ||
1124
+ context.pii_types.contains("password_hash") ||
1125
+ context.pii_types.contains("csrf_token") ||
1126
+ context.pii_types.contains("CREDENTIAL")
1127
+ )
1128
+ };
816
1129
 
817
- @id("privacy.block-email")
818
- @name("Block email addresses")
819
- @description("Blocks process_prompt and call_tool when pii_types contains \\"email\\".")
1130
+ @id("privacy.block-pii-crypto-all")
1131
+ @name("Block cryptocurrency addresses (comprehensive)")
1132
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a cryptocurrency wallet address.")
1133
+ @severity("high")
1134
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1135
+ @reject_message("Content blocked: cryptocurrency wallet address patterns detected.")
1136
+ forbid (
1137
+ principal,
1138
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1139
+ resource
1140
+ )
1141
+ when {
1142
+ context has pii_types &&
1143
+ (
1144
+ context.pii_types.contains("bitcoin_address") ||
1145
+ context.pii_types.contains("ethereum_address")
1146
+ )
1147
+ };
1148
+
1149
+ @id("privacy.block-pii-names-all")
1150
+ @name("Block personal names (comprehensive)")
1151
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a personal name.")
1152
+ @severity("low")
1153
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1154
+ @reject_message("Content blocked: personal name patterns detected.")
1155
+ forbid (
1156
+ principal,
1157
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1158
+ resource
1159
+ )
1160
+ when {
1161
+ context has pii_types &&
1162
+ (
1163
+ context.pii_types.contains("person_name") ||
1164
+ context.pii_types.contains("PERSON")
1165
+ )
1166
+ };
1167
+
1168
+ @id("privacy.block-pii-email-all")
1169
+ @name("Block email addresses (comprehensive)")
1170
+ @description("Blocks prompts, tool calls, and file reads/writes that contain an email address.")
820
1171
  @severity("medium")
821
- @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
1172
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
822
1173
  @reject_message("Content blocked: email address patterns detected.")
823
1174
  forbid (
824
1175
  principal,
825
- action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
1176
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
826
1177
  resource
827
1178
  )
828
1179
  when {
829
- context has pii_types && context.pii_types.contains("email")
1180
+ context has pii_types &&
1181
+ (
1182
+ context.pii_types.contains("email") ||
1183
+ context.pii_types.contains("EMAIL_ADDRESS")
1184
+ )
830
1185
  };
831
1186
 
832
- @id("privacy.block-phone")
833
- @name("Block phone numbers")
834
- @description("Blocks process_prompt and call_tool when pii_types contains \\"phone\\".")
1187
+ @id("privacy.block-pii-phone-all")
1188
+ @name("Block phone numbers (comprehensive)")
1189
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a phone number.")
835
1190
  @severity("medium")
836
- @tags("category:privacy,threat:pii,detection:pattern,compliance:gdpr")
1191
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
837
1192
  @reject_message("Content blocked: phone number patterns detected.")
838
1193
  forbid (
839
1194
  principal,
840
- action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
1195
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
841
1196
  resource
842
1197
  )
843
1198
  when {
844
- context has pii_types && context.pii_types.contains("phone")
1199
+ context has pii_types &&
1200
+ (
1201
+ context.pii_types.contains("phone") ||
1202
+ context.pii_types.contains("PHONE_NUMBER")
1203
+ )
845
1204
  };
846
1205
 
847
- @id("privacy.block-dob")
848
- @name("Block dates of birth")
849
- @description("Blocks process_prompt and call_tool when pii_types contains \\"date_of_birth\\".")
1206
+ @id("privacy.block-pii-datetime-all")
1207
+ @name("Block dates and times (comprehensive)")
1208
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a date or time (date of birth, timestamp, or card expiry).")
850
1209
  @severity("medium")
851
- @tags("category:privacy,threat:pii,detection:pattern,compliance:hipaa")
852
- @reject_message("Content blocked: date of birth patterns detected.")
1210
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1211
+ @reject_message("Content blocked: date or time patterns detected.")
853
1212
  forbid (
854
1213
  principal,
855
- action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
1214
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
856
1215
  resource
857
1216
  )
858
1217
  when {
859
- context has pii_types && context.pii_types.contains("date_of_birth")
1218
+ context has pii_types &&
1219
+ (
1220
+ context.pii_types.contains("date_of_birth") ||
1221
+ context.pii_types.contains("date_time") ||
1222
+ context.pii_types.contains("time") ||
1223
+ context.pii_types.contains("card_expiry") ||
1224
+ context.pii_types.contains("DATE_TIME")
1225
+ )
860
1226
  };
861
1227
 
862
- // ---------------------------------------------------------------------------
863
- // Section 4: Low PII (IP addresses, prompts only)
864
- // ---------------------------------------------------------------------------
1228
+ @id("privacy.block-pii-url-all")
1229
+ @name("Block URLs (comprehensive)")
1230
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a URL.")
1231
+ @severity("low")
1232
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1233
+ @reject_message("Content blocked: URL patterns detected.")
1234
+ forbid (
1235
+ principal,
1236
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1237
+ resource
1238
+ )
1239
+ when {
1240
+ context has pii_types &&
1241
+ (
1242
+ context.pii_types.contains("url") ||
1243
+ context.pii_types.contains("URL")
1244
+ )
1245
+ };
865
1246
 
866
- @id("privacy.block-ip-address")
867
- @name("Block IP addresses in prompts")
868
- @description("Blocks process_prompt when pii_types contains \\"ip_address\\".")
1247
+ @id("privacy.block-pii-location-all")
1248
+ @name("Block locations (comprehensive)")
1249
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a location (street address, postal code, or military address).")
869
1250
  @severity("low")
870
- @tags("category:privacy,threat:pii,detection:pattern,surface:process-prompt")
871
- @reject_message("Prompt blocked: IP address patterns detected.")
1251
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1252
+ @reject_message("Content blocked: street address or location patterns detected.")
872
1253
  forbid (
873
1254
  principal,
874
- action == Overwatch::Action::"process_prompt",
1255
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1256
+ resource
1257
+ )
1258
+ when {
1259
+ context has pii_types &&
1260
+ (
1261
+ context.pii_types.contains("street_address") ||
1262
+ context.pii_types.contains("zip_code") ||
1263
+ context.pii_types.contains("military_address") ||
1264
+ context.pii_types.contains("LOCATION")
1265
+ )
1266
+ };
1267
+
1268
+ @id("privacy.block-pii-organization-all")
1269
+ @name("Block organization names (comprehensive)")
1270
+ @description("Blocks prompts, tool calls, and file reads/writes that contain an organization name.")
1271
+ @severity("low")
1272
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1273
+ @reject_message("Content blocked: organization name patterns detected.")
1274
+ forbid (
1275
+ principal,
1276
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1277
+ resource
1278
+ )
1279
+ when {
1280
+ context has pii_types &&
1281
+ (
1282
+ context.pii_types.contains("organization") ||
1283
+ context.pii_types.contains("ORGANIZATION")
1284
+ )
1285
+ };
1286
+
1287
+ @id("privacy.block-pii-occupation-all")
1288
+ @name("Block occupations (comprehensive)")
1289
+ @description("Blocks prompts, tool calls, and file reads/writes that contain an occupation.")
1290
+ @severity("low")
1291
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1292
+ @reject_message("Content blocked: occupation patterns detected.")
1293
+ forbid (
1294
+ principal,
1295
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1296
+ resource
1297
+ )
1298
+ when {
1299
+ context has pii_types &&
1300
+ (
1301
+ context.pii_types.contains("occupation") ||
1302
+ context.pii_types.contains("OCCUPATION")
1303
+ )
1304
+ };
1305
+
1306
+ @id("privacy.block-pii-username-all")
1307
+ @name("Block usernames (comprehensive)")
1308
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a username.")
1309
+ @severity("low")
1310
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1311
+ @reject_message("Content blocked: username patterns detected.")
1312
+ forbid (
1313
+ principal,
1314
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1315
+ resource
1316
+ )
1317
+ when {
1318
+ context has pii_types &&
1319
+ (
1320
+ context.pii_types.contains("username") ||
1321
+ context.pii_types.contains("USERNAME")
1322
+ )
1323
+ };
1324
+
1325
+ @id("privacy.block-pii-employee-customer-id-all")
1326
+ @name("Block employee or customer IDs (comprehensive)")
1327
+ @description("Blocks prompts, tool calls, and file reads/writes that contain an employee or customer ID.")
1328
+ @severity("medium")
1329
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1330
+ @reject_message("Content blocked: employee or customer identifier patterns detected.")
1331
+ forbid (
1332
+ principal,
1333
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
875
1334
  resource
876
1335
  )
877
1336
  when {
878
- context has pii_types && context.pii_types.contains("ip_address")
1337
+ context has pii_types &&
1338
+ (
1339
+ context.pii_types.contains("employee_id") ||
1340
+ context.pii_types.contains("customer_id") ||
1341
+ context.pii_types.contains("EMPLOYEE_ID") ||
1342
+ context.pii_types.contains("CUSTOMER_ID")
1343
+ )
1344
+ };
1345
+
1346
+ @id("privacy.block-pii-device-id-all")
1347
+ @name("Block device and network identifiers (comprehensive)")
1348
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a device or network identifier (IP, MAC, IMEI, or UUID).")
1349
+ @severity("medium")
1350
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1351
+ @reject_message("Content blocked: device or network identifier patterns detected.")
1352
+ forbid (
1353
+ principal,
1354
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1355
+ resource
1356
+ )
1357
+ when {
1358
+ context has pii_types &&
1359
+ (
1360
+ context.pii_types.contains("device_id") ||
1361
+ context.pii_types.contains("ip_address") ||
1362
+ context.pii_types.contains("ipv6_address") ||
1363
+ context.pii_types.contains("imei") ||
1364
+ context.pii_types.contains("device_serial") ||
1365
+ context.pii_types.contains("mac_address") ||
1366
+ context.pii_types.contains("user_agent") ||
1367
+ context.pii_types.contains("serial_number") ||
1368
+ context.pii_types.contains("uuid") ||
1369
+ context.pii_types.contains("DEVICE_ID")
1370
+ )
1371
+ };
1372
+
1373
+ @id("privacy.block-pii-vehicle-all")
1374
+ @name("Block vehicle identifiers (comprehensive)")
1375
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a vehicle identifier (VIN or license plate).")
1376
+ @severity("medium")
1377
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1378
+ @reject_message("Content blocked: vehicle identifier (VIN or plate) patterns detected.")
1379
+ forbid (
1380
+ principal,
1381
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1382
+ resource
1383
+ )
1384
+ when {
1385
+ context has pii_types &&
1386
+ (
1387
+ context.pii_types.contains("vin") ||
1388
+ context.pii_types.contains("license_plate") ||
1389
+ context.pii_types.contains("VEHICLE_IDENTIFIER")
1390
+ )
1391
+ };
1392
+
1393
+ @id("privacy.block-pii-financial-all")
1394
+ @name("Block financial amounts (comprehensive)")
1395
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a financial amount or transaction ID.")
1396
+ @severity("medium")
1397
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1398
+ @reject_message("Content blocked: salary or financial amount patterns detected.")
1399
+ forbid (
1400
+ principal,
1401
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1402
+ resource
1403
+ )
1404
+ when {
1405
+ context has pii_types &&
1406
+ (
1407
+ context.pii_types.contains("salary") ||
1408
+ context.pii_types.contains("financial_amount") ||
1409
+ context.pii_types.contains("transaction_id") ||
1410
+ context.pii_types.contains("FINANCIAL")
1411
+ )
1412
+ };
1413
+
1414
+ @id("privacy.block-pii-sensitive-attribute-all")
1415
+ @name("Block sensitive attributes (comprehensive)")
1416
+ @description("Blocks prompts, tool calls, and file reads/writes that contain a sensitive personal attribute (ethnicity, religion, age, etc.).")
1417
+ @severity("high")
1418
+ @tags("category:privacy,threat:pii,detection:pattern,owasp:llm06")
1419
+ @reject_message("Content blocked: sensitive attribute (ethnicity, religion, etc.) patterns detected.")
1420
+ forbid (
1421
+ principal,
1422
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool", Overwatch::Action::"read_file", Overwatch::Action::"write_file"],
1423
+ resource
1424
+ )
1425
+ when {
1426
+ context has pii_types &&
1427
+ (
1428
+ context.pii_types.contains("ethnicity") ||
1429
+ context.pii_types.contains("religion") ||
1430
+ context.pii_types.contains("sexual_orientation") ||
1431
+ context.pii_types.contains("political_affiliation") ||
1432
+ context.pii_types.contains("nationality") ||
1433
+ context.pii_types.contains("age") ||
1434
+ context.pii_types.contains("gender") ||
1435
+ context.pii_types.contains("marital_status") ||
1436
+ context.pii_types.contains("education_level") ||
1437
+ context.pii_types.contains("employment_status") ||
1438
+ context.pii_types.contains("SENSITIVE_ATTRIBUTE")
1439
+ )
879
1440
  };
880
1441
  `;
881
1442
  const OVERWATCH_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR = `// =============================================================================
@@ -1059,17 +1620,17 @@ permit (
1059
1620
  resource in Overwatch::Project::"support-project"
1060
1621
  );
1061
1622
  `;
1062
- const OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR = `// =============================================================================
1623
+ const OVERWATCH_AGENT_IDENTITY_CLAUDE_BLOCK_INJECTION_CEDAR = `// =============================================================================
1063
1624
  // Agent-Specific Guardrails
1064
1625
  // =============================================================================
1065
1626
  // Per-agent security policies applied based on the agent identity. Different
1066
- // agents have different risk profiles — these template rules cover Claude
1067
- // (injection focus) and Cursor (PII focus); customize the agent IDs for
1068
- // your deployment.
1627
+ // agents have different risk profiles — this template rule covers Claude
1628
+ // (injection focus); customize the agent IDs for your deployment. PII is
1629
+ // handled uniformly by the canonical privacy.* templates (defaults/pii*.cedar),
1630
+ // not per-agent.
1069
1631
  //
1070
1632
  // Context keys consumed:
1071
1633
  // - detected_threats: Set<String>
1072
- // - threat_categories: Set<String>
1073
1634
  //
1074
1635
  // Category: agent-identity
1075
1636
  // Namespace: Overwatch
@@ -1089,21 +1650,6 @@ forbid (
1089
1650
  when {
1090
1651
  context has detected_threats && context.detected_threats.contains("prompt_injection")
1091
1652
  };
1092
-
1093
- @id("agent-identity.cursor-block-pii")
1094
- @name("Block PII on Cursor agent")
1095
- @description("Blocks process_prompt for the Cursor agent when threat_categories contains \\"pii\\".")
1096
- @severity("critical")
1097
- @tags("category:agent-identity,threat:pii,scope:per-agent,detection:rule,surface:process-prompt,compliance:gdpr")
1098
- @reject_message("Prompt blocked: PII detected for the Cursor agent — prevents leakage through code agent prompts.")
1099
- forbid (
1100
- principal == Overwatch::Agent::"cursor",
1101
- action == Overwatch::Action::"process_prompt",
1102
- resource
1103
- )
1104
- when {
1105
- context has threat_categories && context.threat_categories.contains("pii")
1106
- };
1107
1653
  `;
1108
1654
  // =============================================================================
1109
1655
  // CATEGORIES
@@ -1202,12 +1748,30 @@ export const OVERWATCH_TEMPLATES = [
1202
1748
  },
1203
1749
  {
1204
1750
  id: 'privacy.defaults',
1205
- name: 'PII Detection',
1206
- description: 'Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.',
1751
+ name: 'Structural PII',
1752
+ description: 'Block well-formatted sensitive identifiers SSNs, credit cards, IBANs, API keys — via fast deterministic pattern matching. High precision, low latency, few false positives; use as the always-on baseline.',
1207
1753
  category: 'privacy',
1208
1754
  cedarText: OVERWATCH_PRIVACY_DEFAULTS_CEDAR,
1209
1755
  severity: 'critical',
1210
- tags: ['category:privacy', 'threat:pii', 'compliance:pci-dss', 'compliance:gdpr', 'compliance:hipaa'],
1756
+ tags: ['category:privacy', 'threat:pii', 'detection:pattern', 'compliance:pci-dss', 'compliance:hipaa'],
1757
+ },
1758
+ {
1759
+ id: 'privacy.pii-model',
1760
+ name: 'Contextual PII',
1761
+ description: 'Block the same sensitive identifiers when the ML model infers them from surrounding context — catches unstructured or novel PII the structural patterns miss. Higher recall; requires the pii_model detector.',
1762
+ category: 'privacy',
1763
+ cedarText: OVERWATCH_PRIVACY_PII_MODEL_CEDAR,
1764
+ severity: 'critical',
1765
+ tags: ['category:privacy', 'threat:pii', 'detection:ml', 'compliance:pci-dss', 'compliance:hipaa'],
1766
+ },
1767
+ {
1768
+ id: 'privacy.advanced-pii',
1769
+ name: 'Comprehensive PII',
1770
+ description: 'Block every PII type — structural and contextual, sensitive and situational. Situational entities (names, locations, dates, etc.) are real PII but appear in ordinary text, so this tier flags often; one forbid rule per entity lets you disable the ones you don\'t need. Opt-in for strict environments.',
1771
+ category: 'privacy',
1772
+ cedarText: OVERWATCH_PRIVACY_ADVANCED_PII_CEDAR,
1773
+ severity: 'critical',
1774
+ tags: ['category:privacy', 'threat:pii', 'detection:pattern', 'compliance:pci-dss', 'compliance:hipaa'],
1211
1775
  },
1212
1776
  {
1213
1777
  id: 'tools.mcp-server-allowlist',
@@ -1255,13 +1819,13 @@ export const OVERWATCH_TEMPLATES = [
1255
1819
  tags: ['category:organization', 'scope:per-tool', 'posture:deny-default'],
1256
1820
  },
1257
1821
  {
1258
- id: 'agent-identity.agent-guardrails',
1822
+ id: 'agent-identity.claude-block-injection',
1259
1823
  name: 'Agent-Specific Guardrails',
1260
- description: 'Per-agent security guardrails — injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.',
1824
+ description: 'Per-agent security guardrails — injection blocking for the Claude agent. Customize agent IDs for your deployment. PII is handled by the privacy.* templates.',
1261
1825
  category: 'agent-identity',
1262
- cedarText: OVERWATCH_AGENT_IDENTITY_AGENT_GUARDRAILS_CEDAR,
1826
+ cedarText: OVERWATCH_AGENT_IDENTITY_CLAUDE_BLOCK_INJECTION_CEDAR,
1263
1827
  severity: 'critical',
1264
- tags: ['category:agent-identity', 'scope:per-agent', 'threat:injection', 'threat:pii'],
1828
+ tags: ['category:agent-identity', 'scope:per-agent', 'threat:injection'],
1265
1829
  },
1266
1830
  ];
1267
1831
  // =============================================================================
@@ -1421,16 +1985,46 @@ export const OVERWATCH_TEMPLATES_JSON = `{
1421
1985
  },
1422
1986
  {
1423
1987
  "id": "privacy.defaults",
1424
- "name": "PII Detection",
1425
- "description": "Block credit card numbers, SSNs, passport numbers, IBANs, email/phone/DOB, and IP addresses across actions.",
1988
+ "name": "Structural PII",
1989
+ "description": "Block well-formatted sensitive identifiers SSNs, credit cards, IBANs, API keys — via fast deterministic pattern matching. High precision, low latency, few false positives; use as the always-on baseline.",
1426
1990
  "category": "privacy",
1427
1991
  "file": "defaults/pii.cedar",
1428
1992
  "severity": "critical",
1429
1993
  "tags": [
1430
1994
  "category:privacy",
1431
1995
  "threat:pii",
1996
+ "detection:pattern",
1997
+ "compliance:pci-dss",
1998
+ "compliance:hipaa"
1999
+ ]
2000
+ },
2001
+ {
2002
+ "id": "privacy.pii-model",
2003
+ "name": "Contextual PII",
2004
+ "description": "Block the same sensitive identifiers when the ML model infers them from surrounding context — catches unstructured or novel PII the structural patterns miss. Higher recall; requires the pii_model detector.",
2005
+ "category": "privacy",
2006
+ "file": "defaults/pii_model.cedar",
2007
+ "severity": "critical",
2008
+ "tags": [
2009
+ "category:privacy",
2010
+ "threat:pii",
2011
+ "detection:ml",
2012
+ "compliance:pci-dss",
2013
+ "compliance:hipaa"
2014
+ ]
2015
+ },
2016
+ {
2017
+ "id": "privacy.advanced-pii",
2018
+ "name": "Comprehensive PII",
2019
+ "description": "Block every PII type — structural and contextual, sensitive and situational. Situational entities (names, locations, dates, etc.) are real PII but appear in ordinary text, so this tier flags often; one forbid rule per entity lets you disable the ones you don't need. Opt-in for strict environments.",
2020
+ "category": "privacy",
2021
+ "file": "defaults/pii_advanced.cedar",
2022
+ "severity": "critical",
2023
+ "tags": [
2024
+ "category:privacy",
2025
+ "threat:pii",
2026
+ "detection:pattern",
1432
2027
  "compliance:pci-dss",
1433
- "compliance:gdpr",
1434
2028
  "compliance:hipaa"
1435
2029
  ]
1436
2030
  },
@@ -1496,18 +2090,13 @@ export const OVERWATCH_TEMPLATES_JSON = `{
1496
2090
  ]
1497
2091
  },
1498
2092
  {
1499
- "id": "agent-identity.agent-guardrails",
2093
+ "id": "agent-identity.claude-block-injection",
1500
2094
  "name": "Agent-Specific Guardrails",
1501
- "description": "Per-agent security guardrails — injection blocking for Claude, PII blocking for Cursor. Customize agent IDs for your deployment.",
2095
+ "description": "Per-agent security guardrails — injection blocking for the Claude agent. Customize agent IDs for your deployment. PII is handled by the privacy.* templates.",
1502
2096
  "category": "agent-identity",
1503
2097
  "file": "agent_guardrails.cedar",
1504
2098
  "severity": "critical",
1505
- "tags": [
1506
- "category:agent-identity",
1507
- "scope:per-agent",
1508
- "threat:injection",
1509
- "threat:pii"
1510
- ]
2099
+ "tags": ["category:agent-identity", "scope:per-agent", "threat:injection"]
1511
2100
  }
1512
2101
  ]
1513
2102
  }