llm-provider-key-literal-v1
17 rules · Keryn Software Licence · rules 0.8.0 · all packs
How to read a rule
- Severity
- How bad the finding is if it is real:
errorfails a default gate,warningandinfodo not. - Confidence
- P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
- False-positive risk
- low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
- Edge
- The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
- Taxonomy chips
- References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.
keryn.keyliteral.openai
Section titled “keryn.keyliteral.openai”error generic openai
A OpenAI API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://developers.openai.com/api/reference/overview#authentication
keryn.keyliteral.anthropic
Section titled “keryn.keyliteral.anthropic”error generic anthropic
A Anthropic API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://platform.claude.com/docs/en/api/overview
keryn.keyliteral.google-ai-studio
Section titled “keryn.keyliteral.google-ai-studio”error generic gemini
A Google AI Studio (Gemini API) API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://ai.google.dev/gemini-api/docs/api-key
keryn.keyliteral.huggingface
Section titled “keryn.keyliteral.huggingface”error generic huggingface
A Hugging Face API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://huggingface.co/docs/hub/security-tokens
keryn.keyliteral.groq
Section titled “keryn.keyliteral.groq”warning generic groq
A Groq API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://console.groq.com/docs/quickstart
keryn.keyliteral.xai
Section titled “keryn.keyliteral.xai”error generic xai
A xAI API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.x.ai/developers/quickstart
keryn.keyliteral.replicate
Section titled “keryn.keyliteral.replicate”error generic replicate
A Replicate API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://replicate.com/docs/reference/http#authentication
keryn.keyliteral.perplexity
Section titled “keryn.keyliteral.perplexity”error generic perplexity
A Perplexity API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.perplexity.ai/docs/getting-started/overview
keryn.keyliteral.openrouter
Section titled “keryn.keyliteral.openrouter”error generic openrouter
A OpenRouter API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://openrouter.ai/docs/api_reference/authentication
keryn.keyliteral.fireworks
Section titled “keryn.keyliteral.fireworks”error generic fireworks
A Fireworks AI API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.fireworks.ai/api-reference/introduction
keryn.keyliteral.voyage
Section titled “keryn.keyliteral.voyage”error generic voyageai
A Voyage AI API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.voyageai.com/docs/api-key-and-installation
keryn.keyliteral.langsmith
Section titled “keryn.keyliteral.langsmith”error generic langsmith
A LangSmith API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.langchain.com/langsmith/create-account-api-key
keryn.keyliteral.langfuse
Section titled “keryn.keyliteral.langfuse”error generic langfuse
A Langfuse API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://langfuse.com/faq/all/where-are-langfuse-api-keys
keryn.keyliteral.pinecone
Section titled “keryn.keyliteral.pinecone”warning generic pinecone
A Pinecone API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.pinecone.io/admin/projects/manage-api-keys
keryn.keyliteral.tavily
Section titled “keryn.keyliteral.tavily”warning generic tavily
A Tavily API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://docs.tavily.com/documentation/api-credits
keryn.keyliteral.elevenlabs
Section titled “keryn.keyliteral.elevenlabs”error generic elevenlabs
A ElevenLabs API key is written into source or configuration as a literal. Anyone who can read the repository, a build log or a shipped bundle can spend your quota and read what the key can reach; git history keeps it after deletion. Revoke this key, then load its replacement from a secret store or environment variable.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the key now, remove it from history, and read the replacement at runtime from an environment variable or secret manager. Add a secret-scanning pre-commit hook or CI step so a new literal is caught before merge.
References: https://elevenlabs.io/docs/api-reference/authentication
keryn.keyliteral.assigned-literal-provider-key
Section titled “keryn.keyliteral.assigned-literal-provider-key”warning generic openai, anthropic, gemini, cohere, mistral, together, deepseek
A literal of 24 or more characters is assigned to a name that identifies an LLM provider credential (openai, anthropic, gemini, cohere, mistral, groq, together, deepseek, fireworks, Hugging Face … key/token/secret). That is almost certainly a real secret committed to the repository. Revoke it and load the replacement from the environment or a secret store.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Revoke and rotate the credential, purge it from history, and read it at runtime (os.environ, process.env, a secrets manager). Placeholders such as <your-key>, xxxx or ${VAR} are fine.
References: https://developers.openai.com/api/reference/overview#authentication · https://docs.cohere.com/reference/about · https://docs.mistral.ai/