go build hangs after codeql init

Open
#2,589 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
github-actions, go
Domain
ci-cd, security

Research direction

Start with the workflow shown in the issue, focusing on the interaction between codeql-action/init@v3 and go build -x on ubuntu-latest. Compare it with the separate workflow without CodeQL and the locally working macOS arm64 CLI setup; done means identifying why the build hangs and documenting a verified fix or workaround.

Written by the indexing model from the issue text.

Description

Hi,

I'm trying out codeql, after running codeql init for go language and with the debug flag I build my app with go build -x and it just hangs, no output. I use the same steps to build my app in a separate workflow where there's no codeql and it works just fine. Running locally with codeql CLI (macos arm64) also works.

My workflow (simplified):

    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          languages: go
          debug: true

      - name: Build app
        run: go build -x

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3

I tried autobuild but after a few minutes it just hangs on one of the go files and I don't know why, would be great to learn how can I debug this.

Thank you.

Dominant language
TypeScript
Stars
1.6k
Forks
493
Avg merge
1d 13h
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-action

All issues in github/codeql-action

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.