Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Containerfile.c10s
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN dnf -y install --allowerasing \
&& dnf clean all

RUN pip3 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 \
Expand All @@ -51,6 +52,13 @@ RUN pip3 install --no-cache-dir \
pytest \
pytest-asyncio

# 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 +56 to +60
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted $MALICIOUS variable 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).

RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \
    if [ -n "$MALICIOUS" ]; then \
      echo "SECURITY ALERT: malicious litellm_init.pth detected:" >&2; \
      echo "$MALICIOUS" >&2; \
      exit 1; \
    fi

Copy link
Copy Markdown
Member Author

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


# Create user
RUN useradd -m -G wheel beeai

Expand Down
8 changes: 8 additions & 0 deletions Containerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted $MALICIOUS variable 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).

RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \
    if [ -n "$MALICIOUS" ]; then \
      echo "SECURITY ALERT: malicious litellm_init.pth detected:" >&2; \
      echo "$MALICIOUS" >&2; \
      exit 1; \
    fi


# Make venv Python the default
ENV PATH=/opt/beeai-venv/bin:$PATH

Expand Down
8 changes: 8 additions & 0 deletions Containerfile.c9s-tests
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted $MALICIOUS variable 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).

RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \
    if [ -n "$MALICIOUS" ]; then \
      echo "SECURITY ALERT: malicious litellm_init.pth detected:" >&2; \
      echo "$MALICIOUS" >&2; \
      exit 1; \
    fi


# Make venv Python the default
ENV PATH=/opt/beeai-venv/bin:$PATH

Expand Down
8 changes: 8 additions & 0 deletions Containerfile.supervisor
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted $MALICIOUS variable 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).

RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \
    if [ -n "$MALICIOUS" ]; then \
      echo "SECURITY ALERT: malicious litellm_init.pth detected:" >&2; \
      echo "$MALICIOUS" >&2; \
      exit 1; \
    fi


# Create user
RUN useradd -m -G wheel beeai

Expand Down
8 changes: 8 additions & 0 deletions Containerfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message when a malicious file is found could be improved for clarity and robustness. The current implementation with an unquoted $MALICIOUS variable 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).

RUN MALICIOUS=$(find /usr /opt -name "litellm_init.pth" 2>/dev/null); \
    if [ -n "$MALICIOUS" ]; then \
      echo "SECURITY ALERT: malicious litellm_init.pth detected:" >&2; \
      echo "$MALICIOUS" >&2; \
      exit 1; \
    fi


WORKDIR /src
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ readme = "README.md"
requires-python = ">=3.13,<3.14"
# we are installing bee 0.1.55 in containers now
dependencies = [
"litellm!=1.82.7,!=1.82.8",
"aiohttp>=3.12.15",
"aiofiles>=24.1.0",
"arize-phoenix-otel>=0.13.0",
Expand Down
Loading