About this error
Upload with CodeQL results rejected due to "default setup"
This error is reported if a process attempts to upload a SARIF file containing results of CodeQL analysis to a repository where CodeQL default setup is enabled. This includes uploads using the REST API and the CodeQL CLI. SARIF uploads are blocked when CodeQL default setup is enabled to reduce the potential for users to be confused by seeing similar code scanning alerts generated by different systems.
You will only see this error for SARIF files that contain results created using CodeQL.
Confirming the cause of the error
-
GitHub で、リポジトリのメイン ページに移動します。
-
リポジトリ名の下にある [Settings] をクリックします。 [設定] タブが表示されない場合は、 [] ドロップダウン メニューを選び、 [設定] をクリックします。
![タブを示すリポジトリ ヘッダーのスクリーンショット。 [設定] タブが濃いオレンジ色の枠線で強調表示されています。](/assets/cb-28260/images/help/repository/repo-actions-settings.png)
-
サイドバーの [Security] セクションで、[ Advanced Security] をクリックします。
-
In the "Code Security" section of the page, next to "CodeQL analysis," click .
-
If there is a Switch to advanced option, default setup is enabled for the repository.
Fixing the problem
Before you can fix the problem, you need to decide whether code scanning alerts from CodeQL analysis in this repository should be generated using default setup or uploaded from SARIF files.
Continuing to generate alerts using default setup
- Leave the repository settings as they are, with default setup enabled.
- Disable the process or processes that tried to upload SARIF files to the repository.
Disabling default setup to unblock SARIF upload
- In the "Code scanning" section of the page, next to "CodeQL analysis," from the menu select Disable CodeQL.
- プロセスを再実行して SARIF ファイルをアップロードします。 SARIF ファイルが code scanning の要件を満たしている場合は、成功するはずです。 検証と code scanning がサポートする形式については「SARIF support for code scanning」を参照してください。