Skip to content

fix: upgrade builder image and dependencies to close vulnerabilities - #99

Merged
pavelanni merged 2 commits into
mainfrom
fix/reduce-container-image-vulnerabilities
Aug 15, 2026
Merged

pavelanni merged 2 commits into
mainfrom
fix/reduce-container-image-vulnerabilities

Conversation

@pavelanni

Copy link
Copy Markdown
Collaborator

Summary

  • Bump the Go builder image to golang:1.26.6-alpine3.24 and the runtime base to alpine:3.24 in both Dockerfile and Dockerfile.skill-puller (they share the same go.mod, so both were exposed to the same dependency vulnerabilities).
  • Update go.mod/go.sum dependencies (a2a-go, anthropic-sdk-go, modelcontextprotocol/go-sdk, prometheus client, OTel, grpc, sqlite, etc.) and align the go.mod language version and CLAUDE.md's stated Go version with the new builder version.
  • This closes open Dependabot alert MCP client integration for external tool servers #2 (google.golang.org/grpc xDS RBAC/HTTP2 vulnerabilities, fixed in 1.82.1+) — go.sum now pulls in v1.83.0.

Verification

  • go build ./... and go test ./... pass.
  • go mod tidy produces no additional diff.
  • Built both images locally and scanned with Trivy (--severity HIGH,CRITICAL --scanners vuln): 0 vulnerabilities on the alpine OS layer and the compiled Go binary for both docsclaw and skill-puller images.

Test plan

Bump the Go builder to golang:1.26.6-alpine3.24 and the runtime base to
alpine:3.24 in both Dockerfile and Dockerfile.skill-puller (they share
the same go.mod), and update go.mod/go.sum dependencies. Trivy reports
0 vulnerabilities on the resulting images. Aligned the go.mod language
version and CLAUDE.md's stated Go version with the new builder version.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 81737dcc-b078-40d4-bf04-6a6fdedceda1

📥 Commits

Reviewing files that changed from the base of the PR and between 94d5dc7 and baa11b7.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • CLAUDE.md
  • Dockerfile
  • Dockerfile.skill-puller
  • demo/batch/document-service/main.go
  • go.mod
  • internal/logger/logger.go

Included review availability: Your plan includes up to 12 reviews per rolling hour; 10 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Automatic logging now uses JSON when output is not connected to a terminal.
    • Text logging remains available through the existing configuration option.
  • Bug Fixes

    • Improved handling and logging of response-writing and encoding errors in document service endpoints.
  • Chores

    • Updated the application runtime and build environment to Go 1.26 and Alpine Linux 3.24.
    • Updated the documented minimum supported Go version to 1.26.

Walkthrough

The change raises the project baseline to Go 1.26 and Alpine 3.24, refreshes Go dependencies, adjusts automatic logger format detection, and logs response write or encoding errors in the document-service demo.

Changes

Go runtime and observability updates

Layer / File(s) Summary
Go and container baseline
CLAUDE.md, go.mod, Dockerfile, Dockerfile.skill-puller
The documented and module Go versions change to 1.26. Dependency versions are refreshed. Builder and runtime images change to Go 1.26.6 and Alpine 3.24.
Automatic logger format selection
internal/logger/logger.go
Automatic detection selects JSON logging when stdout is not a terminal. Explicit LOG_FORMAT=text remains supported.
Demo response error handling
demo/batch/document-service/main.go
The health, single-document, and document-list endpoints log warnings when response writing or JSON encoding fails.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to baa11

The change updates build/runtime images and dependencies to address known vulnerabilities, with builds, tests, and vulnerability scans reported passing; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the dependency and builder image upgrades that address vulnerabilities.
Description check ✅ Passed The description directly explains the image upgrades, dependency updates, vulnerability remediation, and verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reduce-container-image-vulnerabilities

Comment @coderabbitai help to get the list of available commands.

- Fix pre-existing golangci-lint failures: check errcheck'd writes in
  demo/batch/document-service (health/document/documents handlers),
  and drop the ineffectual useText assignment in internal/logger by
  restructuring the format auto-detection to only set useJSON.
- Relax go.mod's go directive to 1.26.0 (minimum) instead of pinning
  the exact builder patch version 1.26.6, so it matches CLAUDE.md's
  "Go 1.26+" and doesn't reject contributors on earlier 1.26.x patches.

curl is kept in the runtime image; it's required by the agent at
runtime.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni marked this pull request as ready for review August 15, 2026 23:17
@pavelanni
pavelanni merged commit 4280958 into main Aug 15, 2026
4 checks passed
@pavelanni
pavelanni deleted the fix/reduce-container-image-vulnerabilities branch August 15, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant