-
Notifications
You must be signed in to change notification settings - Fork 24
Mitigate litellm supply chain compromise (1.82.7, 1.82.8) #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ RUN dnf -y install --allowerasing \ | |
| RUN python3.11 -m venv --system-site-packages /opt/beeai-venv \ | ||
| && /opt/beeai-venv/bin/pip install --upgrade pip \ | ||
| && /opt/beeai-venv/bin/pip install --no-cache-dir \ | ||
| "litellm!=1.82.7,!=1.82.8" \ | ||
| beeai-framework[vertexai,mcp,duckduckgo]==0.1.55 \ | ||
| google-cloud-aiplatform \ | ||
| openinference-instrumentation-beeai \ | ||
|
|
@@ -52,6 +53,13 @@ RUN python3.11 -m venv --system-site-packages /opt/beeai-venv \ | |
| specfile \ | ||
| koji | ||
|
|
||
| # Verify no malicious litellm_init.pth was introduced by compromised litellm packages (e.g. 1.82.7, 1.82.8) | ||
| RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \ | ||
| if [ -n "$MALICIOUS" ]; then \ | ||
| echo "SECURITY ALERT: malicious litellm_init.pth detected: $MALICIOUS"; \ | ||
| exit 1; \ | ||
| fi | ||
|
Comment on lines
+57
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted |
||
|
|
||
| # Make venv Python the default | ||
| ENV PATH=/opt/beeai-venv/bin:$PATH | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ RUN dnf -y install --allowerasing \ | |
| RUN python3.11 -m venv --system-site-packages /opt/beeai-venv \ | ||
| && /opt/beeai-venv/bin/pip install --upgrade pip \ | ||
| && /opt/beeai-venv/bin/pip install --no-cache-dir \ | ||
| "litellm!=1.82.7,!=1.82.8" \ | ||
| beeai-framework[vertexai,mcp,duckduckgo]==0.1.55 \ | ||
| openinference-instrumentation-beeai \ | ||
| arize-phoenix-otel \ | ||
|
|
@@ -37,6 +38,13 @@ RUN python3.11 -m venv --system-site-packages /opt/beeai-venv \ | |
| GitPython \ | ||
| tomli-w | ||
|
|
||
| # Verify no malicious litellm_init.pth was introduced by compromised litellm packages (e.g. 1.82.7, 1.82.8) | ||
| RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \ | ||
| if [ -n "$MALICIOUS" ]; then \ | ||
| echo "SECURITY ALERT: malicious litellm_init.pth detected: $MALICIOUS"; \ | ||
| exit 1; \ | ||
| fi | ||
|
Comment on lines
+42
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted |
||
|
|
||
| # Make venv Python the default | ||
| ENV PATH=/opt/beeai-venv/bin:$PATH | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ RUN dnf -y install --allowerasing \ | |
| gcc-c++ \ | ||
| python3-devel \ | ||
| && pip3 install -v --no-cache-dir \ | ||
| "litellm!=1.82.7,!=1.82.8" \ | ||
| beeai-framework[vertexai,mcp,duckduckgo]==0.1.55 \ | ||
| google-cloud-aiplatform \ | ||
| openinference-instrumentation-beeai \ | ||
|
|
@@ -35,6 +36,13 @@ RUN dnf -y install --allowerasing \ | |
| && dnf -y remove gcc gcc-c++ python3-devel \ | ||
| && dnf clean all | ||
|
|
||
| # Verify no malicious litellm_init.pth was introduced by compromised litellm packages (e.g. 1.82.7, 1.82.8) | ||
| RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \ | ||
| if [ -n "$MALICIOUS" ]; then \ | ||
| echo "SECURITY ALERT: malicious litellm_init.pth detected: $MALICIOUS"; \ | ||
| exit 1; \ | ||
| fi | ||
|
Comment on lines
+40
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted |
||
|
|
||
| # Create user | ||
| RUN useradd -m -G wheel beeai | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,15 @@ ENV PYTHONPATH=/src:$PYTHONPATH | |
|
|
||
| # Install BeeAI Framework and FastMCP | ||
| RUN pip3 install --no-cache-dir \ | ||
| "litellm!=1.82.7,!=1.82.8" \ | ||
| beeai-framework[vertexai,mcp,duckduckgo]==0.1.55 \ | ||
| fastmcp redis backoff | ||
|
|
||
| # Verify no malicious litellm_init.pth was introduced by compromised litellm packages (e.g. 1.82.7, 1.82.8) | ||
| RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \ | ||
| if [ -n "$MALICIOUS" ]; then \ | ||
| echo "SECURITY ALERT: malicious litellm_init.pth detected: $MALICIOUS"; \ | ||
| exit 1; \ | ||
| fi | ||
|
Comment on lines
+38
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted |
||
|
|
||
| WORKDIR /src | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted
$MALICIOUSvariable can lead to garbled output if multiple files are found or if filenames contain spaces. It is also a good practice to redirect error messages to stderr (>&2).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Gemini but you are just picking nits here, I'm not applying that to all occurences, sorry