Search code examples
github-actionscodeql

CodeQL analysis TRAP import


On CodeQL analysis, I faced the below issue with

Dataset codeql_databases/go/db-go has been finalized and does not support further TRAP import.

The github/codeql-action/init is used for the creation of database, as per the documentation this is actually not a database, but a directory that contains databases.

Tried cleaning up but doesn't help.


Solution

  • Found out like since the action is running on a self-hosted runner, and somehow the codeql_database got corrupted. Fixed this by clearing the codeql_database location and recreating this from initially as a result the database finalizes correctly now.