Skip to content

fix(ci): Analyze (go) fails on every PR head with a CodeQL configuration error, blocking ~39 PRsΒ #2746

Description

@devantler

πŸ€– Generated by the Daily AI Engineer

Evidence

Analyze (go) fails on every open PR head in this repo with a CodeQL configuration error β€” not a code fault:

Encountered a fatal error while running "codeql database finalize ..." Exit code was 32
and last log line was: CodeQL could not process any code written in Go.
CodeQL job status was configuration error.

Sample: run 29659533468 (PR #2699).

The decisive detail is that two code-scanning runs fire per PR, and they disagree about the same language on the same commit:

Run (PR #2745, same head) Jobs Result
29660162421 Analyze (actions), Analyze (go), Analyze (python) all success
29660162194 Analyze (go), Analyze (python) go failure

On main both runs succeed (29660192906), which is why main reads green and the breakage is only visible on PRs.

Supporting facts, gathered read-only:

  • Code scanning is default setup (event: dynamic; no CodeQL workflow file in .github/workflows), currently state: configured with languages: ["actions","go","python"], last changed 2026-07-14T08:05:56Z.
  • The repo's only Go code is 4 files under scripts/generate-kubescape-exceptions/ and scripts/validate-merge-group-heal/, with go.mod at the repository root β€” consistent with one configuration not seeing those paths and therefore extracting zero Go.
  • python is still configured as an analysed language even though the portfolio is constitutionally Python-free (scripting is bash or Go), and Migrate remaining Python tooling and tests to GoΒ #2623 tracks removing the remaining Python tooling.

I have not established why two configurations coexist, or which one is authoritative β€” that is the first thing to determine, and I did not mutate any settings to find out.

Impact

~39 open PRs sit at mergeStateStatus: BLOCKED with this as their failing check (#2699, #2702–#2745 and neighbours). Because the failure is a configuration error rather than a finding, no amount of work on those branches clears it β€” every one of them is unmergeable until the configuration is fixed. main staying green masks it from any check that only watches the default branch.

Secondary: a language analysis that always errors trains readers to ignore a security check, which is the worst possible check to make routine noise.

Expected behaviour

Analyze (go) succeeds on PR heads exactly as it does on main, from a single authoritative code-scanning configuration, and the configured language set matches the languages the repo actually contains.

Acceptance criteria

  1. Root cause of the duplicate/conflicting code-scanning configuration is identified and recorded on this issue.
  2. Exactly one authoritative configuration analyses this repo; the redundant one is removed.
  3. Analyze (go) passes on a PR head β€” verified on a real open PR, not inferred from main.
  4. The analysed language set reflects the repo's actual contents (drop python unless Migrate remaining Python tooling and tests to GoΒ #2623 shows it is still needed).
  5. Whatever the fix is, it lands in the declarative GitHub configuration in devantler-tech/.github where repo config is managed, rather than as an undocumented click in repo settings.

Size

Small–medium. The diagnosis is likely most of the work; the change itself should be a configuration edit. Note that default setup is settings-driven, so part of the fix may need a maintainer-applied settings change if it cannot be expressed declaratively β€” worth confirming as part of AC 5.

Part of #2043.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status
βœ… Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions