You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow to specify the relevant threat model when running a query #4027
Is your feature request related to a problem? Please describe.
The codeql CLI interface offers the option to specify a threat model by e.g. using the --threat-model local flag.
However, as far as I'm aware, there is not such feature in the IDE itself to configure the threat model.
Describe the solution you'd like
Either:
add a dropdown when running a query using CodeQL: Run Query on Selected Database where the user has to select the threat model every time they run a query
add a global config option to the plugin (could be problematic when different languages potentially support different threat models)
add a new CodeQL: Run Query on Selected Database with Thread Model option.
add a "Set Threat Model" for database command.
Describe alternatives you've considered
Run the query on the db using codeql database analyze yada yada yada --threat-model local.
However, looking at the result in SARIF isn't as nice as looking at the result of the CodeQL extension directly in the IDE.
Hi @intrigus-lgtm. Thank you for this feature request. Resolving this through the extension is not a current product priority, but one way to achieve this would be to use a CodeQL configuration file and set the threat model setting there. Is this an acceptable workaround for you?
Activity
charisk commentedon May 12, 2025
Hi @intrigus-lgtm. Thank you for this feature request. Resolving this through the extension is not a current product priority, but one way to achieve this would be to use a CodeQL configuration file and set the threat model setting there. Is this an acceptable workaround for you?
intrigus-lgtm commentedon May 14, 2025
Hi @charisk this is not really an acceptable workaround.
AFAIK, the CodeQL configuration file is global and cannot apply to individual databases.
charisk commentedon May 15, 2025
Understood. We will track this feature request for future consideration.