feat: add the Collector builder sandbox profile - #184
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
| cloudpickle==3.1.2 \ | ||
| mcp-atlassian==0.21.1 \ | ||
| && uv cache clean | ||
|
|
There was a problem hiding this comment.
The go install command populates a build cache (typically in /root/.cache/go-build when run as root). This cache is not being cleaned in this step. Consider adding go clean -cache -modcache after installing gopls to reduce the final image size.
There was a problem hiding this comment.
Resolved in the current head: the gopls install now removes /root/go and /root/.cache/go-build in the same layer.
| # tar is a Node library dependency; npm leaves the system GNU tar in /usr/bin | ||
| # unchanged. | ||
| ARG NPM_TAR_VERSION=7.5.11 | ||
| ARG NPM_HONO_VERSION=1.19.11 |
There was a problem hiding this comment.
Python version 3.14.3 does not appear to be a valid or available Python version. This will cause the uv python install command to fail. Please correct this to a valid Python version, for example a recent 3.12.x release.
There was a problem hiding this comment.
Skipped: this finding is incorrect. uv python install 3.14.3 completed successfully in the StackRox image build; the version is available from uv and is intentional for the MCP runtime.
| ARG GOPLS_VERSION=0.20.0 | ||
| RUN GOBIN=/usr/local/bin /usr/local/go/bin/go install "golang.org/x/tools/gopls@v${GOPLS_VERSION}" \ | ||
| && rm -rf /root/go /root/.cache/go-build | ||
|
|
There was a problem hiding this comment.
The base collector-builder image and surrounding documentation state that a Go toolchain is already included. This redundant go installation adds to the image size and may introduce version conflicts. Consider removing this installation and using the go provided by the base image.
There was a problem hiding this comment.
Resolved in the current head: the Collector builder image does not include Go, so this profile now installs the pinned Go 1.24.2 toolchain before building gopls.
b57dce5 to
021eb99
Compare
dacc7ff to
c9fc1a4
Compare
021eb99 to
091e3cf
Compare
| && chown sandbox:sandbox /tmp/npm-global | ||
| USER sandbox | ||
| RUN NPM_CONFIG_PREFIX=/tmp/npm-global npm install -g \ | ||
| "@hono/node-server@${NPM_HONO_VERSION}" \ |
There was a problem hiding this comment.
Python version 3.14.3 does not exist. This will cause the build to fail. This is likely a typo and should be a valid Python version, for example 3.12.3.
There was a problem hiding this comment.
Skipped: this repeated finding is incorrect. uv python install 3.14.3 completed successfully in the image build, so the pinned Python version is valid.
| cp -a "/tmp/npm-global/bin/${name}" "/usr/local/bin/${name}"; \ | ||
| chown -h root:root "/usr/local/bin/${name}"; \ | ||
| done \ | ||
| && chown -R root:root /usr/lib/node_modules \ |
There was a problem hiding this comment.
The build argument NPM_HONO_VERSION is defined on line 102, but the corresponding package, @hono/node-server, is not included in this npm install command. This appears to be an omission.
There was a problem hiding this comment.
Skipped: @hono/node-server is included in the current npm install command. The finding targets a stale view of the file.
| && rm -f /tmp/go.tgz | ||
|
|
||
| ARG GOPLS_VERSION=0.20.0 | ||
| RUN GOBIN=/usr/local/bin /usr/local/go/bin/go install "golang.org/x/tools/gopls@v${GOPLS_VERSION}" \ |
There was a problem hiding this comment.
This comment states that the base collector-builder image does not contain Go. This contradicts line 32 of this same Dockerfile and the associated README, both of which state that Go is already supplied by the base image. Re-installing the Go toolchain is unnecessary and could lead to version conflicts.
There was a problem hiding this comment.
Resolved in the current head: the Collector builder image does not include Go, so this profile intentionally installs the pinned Go 1.24.2 toolchain before building gopls.
091e3cf to
710e9ce
Compare
710e9ce to
78b90a6
Compare
| USER sandbox | ||
| RUN NPM_CONFIG_PREFIX=/tmp/npm-global npm install -g \ | ||
| "@hono/node-server@${NPM_HONO_VERSION}" \ | ||
| "opencode-ai@${NPM_OPENCODE_VERSION}" \ |
There was a problem hiding this comment.
The uv version 0.10.8 is significantly outdated. As a fast-developing tool, using a more recent version is recommended to benefit from performance improvements, security updates, and bug fixes. Please consider updating to a newer release.
There was a problem hiding this comment.
Skipped: this profile pins uv 0.10.8 for reproducible image builds and uses the same tested version as the StackRox CI profile. Updating it is a separate dependency-refresh change, not a correctness issue for this PR.
|
|
||
| # Atlassian MCP is part of the StackRox workflow image contract. The gateway | ||
| # still owns credentials; no credential values are baked into this image. | ||
| RUN uv venv --python "${PYTHON_VERSION}" --seed /sandbox/.venv \ |
There was a problem hiding this comment.
The pinned Go version 1.24.2 is several major versions behind current stable releases and is likely unsupported. Please update to a recent, supported Go version to ensure security patches and bug fixes are included.
There was a problem hiding this comment.
Skipped: Go 1.24.2 is intentionally pinned with its checksum and is the tested version shared with the default StackRox profile. Updating the toolchain is a separate dependency-refresh change.
|
|
||
| - Working directory: `/sandbox` | ||
| - Writable paths: `/sandbox`, `/tmp` | ||
| - Inference routes through the gateway proxy at `inference.local` |
There was a problem hiding this comment.
The Dockerfile for this image (line 136) states that the collector-builder base image does not include Go, and then proceeds to install it. This documentation contradicts the Dockerfile by stating that Go is available from the base image. Please clarify whether the base image includes Go and update the documentation to be consistent.
There was a problem hiding this comment.
Resolved in the current head: the image instructions now say that the Collector builder supplies the C/C++ build tools and this profile adds the pinned Go toolchain and gopls.
| ARG NPM_OPENCODE_VERSION=1.18.30 | ||
| ARG NPM_CODEX_VERSION=0.117.0 | ||
| ARG NPM_COPILOT_VERSION=1.0.16 | ||
| ARG NPM_AJV_VERSION=5.0.0 |
There was a problem hiding this comment.
Python version 3.14.3 is not a valid or available Python version. This will cause the Docker build to fail. You should use a valid version, for example, the latest stable version from the 3.12 series.
There was a problem hiding this comment.
Skipped: this repeats the incorrect Python finding. uv python install 3.14.3 completed successfully in the final image build, so the pinned version is valid.
| # OpenShell provider is attached. Use the static musl build so it runs on the | ||
| # CentOS glibc version supplied by collector-builder. | ||
| ARG GWS_VERSION=0.22.5 | ||
| ARG GWS_SHA256_AMD64=4db473dde4b1ab872e4ff35d769b0d4af1f1a6441a605e79d5cf8ada9c87e920 |
There was a problem hiding this comment.
The go install command for gopls does not pin the version, which can lead to non-reproducible builds. It is recommended to use a specific version tag to ensure build consistency.
There was a problem hiding this comment.
Skipped: the version is pinned through ARG GOPLS_VERSION=0.20.0 and the install uses golang.org/x/tools/gopls@v${GOPLS_VERSION}. The finding targets a stale view of the file.
Summary
Adds a Collector-specific image profile on top of the StackRox CI image PR.
quay.io/stackrox-io/collector-builder:mastermanifest, pinned to digestsha256:52a3cca5253abb0cd5c3606769d5fd5b8be4cdb4671396f38a792695f07d7696.sandbox-collector-builderforlinux/amd64while third-party binary downloads remain amd64-only.Dependent on the NVIDIA/default and Apollo/rox-ci-image PRs.