# CodeQL queries[¶](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries) CodeQL queries are used in code scanning analyses to find problems in source code, including potential security vulnerabilities. > CodeQL查询用于代码扫描分析,以发现源代码中的问题,包括潜在的安全漏洞。 * [About CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/): CodeQL queries are used to analyze code for issues related to security, correctness, maintainability, and readability. > 关于CodeQL查询。CodeQL查询用于分析代码的安全性、正确性、可维护性和可读性等相关问题。 * [Metadata for CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/): Metadata tells users important information about CodeQL queries. You must include the correct query metadata in a query to be able to view query results in source code. > CodeQL查询的元数据。元数据告诉用户有关CodeQL查询的重要信息。您必须在查询中包含正确的查询元数据,才能在源代码中查看查询结果。 * [Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/): Query help files tell users the purpose of a query, and recommend how to solve the potential problem the query finds. > 查询帮助文件。查询帮助文件告诉用户查询的目的,并推荐如何解决查询发现的潜在问题。 * [Defining the results of a query](https://codeql.github.com/docs/writing-codeql-queries/defining-the-results-of-a-query/): You can control how analysis results are displayed in source code by modifying a query’s `select` statement. > 定义查询的结果。通过修改查询的选择语句,可以控制分析结果在源代码中的显示方式。 * [Providing locations in CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/): CodeQL includes mechanisms for extracting the location of elements in a codebase. Use these mechanisms when writing custom CodeQL queries and libraries to help display information to users. > 在CodeQL查询中提供位置。CodeQL包括提取代码库中元素位置的机制。在编写自定义的CodeQL查询和库时,使用这些机制来帮助向用户显示信息。 * [About data flow analysis](https://codeql.github.com/docs/writing-codeql-queries/about-data-flow-analysis/): Data flow analysis is used to compute the possible values that a variable can hold at various points in a program, determining how those values propagate through the program and where they are used. > 关于数据流分析。数据流分析用于计算一个变量在程序中不同点可能持有的值,确定这些值如何在程序中传播,以及在哪里使用。 * [Creating path queries](https://codeql.github.com/docs/writing-codeql-queries/creating-path-queries/): You can create path queries to visualize the flow of information through a codebase. > 创建路径查询。您可以创建路径查询来可视化信息在代码库中的流动。 * [Troubleshooting query performance](https://codeql.github.com/docs/writing-codeql-queries/troubleshooting-query-performance/): Improve the performance of your CodeQL queries by following a few simple guidelines. > 解决查询性能问题。通过遵循一些简单的准则来提高CodeQL查询的性能。