Dark Mode

Skip to main content

Rust queries for CodeQL analysis

Explore the queries that CodeQL uses to analyze code written in Rust when you select the default or the security-extended query suite.

Who can use this feature?

CodeQL is available for the following repository types:

CodeQL includes many queries for analyzing Rust code. All queries in the default query suite are run by default. If you choose to use the security-extended query suite, additional queries are run. For more information, see CodeQL query suites.

Built-in queries for Rust analysis

This table lists the queries available with the latest release of the CodeQL action and CodeQL CLI. For more information, see CodeQL change logs in the CodeQL documentation site.

Query nameRelated CWEsDefaultExtendedCopilot Autofix
'Secure' attribute is not set to true319, 614
Access of invalid pointer476, 825
Cleartext logging of sensitive information312, 359, 532
Cleartext storage of sensitive information in a database312
Cleartext transmission of sensitive information319
Cross-site scripting079, 116
Database query built from user-controlled sources089
Disabled TLS certificate check295
Failure to use HTTPS URLs319, 345
Hard-coded cryptographic value259, 321, 798, 1204
Regular expression injection020, 074
Server-side request forgery918
Uncontrolled allocation size770, 789
Uncontrolled data used in path expression022, 023, 036, 073, 099
Use of a broken or weak cryptographic algorithm327
Use of a broken or weak cryptographic hashing algorithm on sensitive data327, 328, 916
Access of a pointer after its lifetime has ended825
Log injection117