Skip to content

Commit 740f7ea

Browse files
authored
fix: resolve main image scan failures (kagent-dev#1742)
## Summary - fix the image-scan workflow so the `golang-adk-full` job scans the image name and tag that `make build-golang-adk-full` actually publishes - patch the pinned sandbox-runtime install in the app and full Go images to replace the vulnerable locked `lodash-es` version without repinning the whole external runtime - raise the runtime `google-adk` floor to a fixed 1.x release, refresh `python/uv.lock`, and update the ADK Python template pin ## Verification - `make lint` - `uv run pytest packages/kagent-adk/tests/unittests/converters/test_consts_sync.py` --------- Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
1 parent 207737c commit 740f7ea

7 files changed

Lines changed: 82 additions & 47 deletions

File tree

.github/workflows/image-scan.yaml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,25 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
image:
29-
- controller
30-
- ui
31-
- app
32-
- skills-init
33-
- golang-adk
34-
- golang-adk-full
28+
include:
29+
- build_target: controller
30+
image_name: controller
31+
tag_suffix: ""
32+
- build_target: ui
33+
image_name: ui
34+
tag_suffix: ""
35+
- build_target: app
36+
image_name: app
37+
tag_suffix: ""
38+
- build_target: skills-init
39+
image_name: skills-init
40+
tag_suffix: ""
41+
- build_target: golang-adk
42+
image_name: golang-adk
43+
tag_suffix: ""
44+
- build_target: golang-adk-full
45+
image_name: golang-adk
46+
tag_suffix: "-full"
3547
runs-on: ubuntu-latest
3648
services:
3749
registry:
@@ -67,15 +79,12 @@ jobs:
6779
--push
6880
run: |
6981
export VERSION=${{ steps.vars.outputs.version }}
70-
make build-${{ matrix.image }}
82+
make build-${{ matrix.build_target }}
7183
working-directory: ./
72-
- name: Load image versions
73-
id: image-versions
74-
run: make build-img-versions
7584
- name: Image vulnerability scanner
7685
uses: aquasecurity/trivy-action@0.35.0
7786
with:
78-
image-ref: localhost:5001/kagent-dev/kagent/${{ matrix.image }}:${{ steps.vars.outputs.version }}
87+
image-ref: localhost:5001/kagent-dev/kagent/${{ matrix.image_name }}:${{ steps.vars.outputs.version }}${{ matrix.tag_suffix }}
7988
severity: 'CRITICAL,HIGH'
8089
ignore-unfixed: true
8190
exit-code: '1'

go/Dockerfile.full

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ RUN --mount=type=cache,target=/var/cache/apk,rw \
2929
apk add --no-cache \
3030
bash git ca-certificates nodejs npm node-gyp bubblewrap python-${TOOLS_PYTHON_VERSION} libstdc++
3131

32+
# Keep the pinned sandbox-runtime revision, but replace its vulnerable locked lodash-es version.
3233
RUN --mount=type=cache,target=/root/.npm \
3334
mkdir -p /opt && \
3435
cd /opt && \
3536
git clone --depth 1 --revision=ef4afdef4d711ba21a507d7f7369e305f7d3dbfa https://github.com/anthropic-experimental/sandbox-runtime.git && \
3637
cd sandbox-runtime && \
37-
npm install && \
38+
npm install --save-exact lodash-es@4.18.1 @types/lodash-es@4.17.12 && \
3839
npm run build && \
3940
npm prune --omit=dev
4041

go/core/cli/internal/agent/frameworks/adk/python/templates/pyproject.toml.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1"
44
description = "{{.Name}} agent"
55
readme = "README.md"
66
dependencies = [
7-
"google-adk==1.25.1",
7+
"google-adk==1.28.1",
88
]
99

10-
requires-python = ">=3.13"
10+
requires-python = ">=3.13"

python/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ RUN --mount=type=cache,target=/var/cache/apk,rw \
6767
# Install sandbox runtime from a specific commit of the GitHub repo without using global prefix
6868
# This avoids scope-related rename issues in global node_modules
6969
# Using BuildKit cache for npm to speed up rebuilds
70+
# Keep the pinned sandbox-runtime revision, but replace its vulnerable locked lodash-es version.
7071
RUN --mount=type=cache,target=/root/.npm \
7172
mkdir -p /opt && \
72-
cd opt && \
73+
cd /opt && \
7374
git clone --depth 1 --revision=ef4afdef4d711ba21a507d7f7369e305f7d3dbfa https://github.com/anthropic-experimental/sandbox-runtime.git && \
7475
cd sandbox-runtime && \
75-
npm install && \
76+
npm install --save-exact lodash-es@4.18.1 @types/lodash-es@4.17.12 && \
7677
npm run build && \
7778
# CVE-2026-26996: all minimatch instances (3.1.2, 9.0.5) are transitive dev
7879
# deps (eslint, typescript-eslint). Prune dev deps after build to remove them.

python/packages/agentsts-adk/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Framework-specific integration points with agentsts-core"
99
requires-python = ">=3.10"
1010
dependencies = [
1111
"agentsts-core>=0.1.0",
12-
"google-adk>=1.18.0",
12+
"google-adk>=1.28.1,<2",
1313
"google-genai>=1.21.1",
1414
"google-auth>=2.40.2",
1515
"httpx>=0.25.0",

python/packages/kagent-adk/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"protobuf>=6.33.5", # CVE-2026-0994: Denial of Service due to recursion depth bypass
2323
"anthropic[vertex]>=0.49.0",
2424
"fastapi>=0.115.1",
25-
"google-adk>=1.25.0",
25+
"google-adk>=1.28.1,<2",
2626
"google-genai>=1.21.1",
2727
"google-auth>=2.40.2",
2828
"httpx>=0.25.0",

python/uv.lock

Lines changed: 52 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)