ci: fix CodeQL Go analysis by replacing default setup with custom workflow#106
Merged
ci: fix CodeQL Go analysis by replacing default setup with custom workflow#106
Conversation
…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>
Contributor
There was a problem hiding this comment.
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.ymlto run CodeQL for Go, JavaScript/TypeScript, and Actions. - Configured workflow-level
GOPRIVATE/GONOSUMCHECKto 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>
|
|
||
| env: | ||
| GOPRIVATE: github.com/GoCodeAlone/* | ||
| GONOSUMCHECK: github.com/GoCodeAlone/* |
There was a problem hiding this comment.
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/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/codeql.ymlGOPRIVATEandGONOSUMCHECKforgithub.com/GoCodeAlone/*modules, matchingci.ymlProblem
The default CodeQL setup runs
go mod tidyduring autobuild withoutGOPRIVATE/GONOSUMCHECK, causing a checksum mismatch when fetchingGoCodeAlone/yaegifrom the module proxy. This made the "Analyze (go)" check fail on every PR.Fix
Custom workflow provides the same env vars that
ci.ymlalready uses. Covers all three languages: Go, JavaScript/TypeScript, and Actions.Test plan
gh api -X PATCH