Repository navigation
fix(ci): use a full clone for CodeQL so autobuild can determine the version - #9
Merged
Merged
Conversation
…ersion Every CodeQL run has failed for at least a week, including the scheduled weekly scan, so no security analysis has actually been running. actions/checkout defaults to a shallow clone, but Nerdbank.GitVersioning walks commit history to compute the version height and throws outright when the objects are absent: GitException: Shallow clone lacks the objects required to calculate version height. autobuild died on that before CodeQL could extract anything, reporting only "Could not auto-detect a suitable build method". ci.yml already sets fetch-depth: 0 for this reason; codeql.yml was missing it. Verified locally: a --depth 1 clone reproduces the exact CI error, a full clone builds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CodeQL has failed on every run for at least a week — 8 consecutive failures including the scheduled Monday scan. No security analysis has actually been running on this repository. The persistent red
Analyzecheck is also why the stale Dependabot PRs looked unmergeable and sat untouched for two months.Cause
actions/checkoutdefaults to a shallow clone. Nerdbank.GitVersioning walks commit history to compute the version height and throws when those objects are missing:autobuilddied on that before CodeQL could extract any code, surfacing only the genericError: Could not auto-detect a suitable build method.ci.ymlalready setsfetch-depth: 0for exactly this reason.codeql.ymlwas simply missing it.Verification
Reproduced both sides locally against this repo:
git clone --depth 1GitExceptionto the CI loggit clone(full)Build succeeded.The
Analyzecheck on this PR is the real confirmation — it should go green for the first time in weeks.🤖 Generated with Claude Code