Skip to content

Fix CodeQL build: build with cgo enabled - #1047

Merged
turbolent merged 1 commit into
masterfrom
bastian/fix-codeql-cgo
Nov 5, 2026
Merged

turbolent merged 1 commit into
masterfrom
bastian/fix-codeql-cgo

Conversation

@turbolent

Copy link
Copy Markdown
Member

Problem

The CodeQL Analysis workflow fails at the Build step since #1039.
It builds with CGO_ENABLED=0,
but onflow/crypto v0.27.2 and go-ethereum's secp256k1 package require cgo:

vendor/github.com/onflow/crypto/ecdsa_secp256k1.go:131:30: undefined: secp256k1.Sign

The required CodeQL check reported "neutral",
so the failure was not visible.

Changes

  • code-analysis.yml: build with go build ./... (cgo enabled, no vendoring).
  • README.md, AGENTS.md: remove the outdated instructions
    for building with CGO_ENABLED=0 and the no-cgo tag.

Note

GitHub disabled the CodeQL Analysis workflow for inactivity (state disabled_inactivity),
60 days after the last commit on master.
A maintainer must enable it again before the CodeQL check can run on this PR:

gh workflow enable code-analysis.yml -R onflow/flow-go-sdk

onflow/crypto v0.27.2 and go-ethereum's secp256k1 require cgo,
so the CGO_ENABLED=0 build in the CodeQL workflow fails.
Remove the outdated no-cgo build instructions from README.md and AGENTS.md.
@turbolent
turbolent requested a review from a team as a code owner November 5, 2026 17:35
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@turbolent
turbolent merged commit 1a4b36a into master Nov 5, 2026
5 checks passed
@turbolent
turbolent deleted the bastian/fix-codeql-cgo branch November 5, 2026 17:38
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

⌂ 换网址