github / github/codeql

Code scanning is waiting for results from CodeQL; CodeQL is stuck

Open
#19,671 15 comments 4 reactions 0 assignees View on GitHub
question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

Hello there. I seem to have a stuck GitHub Actions workflow.

When I tried to push to GitHub yesterday, I got the following error:

```
remote: error: GH013: Repository rule violations found for refs/heads/main.
remote: Review all repository rules at https://github.com/REDACTED_ORG/REDACTED_REPO/rules?ref=refs%2Fheads%2Fmain
remote:
remote: - Code scanning is waiting for results from CodeQL for the commit REDACTED_COMMIT.
remote:
To https://github.com/REDACTED_ORG/REDACTED_REPO.git
! [remote rejected] main -> main (push declined due to repository rule violations)
error: failed to push some refs to 'https://github.com/REDACTED_ORG/REDACTED_REPO.git'
```

Checking the workflow status, I saw that the "CodeQL Setup" action completed successfully. So I asked to re-run the "CodeQL Setup" action. It's been a day now, and it's still stuck in the "Queued" state. So I tried to unstick the job by canceling it, but was told "Failed to cancel workflow."

How do we proceed with this?

Thank you.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the reported GitHub Actions workflow, especially the "CodeQL Setup" action and its queued state, alongside the repository rule violation for the named commit. Check the workflow status and cancellation behavior, then document a reproducible cause and a confirmed way to unblock CodeQL results and the rejected push.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.