Repository navigation
docs: replace the example master key sk-1234 with placeholders - #1431
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fe50a61. Configure here.
This was referenced Sep 21, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
sk-1234and its weak variants (sk-12345,sk-1234567890,sk-1234ewknldferwedojwojw) from every example in the docs, blog, release notes,static/anddocker-compose.yml. Wiz found about 1 in 10 exposed LiteLLM gateways acceptingsk-1234, and the docs are where people (and their coding agents) copy it from. Runtime enforcement is handled separately in BerriAI/litellm#40758; this PR only changes what readers copyReplacement rules, applied by context:
$LITELLM_API_KEYis used only inside shell fences; Python and JavaScript blocks get the literal placeholder since a shell variable would not expand there. Angle-bracket placeholders inside MDX prose are wrapped in backticks so Docusaurus does not parse them as JSXLeft as is on purpose: the
Password: sk-1234lines in release notes andstatic/llms-full.txt, which are the login for the public demo at demo.litellm.ai rather than a setup example, and the guardrail demo payloads indocs/proxy/guardrails/secret_detection.mdandprompt_security.md, where the fake key is the thing the detector is supposed to catchValidation:
rg -n 'sk-1234'on the branch returns only the exceptions above;npm run buildsucceeds with only the pre-existing HTML minifier warningsLink to Devin session: https://app.devin.ai/sessions/48aefd15550e4376b26ee8d0550320ad
Open in Devin Desktop: https://app.devin.ai/desktop/session/48aefd15550e4376b26ee8d0550320ad?variant=devin
Requested by: @mateo-berri
Note
Low Risk
Documentation and example-only changes with no production code or authentication logic modified.
Overview
Replaces the default example LiteLLM proxy key
sk-1234(and similar weak variants) across blog posts, docs, and benchmark scripts so copy-paste examples do not reinforce a credential Wiz commonly sees in the wild.cURL/shell examples now use
Authorization: Bearer $LITELLM_API_KEY(orx-api-key: $LITELLM_API_KEY). YAMLgeneral_settingsusesmaster_key: os.environ/LITELLM_MASTER_KEYinstead of inline keys. Python/TypeScript/OpenAI SDK snippets use literals likesk-<your-litellm-api-key>; env/compose examples usesk-<paste-a-long-random-key>for master keys. A few MCP Cursor JSON blocks switch from$LITELLM_API_KEYto the literal placeholder where env vars do not apply.Intentionally unchanged: demo login
Password: sk-1234in release notes and guardrail docs where fake keys are the detection target.Reviewed by Cursor Bugbot for commit fe50a61. Bugbot is set up for automated code reviews on this repo. Configure here.