Skip to content

op-monitorism: harden Dockerfile with Chainguard base + Go 1.26 - #179

Merged
falcorocks merged 3 commits into
mainfrom
falcorocks/harden-base-go126
Jul 22, 2026
Merged

op-monitorism: harden Dockerfile with Chainguard base + Go 1.26#179
falcorocks merged 3 commits into
mainfrom
falcorocks/harden-base-go126

Conversation

@falcorocks

@falcorocks falcorocks commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

Harden the op-monitorism image and clear known dependency CVEs.

Change

  • Replace the golang:1.22-alpine builder and alpine:3.18 runtime with chainguard/wolfi-base for both stages (go-1.26 installed in the builder), matching the pattern used across the infra repos.
  • Bump the go directive to 1.26.0.
  • Bump dependencies to clear known vulnerabilities:
    • golang.org/x/crypto → v0.52.0
    • golang.org/x/net → v0.55.0
    • github.com/consensys/gnark-crypto → v0.18.1
    • plus patch-level bumps across the module.

CI note

The ci-builder image ships golangci-lint v1.61 (built with go1.22), which refuses modules targeting go ≥ 1.23. The lint job now runs on cimg/go:1.26 with golangci-lint v2.11.4 (same setup as the infra repo), with the previous CLI flags moved to .golangci.yml. The v2 staticcheck merge surfaced 6 pre-existing findings (unchecked defer, tagged switch, capitalized error strings), fixed here.

Verification

  • docker build ./op-monitorism succeeds.
  • op-monitorism --help runs in the built image.
  • golangci-lint run clean; module tests pass.

Replace the golang:1.22-alpine builder and alpine:3.18 runtime with
chainguard/wolfi-base for both stages (go-1.26 installed in the
builder), matching the pattern used across the infra repos. Bump the
go directive to 1.26.0.

Bump dependencies to clear known vulnerabilities:
- golang.org/x/crypto -> v0.52.0
- golang.org/x/net -> v0.55.0
- github.com/consensys/gnark-crypto -> v0.18.1
plus patch-level bumps across the module.

Verified: docker build succeeds; op-monitorism binary runs (--help).
@falcorocks
falcorocks requested review from a team and hdcesario-op as code owners July 22, 2026 11:24
@falcorocks falcorocks self-assigned this Jul 22, 2026
The ci-builder image ships golangci-lint v1.61 built with go1.22, which
refuses go.mod >= 1.23. Move the lint job to cimg/go:1.26 and install
golangci-lint v2.11.4, matching the setup used in the infra repo.
Replace the v1 CLI flags with an equivalent .golangci.yml and fix the
issues newly reported by the v2 staticcheck merge.
@falcorocks
falcorocks enabled auto-merge (squash) July 22, 2026 12:13
Comment thread .circleci/config.yml
ci_builder_image:
type: string
default: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.55.0
default: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@falcorocks why this changes here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm to have the golint ci etc okay I see!

@falcorocks
falcorocks merged commit 5dc9792 into main Jul 22, 2026
13 checks passed
@falcorocks
falcorocks deleted the falcorocks/harden-base-go126 branch July 22, 2026 12:41
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.

2 participants