Skip to content

ci(collector): run govulncheck before each layer build - #2695

Open
barkow15 wants to merge 1 commit into
open-telemetry:mainfrom
barkow15:ci/govulncheck-release-paths
Open

barkow15 wants to merge 1 commit into
open-telemetry:mainfrom
barkow15:ci/govulncheck-release-paths

Conversation

@barkow15

Copy link
Copy Markdown

Follow-up to #2693.

Changes

#2693 runs make govulncheck in ci-collector.yml. This PR also runs it before the layer is built in the two release paths:

  • .github/actions/build-collector-layer (used by release-layer-collector.yml)
  • publish-layer-collector.yml (custom builds, with the same BUILDTAGS)

Thus, a release does not ship a collector with a called vulnerability in the Go stdlib or in a dependency. The CI check runs only when collector/** changes, but a new Go CVE can be published between two PRs.

If you do not want a vulnerability to block a release, close this PR. The CI check from #2693 stays.

Verification

The govulncheck target is the same as on main (from #2693). Locally (linux/arm64), make govulncheck exits 0 with Go 1.26.10 and exits 3 with Go 1.26.0.

AI (Claude Code) helped with this change.

🤖 Generated with Claude Code

Follow-up to open-telemetry#2693. open-telemetry#2693 runs make govulncheck in ci-collector.yml. This change also runs it in the two paths that build a release layer:

- .github/actions/build-collector-layer (release-layer-collector.yml)
- publish-layer-collector.yml (custom builds, with the same BUILDTAGS)

If the toolchain or a dependency has a called vulnerability, the layer is not built.
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: barkow15 / name: Phil Barkow (dedf1f7)

@github-actions github-actions Bot added the ci label Oct 22, 2026
@barkow15
barkow15 marked this pull request as ready for review October 22, 2026 21:00
@barkow15
barkow15 requested a review from a team as a code owner October 22, 2026 21:00
Comment on lines +25 to +30
- name: Check for known vulnerabilities
shell: bash
run: make -C collector govulncheck GOARCH="${INPUTS_ARCHITECTURE}"
env:
INPUTS_ARCHITECTURE: ${{ inputs.architecture }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be better to use https://github.com/golang/govulncheck-action, export the data as sarif & upload it to github? That way we can see the issues and potentially have it as a dedicated workflow which runs periodically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants