docs: add Docker Image Security Guide (cosign verification & deployment best practices)#25439
Conversation
…loyment best practices - New doc page covering all signed image variants, verification commands, CI/CD enforcement (K8s Sigstore Policy Controller, GCP Binary Authorization, AWS/EKS, GitHub Actions), digest pinning, and safe upgrade patterns - Added to sidebar under Setup & Deployment - Cross-linked from the existing deploy.md cosign section Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| | Image | Description | | ||
| |---|---| | ||
| | `ghcr.io/berriai/litellm` | Core proxy | | ||
| | `ghcr.io/berriai/litellm-database` | Proxy with Postgres dependencies | |
There was a problem hiding this comment.
please mark litellm-database as a deprecated image
| | `ghcr.io/berriai/litellm` | Core proxy | | ||
| | `ghcr.io/berriai/litellm-database` | Proxy with Postgres dependencies | | ||
| | `ghcr.io/berriai/litellm-non_root` | Non-root variant | | ||
| | `ghcr.io/berriai/litellm-spend_logs` | Spend-logs sidecar | |
There was a problem hiding this comment.
please remove references to litellm-spend_logs @cursoragent
Greptile SummaryThis PR adds a new
Confidence Score: 4/5Safe to merge after adding the missing cosign install step to the GitHub Actions example. One P1 finding: the GitHub Actions snippet is missing sigstore/cosign-installer, so copy-pasting it will break real pipelines. All other findings are P2 or informational. docs/my-website/docs/proxy/docker_image_security.md — GitHub Actions gate section (lines 136-143)
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/proxy/docker_image_security.md | New security guide for Docker image verification; public key matches cosign.pub in repo; GitHub Actions example is missing the required cosign-installer step, which will cause runtime failure on standard runners. |
| docs/my-website/docs/proxy/deploy.md | Adds a cross-link from the existing cosign section to the new Docker Image Security Guide; change is accurate and non-breaking. |
| docs/my-website/sidebars.js | Adds proxy/docker_image_security to the sidebar immediately after proxy/deploy; placement is correct and consistent with existing ordering. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Pull LiteLLM image from GHCR] --> B{Verify with cosign}
B -->|Pinned commit hash| C[cosign verify --key raw.githubusercontent...commit.../cosign.pub image:tag]
B -->|Release tag| D[cosign verify --key raw.githubusercontent...tag.../cosign.pub image:tag]
C --> E{Verification passes?}
D --> E
E -->|Yes| F[Deploy to environment]
E -->|No| G[Reject / fail pipeline]
F --> H{Enforcement layer}
H --> I[Kubernetes: Sigstore Policy Controller]
H --> J[GCP: Binary Authorization]
H --> K[AWS EKS: OPA/Gatekeeper]
H --> L[GitHub Actions: cosign verify gate]
Reviews (1): Last reviewed commit: "docs: add Docker Image Security Guide fo..." | Re-trigger Greptile
|
|
||
| ```yaml | ||
| - name: Verify LiteLLM image signature | ||
| run: | | ||
| cosign verify \ | ||
| --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \ | ||
| ghcr.io/berriai/litellm-database:${{ env.LITELLM_VERSION }} | ||
| ``` |
There was a problem hiding this comment.
Missing
cosign install step in GitHub Actions example
GitHub-hosted runners do not ship with cosign. The snippet will fail with command not found on any standard runner. A sigstore/cosign-installer step must precede the verify call.
| ```yaml | |
| - name: Verify LiteLLM image signature | |
| run: | | |
| cosign verify \ | |
| --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \ | |
| ghcr.io/berriai/litellm-database:${{ env.LITELLM_VERSION }} | |
| ``` | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@v3 | |
| - name: Verify LiteLLM image signature | |
| run: | | |
| cosign verify \ | |
| --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \ | |
| ghcr.io/berriai/litellm-database:${{ env.LITELLM_VERSION }} |
| Get the digest after pulling: | ||
|
|
||
| ```bash | ||
| docker inspect --format='{{index .RepoDigests 0}}' \ | ||
| ghcr.io/berriai/litellm-database:v1.83.0-stable | ||
| ``` |
There was a problem hiding this comment.
docker inspect requires a locally pulled image
docker inspect only reads metadata of images already present on disk. If the image hasn't been pulled, this command silently returns nothing or errors out. A note (or a docker pull before the inspect) would prevent confusion.
| Get the digest after pulling: | |
| ```bash | |
| docker inspect --format='{{index .RepoDigests 0}}' \ | |
| ghcr.io/berriai/litellm-database:v1.83.0-stable | |
| ``` | |
| Get the digest after pulling the image: | |
| ```bash | |
| docker pull ghcr.io/berriai/litellm-database:v1.83.0-stable | |
| docker inspect --format='{{index .RepoDigests 0}}' \ | |
| ghcr.io/berriai/litellm-database:v1.83.0-stable |
…loyment best practices (#25439) - New doc page covering all signed image variants, verification commands, CI/CD enforcement (K8s Sigstore Policy Controller, GCP Binary Authorization, AWS/EKS, GitHub Actions), digest pinning, and safe upgrade patterns - Added to sidebar under Setup & Deployment - Cross-linked from the existing deploy.md cosign section Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
Relevant issues
Addresses community request for a dedicated security guide covering cosign image verification across all Docker image variants, CI/CD enforcement, and deployment best practices.
Pre-Submission checklist
tests/test_litellm/directory — N/A (docs-only change, no code)make test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewType
📖 Documentation
Changes
Adds a new Docker Image Security Guide (
docs/proxy/docker_image_security.md) covering:litellm,litellm-database,litellm-non_root,litellm-spend_logs) with a note on enterprise imagescosign verifycommands with examples for each image variant, using both pinned commit hash and release tag methodsClusterImagePolicyYAML)Also:
deploy.mdto the new guideThe Docusaurus build passes successfully with no new broken links.
Slack Thread