{"meta":{"title":"Troubleshooting code scanning analysis errors","intro":"Identify and resolve errors that occur during code analysis, including build failures, incomplete scans, resource limits, and unexpected results.","product":"Security and code quality","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/code-security","title":"Security and code quality"},{"href":"/en/enterprise-cloud@latest/code-security/reference","title":"Reference"},{"href":"/en/enterprise-cloud@latest/code-security/reference/code-scanning","title":"Code scanning"},{"href":"/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors","title":"Troubleshoot analysis errors"}],"documentType":"subcategory"},"body":"# Troubleshooting code scanning analysis errors\n\nIdentify and resolve errors that occur during code analysis, including build failures, incomplete scans, resource limits, and unexpected results.\n\n## Links\n\n* [Alerts found in generated code](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/alerts-in-generated-code)\n\n  When analyzing your code with code scanning, you may wish to build only the code which you wish to analyze.\n\n* [Automatic build failed for a compiled language](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/automatic-build-failed)\n\n  If automatic build fails, you can configure code scanning to use specific build steps for compiled languages.\n\n* [C# compiler unexpectedly failing](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/c-sharp-compiler-unexpectedly-failing)\n\n  If your MSBuild C# compilation is unexpectedly failing, you may need to amend your application project file.\n\n* [Cannot enable CodeQL in a private repository](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/cannot-enable-codeql-in-a-private-repository)\n\n  GitHub Code Security must be enabled in order to use code scanning on private repositories.\n\n* [Code scanning analysis takes too long](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/analysis-takes-too-long)\n\n  You can fine tune your code scanning configuration to minimize analysis time.\n\n* [CodeQL scanned fewer lines than expected](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/fewer-lines-scanned-than-expected)\n\n  If CodeQL analyzed less code than you expected, you may need to use a custom build command.\n\n* [Enabling default setup takes too long](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/enabling-default-setup-takes-too-long)\n\n  If you think that enabling default setup has stalled, you can restart the process.\n\n* [Error: \"GitHub Code Security or GitHub Advanced Security must be enabled for this repository to use code scanning\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/advanced-security-must-be-enabled)\n\n  If you see this error, make sure that GitHub Code Security is enabled.\n\n* [\"Out of disk\" and \"Out of memory\" errors](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/out-of-disk-or-memory)\n\n  If you see one of these errors with GitHub Actions, you can try alternative runners.\n\n* [Error: 403 \"Resource not accessible by integration\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/resource-not-accessible)\n\n  This error may be seen on pull requests created by Dependabot and can be resolved in a couple of different ways.\n\n* [Error: \"is not a .ql file, .qls file, a directory, or a query pack specification\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/not-recognized)\n\n  CodeQL was unable to locate one of the queries or sets of queries that are specified for analysis.\n\n* [Error: \"No source code was seen during the build\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/no-source-code-seen-during-build)\n\n  When CodeQL fails to find any source code, you need to resolve this problem to unblock code scanning analysis.\n\n* [Error: \"Server error\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/server-error)\n\n  If you see this error, it may be transient. Check the current GitHub Actions service status, and try running your workflow again.\n\n* [Extraction errors in the database](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/extraction-errors-in-the-database)\n\n  You can check whether or not extraction errors affect the health of the CodeQL database created.\n\n* [Logs are not detailed enough](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/logs-not-detailed-enough)\n\n  Increase log verbosity and generate debugging artifacts when logs lack diagnostic detail.\n\n* [Results are different than expected](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/results-different-than-expected)\n\n  If your code scanning results are different than you expected, you can check which configurations are active.\n\n* [Some languages were not analyzed with CodeQL advanced setup](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/some-languages-not-analyzed)\n\n  If some languages were not analyzed, you can modify your code scanning workflow to add a matrix specifying the languages you want to analyze.\n\n* [Two CodeQL workflows](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/two-codeql-workflows)\n\n  If you see two workflows named \"CodeQL\", one workflow may be a pre-existing CodeQL workflow file which has been disabled by default setup.\n\n* [Unclear what triggered a workflow run](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/unclear-what-triggered-a-workflow)\n\n  If you don't know what triggered an analysis, investigate the tool status page or look at the log for the last scan.\n\n* [Warning: \"1 issue was detected with this workflow: git checkout HEAD^2 is no longer necessary\"](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/unnecessary-step-found)\n\n  If you see this warning, you should update your workflow to follow current best practice.\n\n* [Warning: Detected X Kotlin files in your project that could not be processed without a build](/en/enterprise-cloud@latest/code-security/reference/code-scanning/troubleshoot-analysis-errors/kotlin-detected-in-no-build)\n\n  CodeQL databases can be created for Java without building the code, but Kotlin files are excluded unless the code is built."}