Skip to content

ci: fix CodeQL Go analysis by replacing default setup with custom workflow#106

Merged
intel352 merged 2 commits intomainfrom
fix/codeql-goprivate
Feb 23, 2026
Merged

ci: fix CodeQL Go analysis by replacing default setup with custom workflow#106
intel352 merged 2 commits intomainfrom
fix/codeql-goprivate

Conversation

@intel352
Copy link
Contributor

Summary

  • Replaced GitHub's default CodeQL setup with a custom .github/workflows/codeql.yml
  • Sets GOPRIVATE and GONOSUMCHECK for github.com/GoCodeAlone/* modules, matching ci.yml
  • Disabled the default CodeQL setup via API (it doesn't support custom env vars)

Problem

The default CodeQL setup runs go mod tidy during autobuild without GOPRIVATE/GONOSUMCHECK, causing a checksum mismatch when fetching GoCodeAlone/yaegi from the module proxy. This made the "Analyze (go)" check fail on every PR.

Fix

Custom workflow provides the same env vars that ci.yml already uses. Covers all three languages: Go, JavaScript/TypeScript, and Actions.

Test plan

  • Default CodeQL setup disabled via gh api -X PATCH
  • Custom workflow covers same languages (go, javascript-typescript, actions)
  • Verify "Analyze (go)" passes on this PR's CI run

…VATE

The default CodeQL setup doesn't support custom environment variables,
so Go autobuild fails with a checksum mismatch when fetching
GoCodeAlone/yaegi from the module proxy — the proxy-served hash differs
from the go.sum entry generated via direct fetch.

All other CI jobs already set GOPRIVATE and GONOSUMCHECK to handle this.
This replaces the default setup with an explicit workflow that does the
same, matching the existing ci.yml configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 23, 2026 05:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Replaces the repository’s default CodeQL configuration with a custom GitHub Actions workflow so CodeQL analysis can run with the same Go private-module environment variables used elsewhere in CI (avoiding failures during Go autobuild/module resolution).

Changes:

  • Added a custom .github/workflows/codeql.yml to run CodeQL for Go, JavaScript/TypeScript, and Actions.
  • Configured workflow-level GOPRIVATE/GONOSUMCHECK to match existing CI env settings.
  • Uses a language matrix to run CodeQL analysis per language with appropriate build modes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 23, 2026 06:17
@intel352 intel352 merged commit 0efc827 into main Feb 23, 2026
15 of 16 checks passed
@intel352 intel352 deleted the fix/codeql-goprivate branch February 23, 2026 06:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


env:
GOPRIVATE: github.com/GoCodeAlone/*
GONOSUMCHECK: github.com/GoCodeAlone/*
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

GONOSUMCHECK isn't a Go toolchain environment variable (Go uses GONOSUMDB/GONOPROXY). As written, this setting won't affect module checksum verification and may not actually address the failure mode described. Consider replacing it with GONOSUMDB: github.com/GoCodeAlone/* (and/or GONOPROXY) or removing it if GOPRIVATE alone is sufficient.

Suggested change
GONOSUMCHECK: github.com/GoCodeAlone/*
GONOSUMDB: github.com/GoCodeAlone/*

Copilot uses AI. Check for mistakes.
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