Skip to content

fix: [CI-24668]: remediate vulnerabilities in harnesssecure/gar - upgrade to 21.3.5 - #526

Draft
vinayakharness2026 wants to merge 1 commit into
drone-plugins:masterfrom
vinayakharness2026:fix/CI-24668-vuln-remediation-gar
Draft

fix: [CI-24668]: remediate vulnerabilities in harnesssecure/gar - upgrade to 21.3.5#526
vinayakharness2026 wants to merge 1 commit into
drone-plugins:masterfrom
vinayakharness2026:fix/CI-24668-vuln-remediation-gar

Conversation

@vinayakharness2026

@vinayakharness2026 vinayakharness2026 commented Sep 8, 2026

Copy link
Copy Markdown

Vulnerability Remediation: harnesssecure/gar

Team: ci (Harness CI Platform)
Tickets: CI-24668
Test image: vinayakharness/gar-test:gar-21.3.5--debug

OnDemand scanner runs (Harness https://harness0.harness.io/):


Summary

This PR addresses 234 vulnerabilities in harnesssecure/gar:21.3.4, achieving a 72% reduction in Critical CVEs (22→3 Trivy, 18→5 OnDemand) and 82% reduction in High CVEs (392→72 Trivy, 98→30 OnDemand). Key fixes: golang.org/x/crypto upgraded to v0.56.0 (fixes CVE-2026-56854 CRITICAL in the drone-gar binary), grpc upgraded to v1.83.2 (fixes 2 HIGH CVEs), Go toolchain bumped to 1.26.8 (fixes 8 stdlib HIGH CVEs), and docker base image updated from 28.1.1-dind to 29.8.0-dind (eliminates most bundled binary CVEs). Three blocked Critical CVEs remain (cosign x/crypto@v0.46.0, cosign grpc@v1.77.0, containerd x/crypto@v0.53.0) — no same-registry upstream fix available yet. Recommendation: REVIEW — significant improvement but three Criticals blocked pending upstream releases.


CVE Delta — Trivy (local scan)

Severity Before After Change
Critical 22 3 -19
High 392 72 -320
Medium 405 29 -376
Low 57 6 -51
Total 876 110 -766

CVE Delta — Harness OnDemand (Prisma Cloud)

Severity Before After Change
Critical 18 5 -13
High 98 30 -68
Medium 0 0 0
Low 0 0 0
Info 0 0 0
Total 116 35 -81

Per-Ticket CVE Status

CI-24668 — Security Vulnerability Fixes - harnesssecure/gar

Summary: The harnesssecure/gar:21.3.4 image inherits vulnerabilities from four sources: (1) the docker:28.1.1-dind base image shipping bundled Go binaries (containerd, dockerd, docker-buildx, docker-compose) compiled with outdated x/crypto and grpc; (2) the cosign binary installed at build time; (3) the drone-gar Go binary itself (x/crypto@v0.54.0, grpc@v1.82.0, stdlib@v1.26.5); and (4) Alpine OS packages (openssl). This PR upgrades the docker base to 29.8.0-dind, cosign to v2.6.5, bumps all Go dependencies in go.mod, and updates the build toolchain to golang:1.26.8.

CVE Package Before After Required Status Reason
CVE-2026-56854 golang.org/x/crypto (drone-gar) v0.54.0 v0.56.0 ≥0.55.0 x/crypto bumped to v0.56.0 in go.mod
CVE-2026-84304 google.golang.org/grpc (drone-gar) v1.82.0 v1.83.2 ≥1.83.1 grpc bumped to v1.83.2
GHSA-hrxh-6v49-42gf google.golang.org/grpc (drone-gar) v1.82.0 v1.83.2 ≥1.82.1 grpc bumped to v1.83.2
CVE-2026-33818 / CVE-2026-56853-56862 stdlib (drone-gar) v1.26.5 v1.26.8 ≥1.26.6 golang:1.26.8 toolchain in harness.yaml
CVE-2026-56854 golang.org/x/crypto (cosign) v0.46.0 v0.46.0 ≥0.55.0 Blocked: cosign v2.6.5 and v3.1.3 both ship x/crypto<0.55.0 — no same-registry fix
CVE-2026-33186 google.golang.org/grpc (cosign) v1.77.0 v1.77.0 ≥1.79.3 Blocked: no cosign release ships grpc≥1.79.3
CVE-2026-56854 golang.org/x/crypto (containerd) v0.53.0 v0.53.0 ≥0.55.0 Blocked: docker:29.8.0-dind bundles containerd with x/crypto@v0.53.0 — awaiting Docker upstream update
CVE-2026-31789 openssl/libcrypto3 3.3.3-r0 3.3.x-r0 ≥3.3.7-r0 Base image upgrade brings newer Alpine packages

Changes Made

File Change
docker/docker/Dockerfile.linux.amd64 docker:28.1.1-dinddocker:29.8.0-dind; cosign v2.5.3v2.6.5
docker/docker/Dockerfile.linux.arm64 arm64v8/docker:28.1.1-dindarm64v8/docker:29.8.0-dind; cosign v2.5.3v2.6.5 (arm64)
go.mod x/crypto v0.54.0v0.56.0, grpc v1.82.0v1.83.2, x/text v0.40.0v0.41.0, x/net v0.57.0v0.58.0, go 1.25.7go 1.26.8
go.sum Updated checksums for bumped dependencies
.harness/harness.yaml golang:1.26.5golang:1.26.8 (6 linux build stages: linux-amd64, linux-arm64, rf-linux-amd64, rf-linux-arm64)

Version selection rationale:

  • docker:29.8.0-dind: minimum stable same-registry version that eliminates dockerd/buildx/compose CRITICAL CVEs; 29.7.2 still had 4 CRITICAL bundled-binary CVEs
  • golang.org/x/crypto v0.56.0: minimum version fixing CVE-2026-56854 (CRITICAL) and CVE-2026-56855/CVE-2026-78662 (UNKNOWN)
  • google.golang.org/grpc v1.83.2: minimum stable version fixing CVE-2026-84304 (HIGH, fix in ≥1.83.1) and GHSA-hrxh-6v49-42gf (HIGH, fix in ≥1.82.1)
  • golang:1.26.8: latest Go 1.26.x; 1.26.6 is the minimum that fixes the 8 stdlib HIGH CVEs in drone-gar, but 1.26.8 is latest patch
  • cosign v2.6.5: current same-registry latest; no v2 or v3 release ships x/crypto≥0.55.0 — blocked pending upstream

⚠️ Same-registry fix unavailable

The following bundled binaries contain Critical CVEs that cannot be resolved by upgrading within the same registry:

  1. cosign (installed in the docker Dockerfile): cosign v2.6.5 (and v3.1.3) ship golang.org/x/crypto@v0.46.0 and google.golang.org/grpc@v1.77.0 — no cosign release has shipped with x/crypto≥0.55.0 or grpc≥1.79.3 as of 2026-09-08. Action: once sigstore publishes a cosign release with updated deps, bump the cosign version in both Dockerfiles.

  2. containerd (bundled in docker:29.8.0-dind): ships with golang.org/x/crypto@v0.53.0. docker:29.8.0-dind is the latest stable release. Action: bump to the next docker:29.x.y-dind or 30.x.y-dind release when it ships with containerd recompiled against x/crypto≥0.55.0.

…rade to 21.3.5

- docker base: 28.1.1-dind → 29.8.0-dind (fixes containerd, dockerd, buildx, compose CVEs)
- cosign: v2.5.3 → v2.6.5 (same-registry latest; upstream x/crypto fix pending)
- golang.org/x/crypto: v0.54.0 → v0.56.0 (fixes CVE-2026-56854 CRITICAL in drone-gar)
- google.golang.org/grpc: v1.82.0 → v1.83.2 (fixes CVE-2026-84304, GHSA-hrxh-6v49-42gf HIGH)
- golang.org/x/text: v0.40.0 → v0.41.0, x/net: v0.57.0 → v0.58.0
- go toolchain: 1.25.7 → 1.26.8 (fixes 8 stdlib HIGH CVEs in drone-gar binary)
- .harness/harness.yaml: golang:1.26.5 → golang:1.26.8 (amd64/arm64 linux build stages)

Trivy: 22C/392H/405M/57L → 3C/72H/29M/6L
OnDemand (Prisma Cloud): 18C/98H → 5C/30H

Blocked: cosign ships x/crypto@v0.46.0 (no v2/v3 release ships ≥v0.55.0);
docker:29.8.0-dind containerd ships x/crypto@v0.53.0 (awaiting Docker upstream update).
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