AI Secrets & Credentials in AI Context
Detects secrets and credentials surfaced in AI/LLM context: private-key headers (RSA / EC / OpenSSH / generic) and connection-string passwords (password= / pwd=) pasted into prompts, chat exports, or AI-generated output. Reuses the intent of built-in credential SITs, re-scoped to the AI surface.
- Type
- regex
- Engine
- universal
- Confidence
- medium
- Confidence justification
- Medium and precision-oriented (library target >=0.92). Private-key headers are highly specific; connection-string passwords are broader, so placeholder exclusions and AI-context corroboration remove the named FP traps (placeholder keys, hashes, GUIDs, sample configs).
- Detection quality
- Verified
- Jurisdictions
- global
- Regulations
- OWASP LLM Top 10 2025, NIST AI RMF GenAI Profile
- Frameworks
- ISO 27001
- Data categories
- emerging, security
- Risk rating
- 7
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Unsupported
Pattern
-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----
Corroborative evidence keywords
private key, password, credential, secret, connection string, [object Object], artificial intelligence, [object Object], large language model, Copilot, chatbot, assistant, agent, prompt, system prompt, tool call, completion, model
Proximity: 300 characters
Should match
-----BEGIN RSA PRIVATE KEY-----— Low-tier probe - secret structure without AI contextIn the Copilot prompt: password=Sup3rSecretPwd99; connect now— Medium-tier probe - credential structure on an AI surfaceCopilot chat export: production connection string password=ProdSecret77;— High-tier probe - AI surface plus live production configuration context
Should not match
Please reset your password by clicking the link.— No password=<value> assignment present. Documentation placeholders (your-password-here, PLACEHOLDER, xxxxxxxx) are excluded by the Guard_secrets_exclude_placeholder TextMatchFilter in Purview, not by the regex.The pwd field on the login form must be at least eight characters.— Prose reference to a password field with no pwd=<value> assignmentPEM documentation shows -----BEGIN PRIVATE KEY-----— Secret syntax outside AI context — discovery only, must not enforceTemplate example for Copilot: production connection string password=your-password-here— Placeholder template with otherwise high-tier contextPublic documentation: set an environment variable before starting the application.— Deployment prose without a secret value
Known false positives
- Documentation, tutorials, and sample configuration files that contain placeholder secrets (your-password-here, PLACEHOLDER, xxxxxxxx) or connection-string templates. Mitigation: The Guard_secrets_exclude_placeholder TextMatchFilter excludes known placeholder tokens; require AI-context corroboration to raise confidence above the regex-only tier.
- Connection-string password assignments using non-secret values such as short test passwords or environment-variable references (password=$DB_PASS). Mitigation: Enforce the >=6-character value floor in the regex and corroborate with AI-context markers; treat environment-variable references as lower risk.