Packages / AI And ML Service Credentials

AI And ML Service Credentials

Keys, tokens, and connection secrets for model providers, AI platforms, and machine-learning services.

Patterns
20
As primary component
14

Patterns in this package

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.

Azure Bot Framework Secret Key

Detects Azure Bot Framework secret key patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.

Azure Bot Service App Secret

Detects Azure Bot Service application secret patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.

Azure Cognitive Search API Key

Detects Azure Cognitive Search (AI Search) API key patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.

Azure Cognitive Service Key

Detects Azure Cognitive Services subscription key patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.

Azure Machine Learning Web Service API Key

Detects Azure Machine Learning web service API key patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.

AI Coding Agent Credential Store (Claude Code, Codex CLI)

Detects the OAuth token stores that AI coding agents keep on a developer's machine: Claude Code's .credentials.json (a claudeAiOauth object holding accessToken and refreshToken) and the OpenAI Codex CLI's auth.json (a tokens object holding id_token, access_token and refresh_token beside an OPENAI_API_KEY key). These files are plaintext, and the tokens in them act as the signed-in user: they spend the account's subscription and reach whatever the agent is connected to. Infostealers and npm supply-chain worms in 2026 collected both files. The pattern detects the file content, not a path, so it also fires when the JSON is pasted into a ticket, chat or repository.

Anthropic API Key

Detects Anthropic (Claude) API keys. Standard keys use the sk-ant-api03- prefix followed by a long base64url body ending in AA; admin keys use sk-ant-admin01-. A leaked key grants billed access to the Anthropic API and any connected data.

AWS Bedrock API Key

Detects Amazon Bedrock API keys, which start with the case-sensitive prefix ABSK followed by 100 to 260 Base64/URL-safe characters. Leaked Bedrock bearer tokens allow unauthorized model invocation and billed inference against enabled foundation models in the target AWS account.

Cohere API Key

Detects Cohere API keys. Cohere issues an opaque 40-character alphanumeric token with no distinctive vendor prefix, so this pattern requires an adjacent Cohere label (cohere / CO_API_KEY / COHERE_API_KEY) to structurally qualify a match.

Groq API Key

Detects Groq (GroqCloud) API keys, which use a distinctive gsk_ prefix followed by a long alphanumeric body. A leaked key grants unauthorized, billed access to Groq's hosted inference API and any prompts or data routed through it.

Hugging Face Access Token

Detects Hugging Face user access tokens (hf_ prefix), used to authenticate to the Hugging Face Hub API. A leaked token grants access to private models, datasets and Spaces, and can incur inference billing.

LangSmith API Key

Detects LangSmith API keys (personal access tokens and service keys), which use a distinctive lsv2_pt_ or lsv2_sk_ prefix followed by a hyphenated hex body. A leaked key grants unauthorized access to LangSmith trace data -- which can include full LLM prompts and completions -- and billed access to the LangSmith/LangChain platform.

MCP Server Configuration with Embedded Secret

Detects Model Context Protocol (MCP) server configuration files that hold a secret in plain text: an API key, token or password in a server's env block, or a bearer token or API key in its headers. These files (claude_desktop_config.json, .mcp.json, ~/.claude.json, .cursor/mcp.json, .vscode/mcp.json and similar) tell an AI client which tool servers to start and how to authenticate to them, are often committed or shared, and were collected by infostealers and npm supply-chain worms in 2026. A config that references a variable (${VAR}, ${env:NAME}, ${input:id}) or carries no secret does not match. This pattern finds stored secrets; ai-mcp-connector-risk covers over-broad scope wording.

Openai Key

Detects Openai Key patterns.

OpenRouter API Key

Detects OpenRouter API keys, which start with sk-or-v1- followed by 64 lowercase hexadecimal characters. OpenRouter is a gateway to many model providers behind one key, so a leaked key lets someone else run billed inference against every model the account can reach. OpenRouter's management keys use the same format and are matched too.

Perplexity API Key

Detects Perplexity API keys, which use a distinctive pplx- prefix followed by a 48-character alphanumeric body. A leaked key grants unauthorized, billed access to Perplexity's search and chat completion API and any prompts or data routed through it.

Pinecone API Key

Detects Pinecone API keys in both current live formats: pcsk_ (the dominant format issued by the Pinecone console, CLI, and SDK key-creation flows) and pckey_ (the Enterprise-plan Admin API variant, format pckey_<public-label>_<unique-key>). A leaked key grants unauthorized access to a Pinecone vector database, including any embeddings or vectorised source data it stores.

Replicate API Key

Detects Replicate API tokens, which use a distinctive r8_ prefix followed by a fixed-length body of alphanumerics, underscores, and hyphens. A leaked token grants unauthorized, billed access to Replicate's hosted model inference API and any prompts, images, or data routed through it.

xAI API Key

Detects xAI (Grok) API keys, which use a distinctive xai- prefix followed by a long alphanumeric body. A leaked key grants unauthorized, billed access to xAI's Grok models and any prompts or data routed through the API.