nebari-dev / nebari-dev/llm-serving-pack

Pin model-downloader init container to an immutable digest

Open
#135 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: medium ⚡ security type: enhancement 💅🏼
Dominant language
Go
Stars
3
Forks
3
Avg merge
16h 31m
Merged PRs (30d)
11

Description

Reported as H-05 in the PR #117 security assessment.

What

The model-downloader init container is pinned to a mutable tag:

// operator/internal/controller/reconcilers/storage.go:16
hfInitContainerImage = "ghcr.io/nebari-dev/nebari-llm-serving-pack/model-downloader:latest"

This init container runs in the serving pod with access to the model storage volume and the credentials used to fetch the model (for example the HuggingFace token). With :latest, the image that actually runs is whatever the registry serves at pull time, so any push to that tag runs with those credentials on every model start, with nothing pinned to detect or prevent it.

Why it matters

A mutable tag gives no supply-chain guarantee, and this image has credential access. Digest pinning is the standard mitigation.

Fix

  • Pin to an immutable digest (...@sha256:...), ideally surfaced as a chart value so it is upgraded deliberately.
  • Consider scoping the credentials the init container receives to only what the download needs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in operator/internal/controller/reconcilers/storage.go at the hfInitContainerImage definition, then inspect the chart configuration to determine whether the image can be surfaced as a value. Confirm the selected image reference is immutable and that the rendered serving pod uses it; done means the init container no longer uses :latest and any credential scope changes are deliberate.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, kubernetes
Domain
devops, infrastructure, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.