Spaces:
Running
Running
| { | |
| "name": "promptgate-rules", | |
| "version": "1.0.0", | |
| "generated_at": "2026-09-19T01:35:54Z", | |
| "source": "app.py (PromptGate Space)", | |
| "license": "apache-2.0", | |
| "engine": "deterministic regex + heuristics (no model weights)", | |
| "regex_flags": [ | |
| "IGNORECASE", | |
| "MULTILINE", | |
| "UNICODE" | |
| ], | |
| "notes": "Every pattern is applied with re.IGNORECASE | re.MULTILINE | re.UNICODE. Scores are prior confidences, not probabilities. See promptgate_rules.py for the reference matcher that consumes this file.", | |
| "thresholds": { | |
| "block": 0.8, | |
| "sanitize": 0.35, | |
| "min_score": 0.3 | |
| }, | |
| "heuristics": { | |
| "entropy_threshold_bits_per_char": 3.6, | |
| "entropy_candidate_pattern": "(?<![A-Za-z0-9+/=_\\-])[A-Za-z0-9+/=_\\-]{24,120}(?![A-Za-z0-9+/=_\\-])", | |
| "entropy_min_length": 24, | |
| "luhn_validation": true, | |
| "luhn_digit_range": [ | |
| 13, | |
| 19 | |
| ], | |
| "base64_candidate_pattern": "(?<![A-Za-z0-9+/=])(?:[A-Za-z0-9+/]{32,}={0,2})(?![A-Za-z0-9+/=])", | |
| "base64_min_length": 32, | |
| "base64_min_entropy": 3.2, | |
| "zero_width_pattern": "[\\u200b\\u200c\\u200d\\u200e\\u200f\\u202a\\u202b\\u202c\\u202d\\u202e\\u2060\\u2061\\u2062\\u2063\\u2064\\u206a-\\u206f\\ufeff\\U000e0000-\\U000e007f]+", | |
| "control_char_pattern": "[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]+", | |
| "rot13_mention_pattern": "\\brot[\\s\\-]?13\\b", | |
| "rot13_decoded_override_pattern": "\\b(?:ignore|disregard|forget)\\b[^\\n]{0,30}\\b(?:instruction|instructions|prompt|rules?)\\b", | |
| "code_fence_pattern": "```", | |
| "phone_min_digits": 9, | |
| "phone_max_digits": 15, | |
| "placeholder_pattern": "EXAMPLE|YOUR[_\\-]?(?:KEY|TOKEN|SECRET|API|PASSWORD)|your[-_]?(?:key|token|secret|api)|xxxx|placeholder|changeme|change_me|<your|dummy|sample[_\\-]?key|redacted", | |
| "hex_hash_pattern": "^(?:[0-9a-f]{32}|[0-9a-f]{40}|[0-9a-f]{56}|[0-9a-f]{64})$", | |
| "version_context_pattern": "(?:version|ver|release|build|rev|v)\\.?\\s*$", | |
| "skip_private_ipv4": true, | |
| "base64_decode_and_rescan": true, | |
| "base64_decoded_attack_score": 0.92, | |
| "invisible_char_base_score": 0.8, | |
| "leet_map": { | |
| "4": "a", | |
| "@": "a", | |
| "3": "e", | |
| "0": "o", | |
| "1": "i", | |
| "!": "i", | |
| "5": "s", | |
| "$": "s", | |
| "7": "t", | |
| "9": "g", | |
| "8": "b" | |
| }, | |
| "leet_token_pattern": "[A-Za-z0-9@!$]{3,}", | |
| "spaced_run_pattern": "(?:[A-Za-z][ \\t._\\-*+]){3,}[A-Za-z]", | |
| "digest_context_pattern": "(?:sha-?(?:1|256|384|512)|md5|fingerprint|checksum|digest|hash|etag|commit|revision)\\s*[:=]?\\s*$", | |
| "normalization_enabled": true, | |
| "normalization_score_factor": 0.95, | |
| "rot13_full_rescan_score": 0.9, | |
| "meta_context_pattern": "\\b(?:write|writing|draft|drafting|compose|create|creating|document|documenting|explain|explaining|describe|describing|discuss|teach|review|proofread|outline)\\b[^.\\n]{0,30}?\\b(?:polic(?:y|ies)|guide|guidelines?|guidance|document(?:ation)?|article|blog|post|training|lesson|course|runbook|playbook|checklist|template|paragraph|essay|report|section|readme|tutorial|slide|handbook)\\b[^.\\n]{0,44}$", | |
| "meta_context_score_factor": 0.3 | |
| }, | |
| "injection": [ | |
| { | |
| "family": "instruction_override", | |
| "score": 0.93, | |
| "pattern": "\\b(?:ignore|disregard|forget|discard|override|bypass|skip)\\b(?:\\s+(?:all|any|every|the|your|my|previous|prior|above|earlier|preceding|foregoing|initial|original|system|last|former)){0,4}\\s+(?:instruction|instructions|prompt|prompts|rule|rules|directive|directives|guideline|guidelines|constraint|constraints|context|messages?|policy|policies)" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.86, | |
| "pattern": "\\b(?:ignore|disregard|forget)\\s+(?:everything|all)\\b[^.\\n]{0,40}?\\b(?:above|before|prior|previously|earlier|told|said|instructed)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.84, | |
| "pattern": "\\bnew\\s+(?:instructions?|rules?|task|directive)s?\\s*[::]" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.62, | |
| "pattern": "\\bfrom\\s+now\\s+on\\b[^.\\n]{0,40}\\byou\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "\\b(?:ignore|disregard|forget|discard|wipe|erase|clear|reset|override|bypass|skip|void|invalidate|supersede|abandon|undo)\\b[^.\\n]{0,40}?\\b(?:instructions?|prompts?|rules?|directives?|guidelines?|guidance|directions?|orders?|polic(?:y|ies)|constraints?|restrictions?|context|system\\s+(?:message|prompt)|training|programming)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "\\b(?:previous|prior|earlier|above|old|system|original|initial)\\s+(?:instructions?|prompts?|rules?|directives?|guidelines?|constraints?|polic(?:y|ies))\\b[^.\\n]{0,28}?\\b(?:no\\s+longer|don't|do\\s+not|does\\s+not|are\\s+not|is\\s+not|invalid|void|cancell?ed|obsolete|expired|inactive|irrelevant)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "\\b(?:prioriti[sz]e|follow|obey|trust|respect)\\b[^.\\n]{0,30}?\\bmy\\b[^.\\n]{0,24}?\\b(?:instructions?|rules?|orders?|directions?)\\b[^.\\n]{0,24}?\\b(?:over|instead\\s+of|rather\\s+than|not)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.84, | |
| "pattern": "\\b(?:as\\s+(?:though|if)|pretend|assume|imagine)\\b[^.\\n]{0,34}?\\b(?:never|no|without)\\b[^.\\n]{0,28}?\\b(?:system\\s+(?:message|prompt|instructions?)|instructions?|guidelines?|rules?)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "(?:指示|命令|ルール|規則|制約|プロンプト|設定|前提)[^。\\n]{0,16}?(?:無視|無効|忘れ|破棄|解除|上書き|リセット|取り消|撤回|不要)" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "(?:システム|上記|前|元|既存)の?(?:指示|命令|ルール|設定|プロンプト)[^。\\n]{0,10}?より[^。\\n]{0,16}?(?:優先|重視)" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.8, | |
| "pattern": "\\b(?:instead\\s+of|rather\\s+than)\\s+(?:following|obeying|doing)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.85, | |
| "pattern": "\\bthis\\s+(?:\\w+\\s+){0,2}(?:overrides?|supersedes?|replaces?|cancels?|voids?)\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|earlier|above|system|your)\\b" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.93, | |
| "pattern": "(?:これまで|今まで|以前|上記|先ほど|前|過去)の?\\s*(?:すべての|全ての|全部の)?\\s*(?:指示|命令|ルール|規則|設定|プロンプト|制約)[^。\\n]{0,12}?(?:無視|忘れ|破棄|取り消|リセット|解除)" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.8, | |
| "pattern": "(?:指示|命令|ルール|制約)を\\s*(?:すべて|全て|全部)?\\s*(?:無視|忘れ)" | |
| }, | |
| { | |
| "family": "instruction_override", | |
| "score": 0.84, | |
| "pattern": "(?:新しい|新たな)\\s*(?:指示|命令|ルール)\\s*[::]" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.86, | |
| "pattern": "^\\s*(?:system|assistant|developer|tool)\\s*[::]" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.84, | |
| "pattern": "\\byou\\s+are\\s+now\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.86, | |
| "pattern": "\\b(?:god|dan|jailbreak|jailbroken|unrestricted|unfiltered|uncensored)\\s+mode\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.8, | |
| "pattern": "\\b(?:enter|enable|activate|switch\\s+to|turn\\s+on|go\\s+into)\\s+(?:\\w+\\s+){0,2}mode\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.84, | |
| "pattern": "\\bact\\s+as\\s+(?:a\\s+|an\\s+|the\\s+)?(?:\\w+\\s+){0,2}(?:system|sysadmin|administrator|admin|developer|unfiltered|unrestricted|uncensored|jailbroken|amoral)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.82, | |
| "pattern": "\\bpretend\\s+(?:to\\s+be|you\\s+are|that\\s+you\\s+are)\\b[^.\\n]{0,40}?\\b(?:AI|A\\.I\\.|assistant|model|chatbot|system|unfiltered|unrestricted|uncensored|jailbroken|no\\s+(?:content\\s+)?(?:policy|rules?|restrictions?|filters?))\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.84, | |
| "pattern": "\\byou\\s+(?:have|are)\\s+no\\s+(?:restrictions?|limits?|rules?|filters?)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.86, | |
| "pattern": "\\bas\\s+(?:an?\\s+)?(?:unfiltered|unrestricted|uncensored|jailbroken|amoral)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.86, | |
| "pattern": "\\b(?:developer|debug|admin|god|dan|maintenance|unrestricted)\\s+mode\\s+(?:is\\s+)?(?:enabled|activated|active|on|turned\\s+on|engaged)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.82, | |
| "pattern": "\\b(?:hypothetically|imagine|suppose|what\\s+if|in\\s+a\\s+world\\s+where|for\\s+a\\s+moment)\\b[^.\\n]{0,50}?\\b(?:no|without|free\\s+of|ignoring)\\s+(?:any\\s+)?(?:guidelines?|rules?|restrictions?|polic(?:y|ies)|limits?|filters?|constraints?)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.72, | |
| "pattern": "\\bas\\s+(?:an?\\s+)?(?:AI\\s+)?without\\s+(?:any\\s+)?(?:restrictions?|filters?|guardrails?)\\b" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.84, | |
| "pattern": "(?:あなたは今|今からあなたは|これからあなたは)" | |
| }, | |
| { | |
| "family": "role_hijack", | |
| "score": 0.84, | |
| "pattern": "(?:開発者モード|制限なしモード|システムとして(?:振る舞|ふるま))" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.9, | |
| "pattern": "\\b(?:show|reveal|print|repeat|output|display|dump|disclose|expose|tell)\\b(?:\\s+me)?\\s+(?:the\\s+|your\\s+|its\\s+)?(?:full\\s+|entire\\s+|exact\\s+|verbatim\\s+|raw\\s+)?(?:system\\s+|initial\\s+|original\\s+|hidden\\s+|secret\\s+)?(?:prompt|instructions?|rules?|guidelines?|configuration|config|directive)s?\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.82, | |
| "pattern": "\\bwhat\\s+(?:were|are|was)\\s+(?:your|the)\\s+(?:initial|original|first|system|exact)\\s+(?:instructions?|prompt|rules?|message)s?\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.86, | |
| "pattern": "\\brepeat\\s+(?:everything|all\\s+the\\s+text|the\\s+text|the\\s+words|what\\s+is)\\s+(?:above|before|preceding|written\\s+above)\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.84, | |
| "pattern": "\\b(?:start|begin)\\s+(?:your\\s+)?(?:reply|response|answer)\\s+with\\b[^.\\n]{0,30}?\\b(?:above|everything|system\\s+(?:prompt|message|instructions?)|your\\s+instructions?)\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.62, | |
| "pattern": "\\bwhat\\s+is\\s+(?:written\\s+)?above\\s+this\\s+(?:line|message|text)\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.85, | |
| "pattern": "\\b(?:show|print|reveal|repeat|output|tell|list|dump|recite|echo|disclose|give|state|share|answer|include|append|copy|paste)\\b[^.\\n]{0,50}?\\b(?:system\\s+(?:prompt|message|instructions?)|context\\s+window|initial\\s+(?:instructions?|prompt|message)|instructions?\\s+you\\s+(?:were\\s+)?(?:given|provided|told|received|have)|what\\s+you\\s+were\\s+told|the\\s+(?:text|words?|sentence|content|message)\\b[^.\\n]{0,24}?\\b(?:above|before|preceding|prior\\s+to))\\b" | |
| }, | |
| { | |
| "family": "prompt_extraction", | |
| "score": 0.88, | |
| "pattern": "(?:システム\\s*プロンプト|システムプロンプト|初期指示|初期プロンプト|システム指示)[^。\\n]{0,16}?(?:教え|見せ|表示|出力|開示|全文|そのまま)" | |
| }, | |
| { | |
| "family": "delimiter_escape", | |
| "score": 0.88, | |
| "pattern": "<\\|(?:im_start|im_end|system|user|assistant|endoftext|eot_id|start_header_id|end_header_id)\\|>" | |
| }, | |
| { | |
| "family": "delimiter_escape", | |
| "score": 0.84, | |
| "pattern": "\\[/?INST\\]|<<\\s*/?SYS\\s*>>|</?s>" | |
| }, | |
| { | |
| "family": "delimiter_escape", | |
| "score": 0.82, | |
| "pattern": "^\\s*#{2,}\\s*(?:system|instruction|human|assistant|user|context)\\b" | |
| }, | |
| { | |
| "family": "delimiter_escape", | |
| "score": 0.62, | |
| "pattern": "^\\s*(?:-{3,}|={3,}|\\*{3,}|_{3,})\\s*$" | |
| }, | |
| { | |
| "family": "delimiter_escape", | |
| "score": 0.84, | |
| "pattern": "^\\s*(?:END|BEGIN)\\s+(?:OF\\s+)?(?:SYSTEM|PROMPT|INSTRUCTIONS?|CONTEXT)(?:\\s+(?:PROMPT|INSTRUCTIONS?|MESSAGE|BLOCK))?\\s*[.:!]?\\s*$" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.9, | |
| "pattern": "!\\[[^\\]\\n]{0,120}\\]\\(\\s*https?://[^)\\s]+\\)" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.86, | |
| "pattern": "\\b(?:send|post|upload|exfiltrate|transmit|forward|leak|report|submit)\\b[^.\\n]{0,40}?\\b(?:to|via|through)\\b[^.\\n]{0,20}?(?:https?://|webhook|endpoint|api\\.[a-z0-9.\\-]+|my\\s+server)" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.78, | |
| "pattern": "https?://[^\\s)\\]\\\"']{0,200}[?&](?:q|d|data|text|payload|prompt|c|msg|body|content|secret|token)=" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.82, | |
| "pattern": "\\b(?:curl|wget|fetch|xhr|http\\s+get)\\b[^\\n]{0,20}https?://" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.88, | |
| "pattern": "\\b(?:fetch|open|visit|download|read|browse|go\\s+to|retrieve)\\b[^\\n]{0,24}https?://[^\\s]{1,200}[^\\n]{0,40}?\\b(?:and\\s+)?(?:follow|obey|execute|apply|comply|do\\s+(?:\\w+\\s+){0,3}(?:what|as))\\b" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.7, | |
| "pattern": "<img\\b[^>]{0,200}\\bsrc\\s*=\\s*[\\\"']?https?://" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.84, | |
| "pattern": "\\b(?:append|add|attach|embed|include|concatenate)\\b[^.\\n]{0,44}?\\b(?:to|in|into|onto)\\b[^.\\n]{0,24}?https?://" | |
| }, | |
| { | |
| "family": "exfiltration", | |
| "score": 0.84, | |
| "pattern": "(?:外部(?:の)?(?:URL|サーバ|サーバー|サイト)|下記URL)[^。\\n]{0,20}?(?:送信|送って|アップロード|投稿)" | |
| } | |
| ], | |
| "secrets": [ | |
| { | |
| "type": "OPENAI_KEY", | |
| "score": 0.96, | |
| "pattern": "\\bsk-(?:proj-|svcacct-|admin-)?[A-Za-z0-9_\\-]{20,}\\b" | |
| }, | |
| { | |
| "type": "ANTHROPIC_KEY", | |
| "score": 0.96, | |
| "pattern": "\\bsk-ant-(?:api|admin)[A-Za-z0-9_\\-]{20,}\\b" | |
| }, | |
| { | |
| "type": "GITHUB_TOKEN", | |
| "score": 0.96, | |
| "pattern": "\\b(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{30,}\\b" | |
| }, | |
| { | |
| "type": "GITHUB_PAT", | |
| "score": 0.96, | |
| "pattern": "\\bgithub_pat_[A-Za-z0-9_]{50,}\\b" | |
| }, | |
| { | |
| "type": "AWS_ACCESS_KEY", | |
| "score": 0.95, | |
| "pattern": "\\b(?:AKIA|ASIA|ABIA|ACCA)[0-9A-Z]{16}\\b" | |
| }, | |
| { | |
| "type": "SLACK_TOKEN", | |
| "score": 0.95, | |
| "pattern": "\\bxox[abprs]-[A-Za-z0-9\\-]{10,}\\b" | |
| }, | |
| { | |
| "type": "SLACK_APP_TOKEN", | |
| "score": 0.95, | |
| "pattern": "\\bxapp-\\d-[A-Za-z0-9\\-]{10,}\\b" | |
| }, | |
| { | |
| "type": "GOOGLE_API_KEY", | |
| "score": 0.94, | |
| "pattern": "\\bAIza[0-9A-Za-z_\\-]{35}\\b" | |
| }, | |
| { | |
| "type": "HF_TOKEN", | |
| "score": 0.94, | |
| "pattern": "\\bhf_[A-Za-z0-9]{30,}\\b" | |
| }, | |
| { | |
| "type": "GITLAB_TOKEN", | |
| "score": 0.92, | |
| "pattern": "\\bglpat-[A-Za-z0-9_\\-]{18,}\\b" | |
| }, | |
| { | |
| "type": "STRIPE_KEY", | |
| "score": 0.95, | |
| "pattern": "\\b(?:sk|rk|pk)_(?:live|test)_[A-Za-z0-9]{16,}\\b" | |
| }, | |
| { | |
| "type": "SENDGRID_KEY", | |
| "score": 0.93, | |
| "pattern": "\\bSG\\.[A-Za-z0-9_\\-]{20,}\\.[A-Za-z0-9_\\-]{20,}\\b" | |
| }, | |
| { | |
| "type": "TWILIO_SID", | |
| "score": 0.9, | |
| "pattern": "\\bAC[0-9a-fA-F]{32}\\b" | |
| }, | |
| { | |
| "type": "DIGITALOCEAN_TOKEN", | |
| "score": 0.92, | |
| "pattern": "\\bdop_v1_[A-Za-z0-9]{32,}\\b" | |
| }, | |
| { | |
| "type": "NPM_TOKEN", | |
| "score": 0.9, | |
| "pattern": "\\bnpm_[A-Za-z0-9]{30,}\\b" | |
| }, | |
| { | |
| "type": "PRIVATE_KEY_BLOCK", | |
| "score": 0.98, | |
| "pattern": "-----BEGIN\\s+(?:RSA\\s+|EC\\s+|DSA\\s+|OPENSSH\\s+|PGP\\s+)?PRIVATE\\s+KEY[^\\n]*-----" | |
| }, | |
| { | |
| "type": "JWT", | |
| "score": 0.88, | |
| "pattern": "\\beyJ[A-Za-z0-9_\\-]{8,}\\.[A-Za-z0-9_\\-]{8,}\\.[A-Za-z0-9_\\-]{8,}\\b" | |
| }, | |
| { | |
| "type": "BEARER_TOKEN", | |
| "score": 0.72, | |
| "pattern": "\\b(?:Bearer|Authorization\\s*[:=])\\s+[A-Za-z0-9_\\-\\.=]{20,}" | |
| }, | |
| { | |
| "type": "CREDENTIAL_PAIR", | |
| "score": 0.75, | |
| "pattern": "\\b(?:basic\\s+auth(?:entication)?|credentials?|login|log\\s?in|user(?:name)?|account)\\b[^.\\n]{0,24}?\\b[A-Za-z0-9._\\-]{3,32}:[^\\s:@/\\\"']{6,40}(?![\\w.])" | |
| }, | |
| { | |
| "type": "CONNECTION_STRING", | |
| "score": 0.86, | |
| "pattern": "\\b(?:postgres|postgresql|mysql|mongodb(?:\\+srv)?|redis|amqp)://[^\\s:@/]{1,64}:[^\\s@/]{1,64}@[^\\s/]{3,}" | |
| }, | |
| { | |
| "type": "GENERIC_ASSIGNED_SECRET", | |
| "score": 0.7, | |
| "pattern": "\\b(?:api[_\\-]?key|apikey|secret[_\\-]?key|access[_\\-]?token|auth[_\\-]?token|password|passwd|pwd|client[_\\-]?secret)\\b\\s*[:=]\\s*[\\\"']?[A-Za-z0-9_\\-\\.\\/+]{12,}[\\\"']?" | |
| } | |
| ], | |
| "pii": { | |
| "EMAIL": { | |
| "pattern": "(?<![A-Za-z0-9._%+\\-])[A-Za-z0-9._%+\\-]{1,64}@[A-Za-z0-9\\-]{1,63}(?:\\.[A-Za-z0-9\\-]{1,63})*\\.[A-Za-z]{2,24}\\b", | |
| "confidence": 0.95 | |
| }, | |
| "PHONE": { | |
| "pattern": "(?<![\\w+])\\+?\\d(?:[\\d\\-.()\\u3000 ]{6,18})\\d(?![\\w])", | |
| "confidence": 0.88, | |
| "post_filter": "9-15 digits, requires separator/+/10-11 digits" | |
| }, | |
| "CREDIT_CARD": { | |
| "pattern": "(?<![\\d\\w])(?:\\d[ \\-]?){12,18}\\d(?![\\d\\w])", | |
| "confidence": 0.96, | |
| "post_filter": "Luhn checksum, 13-19 digits" | |
| }, | |
| "IP_ADDRESS": { | |
| "pattern": "(?<![\\w.])(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?![\\w.])", | |
| "confidence": 0.72, | |
| "pattern_v6": "(?<![\\w:])(?:[A-Fa-f0-9]{1,4}:){3,7}[A-Fa-f0-9]{1,4}(?![\\w:])", | |
| "confidence_v6": 0.55 | |
| }, | |
| "DATE_OF_BIRTH": { | |
| "pattern": "(?:date\\s+of\\s+birth|d\\.?o\\.?b\\.?|birth\\s*date|birth\\s*day|生年月日|誕生日)\\s*[::=]?\\s*[^\\n]{0,28}", | |
| "confidence": 0.85, | |
| "pattern_bare_date": "(?<![\\d])(?:19[0-9]{2}|20[0-2][0-9])[-/.年]\\s?(?:0?[1-9]|1[0-2])[-/.月]\\s?(?:0?[1-9]|[12][0-9]|3[01])日?(?![\\d])", | |
| "confidence_bare_date": 0.5 | |
| }, | |
| "POSTAL_CODE": { | |
| "pattern": "(?:〒\\s*)?(?<![\\d\\-])\\d{3}-\\d{4}(?![\\d\\-])", | |
| "confidence": 0.58, | |
| "pattern_with_context": "(?:zip(?:\\s*code)?|postal\\s*code|post\\s*code|郵便番号)\\D{0,12}\\d{5}(?:-\\d{4})?", | |
| "confidence_with_context": 0.78 | |
| } | |
| }, | |
| "priority": { | |
| "pii": { | |
| "CREDIT_CARD": 100, | |
| "EMAIL": 90, | |
| "PHONE": 70, | |
| "DATE_OF_BIRTH": 60, | |
| "POSTAL_CODE": 50, | |
| "IP_ADDRESS": 40 | |
| }, | |
| "secrets": { | |
| "OPENAI_KEY": 100, | |
| "ANTHROPIC_KEY": 100, | |
| "GITHUB_TOKEN": 100, | |
| "GITHUB_PAT": 100, | |
| "AWS_ACCESS_KEY": 100, | |
| "SLACK_TOKEN": 100, | |
| "SLACK_APP_TOKEN": 100, | |
| "GOOGLE_API_KEY": 100, | |
| "HF_TOKEN": 100, | |
| "GITLAB_TOKEN": 100, | |
| "STRIPE_KEY": 100, | |
| "SENDGRID_KEY": 100, | |
| "TWILIO_SID": 100, | |
| "DIGITALOCEAN_TOKEN": 100, | |
| "NPM_TOKEN": 100, | |
| "PRIVATE_KEY_BLOCK": 100, | |
| "JWT": 100, | |
| "BEARER_TOKEN": 60, | |
| "CREDENTIAL_PAIR": 100, | |
| "CONNECTION_STRING": 100, | |
| "GENERIC_ASSIGNED_SECRET": 50, | |
| "HIGH_ENTROPY_STRING": 10 | |
| } | |
| }, | |
| "counts": { | |
| "injection_patterns": 48, | |
| "secret_patterns": 21, | |
| "pii_detectors": 6 | |
| } | |
| } | |