Skip to content

codeql-scan-dispatch.yml has never run: env: cannot hold the client_payload matrix array (0 success / 136 failures since #1776) #1925

Description

@seonghobae

.github/workflows/codeql-scan-dispatch.yml — the handler that runs the actual native CodeQL scan — has never completed successfully. Every run dies before any step executes.

codeql-scan-dispatch.yml    success=0     failure=136    last_success=never

Cause

GitHub rejects the workflow at template validation:

The template is not valid. .github/workflows/codeql-scan-dispatch.yml
(Line: 149, Col: 28): A sequence was not expected

Line 149 assigns the dispatched matrix straight into env::

SUPPLIED_MATRIX: ${{ github.event.client_payload.matrix || '' }}

and codeql-pr.yml:257 sends that key as an array:

matrix:[{language:$language,"build-mode":$build_mode}]

An env: value must be a scalar, so the expression yields a sequence and the whole workflow fails to compile. yaml.safe_load parses the file fine locally — this is an Actions template rule, not YAML syntax, which is why it isn't caught by any local lint.

Introduced by c594efad feat(codeql): add the native CodeQL scan dispatch handler (#1776); broken from that commit onward, which matches success=0.

Likely fix

Serialise before assignment:

SUPPLIED_MATRIX: ${{ toJSON(github.event.client_payload.matrix) }}

I have not applied this. It needs someone who can exercise a real repository_dispatch end to end, and the consumer of SUPPLIED_MATRIX should be checked for whether it expects the JSON text or the previous (never-working) shape.

Why it went unnoticed

The failure is invisible from run-level status. codeql-pr.yml's own jobs are green — sampled 15 recent successful runs, Detect CodeQL languages and both CodeQL compatibility analysis (actions|python) succeeded 15/15 — so the required contexts report healthy while the dispatched scan never happens. Worth confirming what CodeQL coverage actually exists today, since codeql-pr.yml's own header describes itself as detecting languages and delegating the real scan to this handler.

Related but distinct

The other two workflows gated by vars.OPENCODE_REPOSITORY_DISPATCH_ACTOR fail for a different reason, and I initially assumed one shared cause — they don't share it:

workflow success failure last success cause
codeql-scan-dispatch.yml 0 136 never invalid template (this issue)
opencode-review-dispatch.yml 466 9609 2026-08-26 authorization rejected: actor opencode-agent[bot] vs variable github-actions[bot]
pr-review-fix-scheduler.yml 405 10 2026-08-16 not diagnosed

The opencode-review-dispatch mismatch is filed separately — it is an authorization allowlist, and the correct direction of the fix (update the variable vs. correct the dispatching identity) is a decision for whoever owns that boundary, not something to widen automatically.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions