diff --git a/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md b/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md index da945c452769..26ad41b9b06c 100644 --- a/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md +++ b/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md @@ -74,7 +74,7 @@ You can display the command-line help for any command using the `--help``--db-cluster` | {% octicon "x" aria-label="Optional" %} | Use in multi-language codebases to generate one database for each language specified by `--language`. | `--no-run-unnecessary-builds` | {% octicon "x" aria-label="Optional" %} | **Recommended.** Use to suppress the build command for languages where the {% data variables.product.prodname_codeql_cli %} does not need to monitor the build (for example, Python and JavaScript/TypeScript). | `--source-root` | {% octicon "x" aria-label="Optional" %} | Use if you run the CLI outside the checkout root of the repository. By default, the `database create` command assumes that the current directory is the root directory for the source files, use this option to specify a different location. | -| `--codescanning-config` | {% octicon "x" aria-label="Optional" %} | Advanced. Use if you have a configuration file that specifies how to create the {% data variables.product.prodname_codeql %} databases and what queries to run in later steps. For more information, see "[AUTOTITLE](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning#using-a-custom-configuration-file)" and "[database create](https://codeql.github.com/docs/codeql-cli/manual/database-create/#cmdoption-codeql-database-create-codescanning-config)." | +| `--codescanning-config` | {% octicon "x" aria-label="Optional" %} | Advanced. Use if you have a configuration file that specifies how to create the {% data variables.product.prodname_codeql %} databases and what queries to run in later steps. For more information, see "[AUTOTITLE](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning#using-a-custom-configuration-file)" and "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-create#--codescanning-configfile)." | For more information, see "[AUTOTITLE](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases)." @@ -204,7 +204,7 @@ When you have decided on the most secure and reliable method for your CI server, | `--github-url` | {% octicon "check" aria-label="Required" %} | Specify the URL for {% data variables.product.product_name %}.{% endif %} | `--github-auth-stdin` | {% octicon "x" aria-label="Optional" %} | Use to pass the CLI the {% data variables.product.prodname_github_app %} or {% data variables.product.pat_generic %} created for authentication with {% data variables.product.company_short %}'s REST API via standard input. This is not needed if the command has access to a `GITHUB_TOKEN` environment variable set with this token. -For more information, see [github upload-results](https://codeql.github.com/docs/codeql-cli/manual/github-upload-results/) in the documentation for the {% data variables.product.prodname_codeql_cli %}. +For more information, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/github-upload-results/)." ### Basic example of uploading results to {% data variables.product.product_name %} diff --git a/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs.md b/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs.md index 2bdbfdc49896..c8a515df9b75 100644 --- a/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs.md +++ b/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs.md @@ -26,7 +26,7 @@ There are two types of {% data variables.product.prodname_codeql %} packs: query - Library packs are designed to be used by query packs (or other library packs) and do not contain queries themselves. The libraries are not compiled {% ifversion query-pack-compatibility %}separately{% else %}and there is no compilation cache included when the pack is published{% endif %}. -You can use the package management commands in the {% data variables.product.prodname_codeql_cli %} to create {% data variables.product.prodname_codeql %} packs, add dependencies to packs, and install or update dependencies. For more information, see “[Creating and working with {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs#creating-and-working-with-codeql-packs).” You can also publish and download {% data variables.product.prodname_codeql %} packs using the {% data variables.product.prodname_codeql_cli %}. For more information, see “[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs).” +You can use the package management commands in the {% data variables.product.prodname_codeql_cli %} to create {% data variables.product.prodname_codeql %} packs, add dependencies to packs, and install or update dependencies. For more information, see "[Creating and working with {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs#creating-and-working-with-codeql-packs)." You can also publish and download {% data variables.product.prodname_codeql %} packs using the {% data variables.product.prodname_codeql_cli %}. For more information, see "[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs)." The standard {% data variables.product.prodname_codeql %} packages for all supported languages are published in the [{% data variables.product.prodname_container_registry %}](https://github.com/orgs/codeql/packages). The [{% data variables.product.prodname_codeql %} repository](https://github.com/github/codeql) contains source files for the standard {% data variables.product.prodname_codeql %} packs for all supported languages. @@ -125,7 +125,7 @@ The following properties are supported in `qlpack.yml` files. #### `suites` - Optional for packs that define query suites. -- Defines the path to a directory in the pack that contains the query suites you want to make known to the {% data variables.product.prodname_codeql_cli %}, defined relative to the pack directory. {% data variables.product.prodname_codeql %} pack users can run “well-known” suites stored in this directory by specifying the pack name, without providing their full path. This is not supported for {% data variables.product.prodname_codeql %} packs downloaded from the Container registry. For more information about query suites, see “[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites).” For example: +- Defines the path to a directory in the pack that contains the query suites you want to make known to the {% data variables.product.prodname_codeql_cli %}, defined relative to the pack directory. {% data variables.product.prodname_codeql %} pack users can run "well-known" suites stored in this directory by specifying the pack name, without providing their full path. This is not supported for {% data variables.product.prodname_codeql %} packs downloaded from the Container registry. For more information about query suites, see "[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)." For example: ```yaml suites: octo-org-query-suites ``` @@ -139,7 +139,7 @@ The following properties are supported in `qlpack.yml` files. #### `extractor` - Required by all packs containing {% data variables.product.prodname_codeql %} tests. -- Defines the {% data variables.product.prodname_codeql %} language extractor to use when running the {% data variables.product.prodname_codeql %} tests in the pack. For more information about testing queries, see “[Testing custom queries](/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries).” For example: +- Defines the {% data variables.product.prodname_codeql %} language extractor to use when running the {% data variables.product.prodname_codeql %} tests in the pack. For more information about testing queries, see "[Testing custom queries](/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries)." For example: ```yaml extractor: javascript ``` @@ -210,13 +210,13 @@ dependencies: version: 1.2.4 ``` -The `codeql/cpp-all` dependency is locked to version 0.1.4. The `my-user/my-lib` dependency is locked to version 0.2.4. The `my-user/transitive-dependency`, which is a transitive dependency and is not specified in the `qlpack.yml` file, is locked to version 1.2.4. The `other-dependency/from-source` is absent from the lock file since it is resolved from source. This dependency must be available in the same {% data variables.product.prodname_codeql %} workspace as the pack. For more information about {% data variables.product.prodname_codeql %} workspaces and resolving dependencies from source, see “[About {% data variables.product.prodname_codeql %} Workspaces](/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces).” +The `codeql/cpp-all` dependency is locked to version 0.1.4. The `my-user/my-lib` dependency is locked to version 0.2.4. The `my-user/transitive-dependency`, which is a transitive dependency and is not specified in the `qlpack.yml` file, is locked to version 1.2.4. The `other-dependency/from-source` is absent from the lock file since it is resolved from source. This dependency must be available in the same {% data variables.product.prodname_codeql %} workspace as the pack. For more information about {% data variables.product.prodname_codeql %} workspaces and resolving dependencies from source, see "[About {% data variables.product.prodname_codeql %} Workspaces](/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces)." In most cases, the `codeql-pack.lock.yml` file is only relevant for query packs since library packs are non-executable and usually do not need their transitive dependencies to be fixed. The exception to this is for library packs that contain tests. In this case, the `codeql-pack.lock.yml` file is used to ensure that the tests are always run with the same versions of dependencies to avoid spurious failures when there are mismatched dependencies. ## Examples of custom {% data variables.product.prodname_codeql %} packs -When you write custom queries or tests, you should save them in custom {% data variables.product.prodname_codeql %} packs. For simplicity, try to organize each pack logically. For more information, see “[{% data variables.product.prodname_codeql %} pack structure](#codeql-pack-structure).” Save files for queries and tests in separate packs and, where possible, organize custom packs into specific folders for each target language. This is particuarly useful if you intend to publish your {% data variables.product.prodname_codeql %} packs so they can be shared with others or used in code scanning. For more information, see "[AUTOTITLE](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)." +When you write custom queries or tests, you should save them in custom {% data variables.product.prodname_codeql %} packs. For simplicity, try to organize each pack logically. For more information, see "[{% data variables.product.prodname_codeql %} pack structure](#codeql-pack-structure)." Save files for queries and tests in separate packs and, where possible, organize custom packs into specific folders for each target language. This is particuarly useful if you intend to publish your {% data variables.product.prodname_codeql %} packs so they can be shared with others or used in code scanning. For more information, see "[AUTOTITLE](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)." ### {% data variables.product.prodname_codeql %} packs for custom libraries @@ -249,7 +249,7 @@ suites: my-custom-suites where `codeql/cpp-all` is the name of the {% data variables.product.prodname_codeql %} pack for C/C++ analysis included in the {% data variables.product.prodname_codeql %} repository. The version range `^0.1.2` indicates that this pack is compatible with all versions of `codeql/cpp-all` that are greater than or equal to `0.1.2` and less than `0.2.0`. `my-github-user/my-custom-libraries` is the name of a {% data variables.product.prodname_codeql %} pack containing custom {% data variables.product.prodname_codeql %} libraries for C++. Any {% data variables.product.prodname_codeql %} library file (a file with a `.qll` extension) defined in this pack will be available to queries in the `my-github-user/my-custom-queries` pack. -The `suites` property indicates a directory where “well-known” query suites can be found. These suites can be used on the command line by referring to their name only, rather than their full path. For more information about query suites, see “[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites).” +The `suites` property indicates a directory where "well-known" query suites can be found. These suites can be used on the command line by referring to their name only, rather than their full path. For more information about query suites, see "[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)." ### {% data variables.product.prodname_codeql %} packs for custom tests @@ -259,7 +259,7 @@ databases. You may also wish to specify the `tests` property. {% data reusables.codeql-cli.test-qlpack %} -For more information about running tests, see “[Testing custom queries](/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries).” +For more information about running tests, see "[Testing custom queries](/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries)." ## Examples of {% data variables.product.prodname_codeql %} packs in the {% data variables.product.prodname_codeql %} repository @@ -311,9 +311,9 @@ defaultSuiteFile: codeql-suites/cpp-code-scanning.qls Some extra notes on the following properties: -* `dependencies`: This query pack depends on `codeql/cpp-all` and `codeql/suite-helpers`. Since these dependencies are resolved from source, it does not matter what version of the {% data variables.product.prodname_codeql %} pack they are compatible with. For more information about resolving dependencies from source, see “[Source Dependencies](/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces#source-dependencies).” +* `dependencies`: This query pack depends on `codeql/cpp-all` and `codeql/suite-helpers`. Since these dependencies are resolved from source, it does not matter what version of the {% data variables.product.prodname_codeql %} pack they are compatible with. For more information about resolving dependencies from source, see "[Source Dependencies](/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces#source-dependencies)." -* `suites`: Indicates the directory containing “well-known” query suites. +* `suites`: Indicates the directory containing "well-known" query suites. * `defaultSuiteFile`: The name of the default query suite file that is used when no query suite is specified. diff --git a/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces.md b/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces.md index 1bdeb88d21d8..73088440d9f3 100644 --- a/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces.md +++ b/content/code-security/codeql-cli/codeql-cli-reference/about-codeql-workspaces.md @@ -16,7 +16,7 @@ topics: {% data reusables.code-scanning.codeql-action-version-ghes %} -You use a {% data variables.product.prodname_codeql %} workspace when you want to group multiple {% data variables.product.prodname_codeql %} packs together. A typical use case for a {% data variables.product.prodname_codeql %} workspace is to develop a set of {% data variables.product.prodname_codeql %} library and query packs that are mutually dependent. For more information on {% data variables.product.prodname_codeql %} packs, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs).” +You use a {% data variables.product.prodname_codeql %} workspace when you want to group multiple {% data variables.product.prodname_codeql %} packs together. A typical use case for a {% data variables.product.prodname_codeql %} workspace is to develop a set of {% data variables.product.prodname_codeql %} library and query packs that are mutually dependent. For more information on {% data variables.product.prodname_codeql %} packs, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)." The main benefit of a {% data variables.product.prodname_codeql %} workspace is that it makes it easier for you to develop and maintain multiple {% data variables.product.prodname_codeql %} packs. When you use a {% data variables.product.prodname_codeql %} workspace, all the {% data variables.product.prodname_codeql %} packs in the workspace are available as *source dependencies* for each other when you run a {% data variables.product.prodname_codeql %} command that resolves queries. This makes it easier to develop, maintain, and publish multiple, related {% data variables.product.prodname_codeql %} packs. @@ -30,9 +30,9 @@ A {% data variables.product.prodname_codeql %} workspace is defined by a `codeql * The `ignore` block contains a list of glob patterns that define {% data variables.product.prodname_codeql %} packs that are not available in the workspace. -* The `registries` block contains a list of GHES URLs and package patterns that control which container registry is used for publishing {% data variables.product.prodname_codeql %} packs. For more information, see “[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs#working-with-codeql-packs-on-ghes)." +* The `registries` block contains a list of GHES URLs and package patterns that control which container registry is used for publishing {% data variables.product.prodname_codeql %} packs. For more information, see "[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs#working-with-codeql-packs-on-ghes)." -Each entry in the `provide` or `ignore` section must map to the location of a `qlpack.yml` file. All glob patterns are defined relative to the directory that contains the workspace file. For a list of patterns accepted in this file, see “[@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) .” +Each entry in the `provide` or `ignore` section must map to the location of a `qlpack.yml` file. All glob patterns are defined relative to the directory that contains the workspace file. For a list of patterns accepted in this file, see "[@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) ." For example, the following `codeql-workspace.yml` file defines a workspace that contains all the {% data variables.product.prodname_codeql %} packs recursively found in the `codeql-packs` directory, except for the packs in the `experimental` directory. The `registries` block specifies that `codeql/\*` packs should be downloaded from `https://ghcr.io/v2/`, which is {% data variables.product.prodname_dotcom %}’s default container registry. All other packs should be downloaded from and published to the registry at `GHE_HOSTNAME`. @@ -64,7 +64,7 @@ This is particularly useful in the following situations: ## {% data variables.product.prodname_codeql %} workspaces and query resolution -All {% data variables.product.prodname_codeql %} packs in a workspace are available as source dependencies for each other when you run any {% data variables.product.prodname_codeql %} command that resolves queries or packs. For example, when you run `codeql pack install` in a pack directory in a workspace, any dependency that can be found in the workspace will be used instead of downloading that dependency to the package cache and adding it to the `codeql-pack.lock.yml` file. For more information, see “[Creating and working with {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs#adding-and-installing-dependencies).” +All {% data variables.product.prodname_codeql %} packs in a workspace are available as source dependencies for each other when you run any {% data variables.product.prodname_codeql %} command that resolves queries or packs. For example, when you run `codeql pack install` in a pack directory in a workspace, any dependency that can be found in the workspace will be used instead of downloading that dependency to the package cache and adding it to the `codeql-pack.lock.yml` file. For more information, see "[Creating and working with {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs#adding-and-installing-dependencies)." Similarly, when you publish a {% data variables.product.prodname_codeql %} query pack to the {% data variables.product.prodname_dotcom %} container registry using `codeql pack publish` the command will always use the dependencies from the workspace instead of using dependencies found in the local package cache. diff --git a/content/code-security/codeql-cli/codeql-cli-reference/exit-codes.md b/content/code-security/codeql-cli/codeql-cli-reference/exit-codes.md index 685da33073fc..9631a0dfb444 100644 --- a/content/code-security/codeql-cli/codeql-cli-reference/exit-codes.md +++ b/content/code-security/codeql-cli/codeql-cli-reference/exit-codes.md @@ -26,9 +26,9 @@ Success, normal termination. ## 1 -The command successfully determined that the answer to your question is “no”. +The command successfully determined that the answer to your question is "no". -This exit code is only used by a few commands, such as [codeql test run](https://codeql.github.com/docs/codeql-cli/manual/test-run/), [codeql database check](https://codeql.github.com/docs/codeql-cli/manual/dataset-check/), [codeql query format](https://codeql.github.com/docs/codeql-cli/manual/query-format/),and [codeql resolve extractor](https://codeql.github.com/docs/codeql-cli/manual/resolve-extractor/). +This exit code is only used by a few commands, such as "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/test-run/)", "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/dataset-check/)", "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/query-format/)",and "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/resolve-extractor/)." For more details, see the documentation for those commands. ## 2 @@ -46,7 +46,7 @@ In this case, the launcher can’t start the Java code for the {% data variables ## 32 -The extractor didn’t find any code to analyze when running [codeql database create](https://codeql.github.com/docs/codeql-cli/manual/database-create/) or [codeql database finalize](https://codeql.github.com/docs/codeql-cli/manual/database-finalize/). +The extractor didn’t find any code to analyze when running "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-create/)" or "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-finalize/)." ## 33 diff --git a/content/code-security/codeql-cli/codeql-cli-reference/sarif-output.md b/content/code-security/codeql-cli/codeql-cli-reference/sarif-output.md index 16140598c3fe..0dc8b97440c3 100644 --- a/content/code-security/codeql-cli/codeql-cli-reference/sarif-output.md +++ b/content/code-security/codeql-cli/codeql-cli-reference/sarif-output.md @@ -19,7 +19,7 @@ topics: ## About SARIF output SARIF is designed to represent the output of a broad range of static analysis tools, and there are many features in the SARIF specification that are -considered “optional”. This document details the output produced when using the format type `sarifv2.1.0`, which corresponds to the SARIF v2.1.0.csd1 specification. For more information on selecting a file format for your analysis results, see the [database analyze](https://codeql.github.com/docs/codeql-cli/manual/database-analyze/) command in the {% data variables.product.prodname_codeql %} documentation. +considered "optional". This document details the output produced when using the format type `sarifv2.1.0`, which corresponds to the SARIF v2.1.0.csd1 specification. For more information on selecting a file format for your analysis results, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-analyze/)." ## SARIF specification and schema @@ -78,9 +78,9 @@ This details each SARIF component that may be generated, along with any specific | JSON property name| Always generated?| Notes| |-----------------------|---------------------|-----| -| `name`| {% octicon "check" aria-label="Always" %}| Set to “{% data variables.product.prodname_codeql %} command-line toolchain” for output from the {% data variables.product.prodname_codeql_cli %} tools. Note, if the output was generated using a different tool a different `name` is reported, and the format may not be as described here.| -| `organization`| {% octicon "check" aria-label="Always" %}| Set to “GitHub”.| -| `version`| {% octicon "check" aria-label="Always" %}| Set to the {% data variables.product.prodname_codeql %} release version e.g. “2.0.0”.| +| `name`| {% octicon "check" aria-label="Always" %}| Set to "{% data variables.product.prodname_codeql %} command-line toolchain" for output from the {% data variables.product.prodname_codeql_cli %} tools. Note, if the output was generated using a different tool a different `name` is reported, and the format may not be as described here.| +| `organization`| {% octicon "check" aria-label="Always" %}| Set to "GitHub".| +| `version`| {% octicon "check" aria-label="Always" %}| Set to the {% data variables.product.prodname_codeql %} release version e.g. "2.0.0".| | `rules`| {% octicon "check" aria-label="Always" %}| An array of `reportingDescriptor` objects that represent rules. This array will contain, at a minimum, all the rules that were run during this analysis, but may contain rules which were available but not run. For more detail about enabling queries, see `defaultConfiguration`.| ### `reportingDescriptor` object (for rule) @@ -119,7 +119,7 @@ The composition of the results is dependent on the options provided to CodeQL. B |-----------------------|--------------------|------| | `ruleId`| {% octicon "check" aria-label="Always" %}| See the description of the `id` property in `reportingDescriptor` object (for rule) .| | `ruleIndex`| {% octicon "check" aria-label="Always" %}| None | -| `message`| {% octicon "check" aria-label="Always" %}| A message describing the problem(s) occurring at this location. This message may be a SARIF “Message with placeholder”, containing links that refer to locations in the `relatedLocations` property.| +| `message`| {% octicon "check" aria-label="Always" %}| A message describing the problem(s) occurring at this location. This message may be a SARIF "Message with placeholder", containing links that refer to locations in the `relatedLocations` property.| | `locations`| {% octicon "check" aria-label="Always" %}| An array containing a single `location` object.| | `partialFingerprints`| {% octicon "check" aria-label="Always" %}| A dictionary from named fingerprint types to the fingerprint. This will contain, at a minimum, a value for the `primaryLocationLineHash`, which provides a fingerprint based on the context of the primary location.| | `codeFlows`| {% octicon "x" aria-label="Optionally" %}| This array may be populated with one or more `codeFlow` objects if the query that defines the rule for this result is of `@kind path-problem`.| diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/about-the-codeql-cli.md b/content/code-security/codeql-cli/using-the-codeql-cli/about-the-codeql-cli.md index 59fda462c3e1..4176a26a101a 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/about-the-codeql-cli.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/about-the-codeql-cli.md @@ -30,7 +30,7 @@ source community - Develop and test custom {% data variables.product.prodname_codeql %} queries to use in your own analyses For information about using the {% data variables.product.prodname_codeql_cli %}, see -“[Getting started with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli).” +"[Getting started with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli)." ## About the {% data variables.product.prodname_dotcom %} {% data variables.product.prodname_codeql %} license @@ -42,7 +42,7 @@ For information about using the {% data variables.product.prodname_codeql_cli %} - To demonstrate the software. - To test {% data variables.product.prodname_codeql %} queries that are released under an OSI-approved License to confirm that new versions of those queries continue to find the right vulnerabilities. -Where “OSI-approved License” means an Open Source Initiative (OSI)-approved open source software license. +Where "OSI-approved License" means an Open Source Initiative (OSI)-approved open source software license. If you are working with an Open Source Codebase (that is, a codebase that is released under an OSI-approved License) you can also use {% data variables.product.prodname_codeql %} for the following tasks: @@ -60,5 +60,5 @@ command line. To run a command, use: codeql [command] [subcommand] ``` -To view the reference documentation for a command, add the `--help` flag, or visit the -"[{% data variables.product.prodname_codeql_cli %} manual](https://codeql.github.com/docs/codeql-cli/manual/)." +To view the reference documentation for a command, add the `--help` flag, or see +"[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual)." diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli.md b/content/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli.md index 30d712c7536a..c41a02e26996 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli.md @@ -24,7 +24,7 @@ To analyze a codebase, you run queries against a CodeQL database extracted from the code. {% data variables.product.prodname_codeql %} analyses produce [interpreted results](https://codeql.github.com/docs/codeql-overview/about-codeql/#interpret-query-results) that can be displayed as alerts or paths in source code. -For information about writing queries to run with `database analyze`, see “[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli).” +For information about writing queries to run with `database analyze`, see "[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli)." {% note %} @@ -33,16 +33,16 @@ For information about writing queries to run with `database analyze`, see “[Us Queries run with `database analyze` have strict [metadata requirements](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli#including-query-metadata). You can also execute queries using the following plumbing-level subcommands: -* [`database run-queries`](https://codeql.github.com/docs/codeql-cli/manual/database-run-queries/), which +* [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-run-queries/), which outputs non-interpreted results in an intermediate binary format called [BQRS](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#bqrs-file) -* [`query run`](https://codeql.github.com/docs/codeql-cli/manual/query-run/), which will output BQRS files, or print +* [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/query-run/), which will output BQRS files, or print results tables directly to the command line. Viewing results directly in the command line may be useful for iterative query development using the CLI. Queries run with these commands don't have the same metadata requirements. However, to save human-readable data you have to process each BQRS results -file using the [`bqrs decode`](https://codeql.github.com/docs/codeql-cli/manual/bqrs-decode/) plumbing +file using the [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode/) plumbing subcommand. Therefore, for most use cases it's easiest to use `database analyze` to directly generate interpreted results. @@ -80,7 +80,7 @@ You must specify: * `--format`: the format of the results file generated during analysis. A number of different formats are supported, including CSV, [SARIF](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#sarif-file), and graph formats. For more information about CSV and SARIF, see [Results](#results). To find out which other results formats are -supported, see the [database analyze reference](https://codeql.github.com/docs/codeql-cli/manual/database-analyze/). +supported, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-analyze/)." * `--output`: the output path of the results file generated during analysis. You can also specify: @@ -94,7 +94,7 @@ is a list of arguments, where each argument can be: * with an optional version range * with an optional path to a query, directory, or query suite inside the pack - If omitted, the default query suite for the language of the analyzed database will be used. For the complete syntax of query specifiers, see “Specifying which queries to run in a {% data variables.product.prodname_codeql %} pack”. + If omitted, the default query suite for the language of the analyzed database will be used. For the complete syntax of query specifiers, see "[Specifying which queries to run in a {% data variables.product.prodname_codeql %} pack](#specifying-which-queries-to-run-in-a-codeql-pack)." * `--sarif-category`: an identifying category for the results. Used when you want to upload more than one set of results for a commit. @@ -104,7 +104,7 @@ language to the {% data variables.product.prodname_dotcom %} code scanning API. * `--sarif-add-query-help`: (supported in version 2.7.1 onwards) adds any custom query help written in markdown to SARIF files (v2.1.0 or later) generated by the analysis. Query help stored in `.qhelp` files must be converted to `.md` before running the analysis. For further information, -see “Including query help for custom {% data variables.product.prodname_codeql %} queries in SARIF files.” +see "[Including query help for custom {% data variables.product.prodname_codeql %} queries in SARIF files](#including-query-help-for-custom-codeql-queries-in-sarif-files)." * `--download`: a boolean flag that will allow the CLI to download any referenced {% data variables.product.prodname_codeql %} packages that are not available locally. If this flag is missing and a referenced {% data variables.product.prodname_codeql %} package is not available locally, the command will fail. @@ -122,8 +122,7 @@ required upgrades. Explicitly running the upgrade command is not necessary. {% endnote %} -For full details of all the options you can use when analyzing databases, see -the [database analyze reference documentation](https://codeql.github.com/docs/codeql-cli/manual/database-analyze/). +For full details of all the options you can use when analyzing databases, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-analyze/)." ## Specifying which queries to run in a {% data variables.product.prodname_codeql %} pack @@ -209,7 +208,7 @@ pack names: codeql database analyze microsoft/coding-standards@1.0.0 github/security-queries --format=sarifv2.1.0 --output=query-results.sarif --download ``` -This command runs the default query suite of two {% data variables.product.prodname_codeql %} query packs: `microsoft/coding-standards` version 1.0.0 and the latest version of `github/security-queries` on the specified database. For further information about default suites, see “[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs)”. +This command runs the default query suite of two {% data variables.product.prodname_codeql %} query packs: `microsoft/coding-standards` version 1.0.0 and the latest version of `github/security-queries` on the specified database. For further information about default suites, see "[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs)." The `--download` flag is optional. Using it will ensure the query pack is downloaded if it isn’t yet available locally. {% endif %} @@ -238,7 +237,7 @@ codeql database analyze ../ql/javascript/ql/src/Declaratio You can also run your own custom queries with the `database analyze` command. For more information about preparing your queries to use with the {% data variables.product.prodname_codeql_cli %}, -see “[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli).” +see "[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli)." ### Running all queries in a directory @@ -355,7 +354,7 @@ or "[AUTOTITLE](/rest/code-scanning)". based on certain metadata properties. The standard {% data variables.product.prodname_codeql %} packs have metadata that specify the location of the query suites used by code scanning, so the {% data variables.product.prodname_codeql_cli %} knows where to find these suite files automatically, and you don’t have to specify the full path on the command line. -For more information, see “[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)". +For more information, see "[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)." For information about creating custom query suites, see "[AUTOTITLE](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)." @@ -368,7 +367,7 @@ If the analysis found fewer results for standard queries than you expected, revi ### Integrating a {% data variables.product.prodname_codeql %} pack into a code scanning workflow in {% data variables.product.prodname_dotcom %} You can use {% data variables.product.prodname_codeql %} query packs in your code scanning setup. This allows you to select query packs published by various sources and use them to analyze your code. -For more information, see “[Using {% data variables.product.prodname_codeql %} query packs in the {% data variables.product.prodname_codeql %} action](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning#using-codeql-query-packs/)” or “[Downloading and using {% data variables.product.prodname_codeql %} query packs in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#downloading-and-using-codeql-query-packs).” +For more information, see "[Using {% data variables.product.prodname_codeql %} query packs in the {% data variables.product.prodname_codeql %} action](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning#using-codeql-query-packs/)" or "[Downloading and using {% data variables.product.prodname_codeql %} query packs in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#downloading-and-using-codeql-query-packs)." ### Including query help for custom {% data variables.product.prodname_codeql %} queries in SARIF files @@ -387,8 +386,8 @@ corresponding query. Alternatively, for consistency with the standard {% data va you can write query help in the `.qhelp` format. Query help written in `.qhelp` files can’t be included in SARIF files, and they can’t be processed by code scanning so must be converted to markdown before running -the analysis. For more information, see [“Query help files”](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/#query-help-files) -and “[Testing query help files](/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files).” +the analysis. For more information, see ["Query help files"](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/#query-help-files) +and "[Testing query help files](/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files)." ## Results @@ -420,4 +419,4 @@ IDE. ## Further reading -* [“Analyzing your projects in {% data variables.product.prodname_codeql %} for VS Code”](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects) +* ["Analyzing your projects in {% data variables.product.prodname_codeql %} for VS Code"](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects) diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs.md b/content/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs.md index 05e9c96e987b..9a073ff6f0dd 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/creating-and-working-with-codeql-packs.md @@ -26,10 +26,10 @@ There are two types of {% data variables.product.prodname_codeql %} packs: query - Library packs are designed to be used by query packs (or other library packs) and do not contain queries themselves. The libraries are not compiled {% ifversion query-pack-compatibility %}separately{% else %}and there is no compilation cache included when the pack is published{% endif %}. -You can use the `pack` command in the {% data variables.product.prodname_codeql_cli %} to create {% data variables.product.prodname_codeql %} packs, add dependencies to packs, and install or update dependencies. You can also publish and download {% data variables.product.prodname_codeql %} packs using the `pack` command. For more information, see “[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs).” +You can use the `pack` command in the {% data variables.product.prodname_codeql_cli %} to create {% data variables.product.prodname_codeql %} packs, add dependencies to packs, and install or update dependencies. You can also publish and download {% data variables.product.prodname_codeql %} packs using the `pack` command. For more information, see "[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs)." {% ifversion query-pack-compatibility %} -For more information about compatibility between published query packs and different {% data variables.product.prodname_codeql %} releases, see “[About {% data variables.product.prodname_codeql %} pack compatibility](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs#about-codeql-pack-compatibility).” +For more information about compatibility between published query packs and different {% data variables.product.prodname_codeql %} releases, see "[About {% data variables.product.prodname_codeql %} pack compatibility](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs#about-codeql-pack-compatibility)." {% endif %} @@ -64,7 +64,7 @@ If you already have a `qlpack.yml` file, you can edit it manually to convert it 3. Migrate the list of dependencies in `libraryPathDependencies` to the `dependencies` block. Specify the version range for each dependency. If the range is unimportant, or you are unsure of compatibility, you can specify `"\*"`, which indicates that any version is acceptable and will default to the latest version when you run `codeql pack install`. -For more information about the properties, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#about-codeql-packs).” +For more information about the properties, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#about-codeql-packs)." ## Adding and installing dependencies to a {% data variables.product.prodname_codeql %} pack @@ -90,9 +90,9 @@ This command downloads all dependencies to the shared cache on the local disk. **Notes:** -- Running the `codeql pack add` and `codeql pack install` commands will generate or update the `codeql-pack.lock.yml` file. This file should be checked-in to version control. The `codeql-pack.lock.yml` file contains the precise version numbers used by the pack. For more information, see “[About codeql-pack.lock.yml files](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#about-codeql-pack-lock).” +- Running the `codeql pack add` and `codeql pack install` commands will generate or update the `codeql-pack.lock.yml` file. This file should be checked-in to version control. The `codeql-pack.lock.yml` file contains the precise version numbers used by the pack. For more information, see "[About codeql-pack.lock.yml files](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#about-codeql-pack-lock)." -- By default `codeql pack install` will install dependencies from the {% data variables.product.prodname_container_registry %} on {% data variables.product.prodname_dotcom_the_website %}. You can install dependencies from a {% data variables.product.prodname_ghe_server %} {% data variables.product.prodname_container_registry %} by creating a `qlconfig.yml` file. For more information, see “[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs).” +- By default `codeql pack install` will install dependencies from the {% data variables.product.prodname_container_registry %} on {% data variables.product.prodname_dotcom_the_website %}. You can install dependencies from a {% data variables.product.prodname_ghe_server %} {% data variables.product.prodname_container_registry %} by creating a `qlconfig.yml` file. For more information, see "[Publishing and using {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs)." {% endnote %} diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md index cbd6746cbc34..94f77e619e3b 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md @@ -23,11 +23,11 @@ make sure that you also update the MS short link: https://aka.ms/codeql-docs/ind Before you analyze your code using {% data variables.product.prodname_codeql %}, you need to create a {% data variables.product.prodname_codeql %} database containing all the data required to run queries on your code. You can create {% data variables.product.prodname_codeql %} databases yourself using the {% data variables.product.prodname_codeql_cli %}, or download them from {% data variables.product.prodname_dotcom_the_website %}. -{% data variables.product.prodname_codeql %} analysis relies on extracting relational data from your code, and using it to build a [{% data variables.product.prodname_codeql %} database](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#codeql-database). {% data variables.product.prodname_codeql %} databases contain all of the important information about a codebase, which can be analyzed by executing {% data variables.product.prodname_codeql %} queries against it. {% data variables.product.prodname_dotcom %} creates and stores {% data variables.product.prodname_codeql %} databases for a large number of open-source projects. For more information, see “[Downloading {% data variables.product.prodname_codeql %} databases from {% data variables.product.prodname_dotcom_the_website %}](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases#downloading-databases-from-githubcom).” +{% data variables.product.prodname_codeql %} analysis relies on extracting relational data from your code, and using it to build a [{% data variables.product.prodname_codeql %} database](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#codeql-database). {% data variables.product.prodname_codeql %} databases contain all of the important information about a codebase, which can be analyzed by executing {% data variables.product.prodname_codeql %} queries against it. {% data variables.product.prodname_dotcom %} creates and stores {% data variables.product.prodname_codeql %} databases for a large number of open-source projects. For more information, see "[Downloading {% data variables.product.prodname_codeql %} databases from {% data variables.product.prodname_dotcom_the_website %}](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases#downloading-databases-from-githubcom)." You can also create {% data variables.product.prodname_codeql %} databases yourself using the {% data variables.product.prodname_codeql_cli %}. Before you generate a {% data variables.product.prodname_codeql %} database, you need to: -- Install and set up the {% data variables.product.prodname_codeql_cli %}. For more information, see “[Getting started with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli).” +- Install and set up the {% data variables.product.prodname_codeql_cli %}. For more information, see "[Getting started with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli)." - Check out the version of your codebase you want to analyze. The directory should be ready to build, with all dependencies already installed. For information about using the {% data variables.product.prodname_codeql_cli %} in a third-party CI system to create results to display in {% data variables.product.prodname_dotcom %} as code scanning alerts, see [Configuring {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system). For information about enabling {% data variables.product.prodname_codeql %} code scanning using {% data variables.product.prodname_actions %}, see [Setting up code scanning for a repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository). @@ -66,9 +66,9 @@ You can specify additional options depending on the location of your source file - `--no-run-unnecessary-builds`: used with `--db-cluster` to suppress the build command for languages where the {% data variables.product.prodname_codeql_cli %} does not need to monitor the build (for example, Python and JavaScript/TypeScript). You can specify extractor options to customize the behavior of extractors that create {% data variables.product.prodname_codeql %} databases. For more information, see -“[Extractor options](/code-security/codeql-cli/using-the-codeql-cli/extractor-options).” +"[Extractor options](/code-security/codeql-cli/using-the-codeql-cli/extractor-options)." -For full details of all the options you can use when creating databases, see the [database create reference documentation](https://codeql.github.com/docs/codeql-cli/manual/database-create/). +For full details of all the options you can use when creating databases, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-create/)." ## Progress and results @@ -383,4 +383,4 @@ Before running an analysis with the {% data variables.product.prodname_codeql_cl ## Further reading -- “[Analyzing your projects in {% data variables.product.prodname_codeql %} for VS Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects)” +- "[Analyzing your projects in {% data variables.product.prodname_codeql %} for VS Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects)" diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites.md b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites.md index 72fbd7e146ac..38f4a44724f0 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites.md @@ -32,7 +32,7 @@ suite definition have been executed, the result is a set of selected queries. {% ifversion codeql-packs %} {% note %} -**Note:** Any custom queries that you want to add to a query suite must be in a [{% data variables.product.prodname_codeql %} pack](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs) and contain the correct query metadata. For more information, see “[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli).” +**Note:** Any custom queries that you want to add to a query suite must be in a [{% data variables.product.prodname_codeql %} pack](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs) and contain the correct query metadata. For more information, see "[Using custom queries with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli)." {% endnote %} {% endif %} @@ -139,7 +139,7 @@ regular expressions. When there is more than one metadata key, each key must be The standard metadata keys available to match on are: `description`, `id`, `kind`, `name`, `tags`, `precision`, and `problem.severity`. For more information about query metadata properties, see -“[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries).” +"[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)." In addition to metadata tags, the keys in the constraint block can also be: @@ -248,7 +248,7 @@ use: {% note %} -**Note:** You can use the `codeql resolve queries /path/to/suite.qls` command to see which queries are selected by a query suite definition. For more information, see the [resolve queries](https://codeql.github.com/docs/codeql-cli/manual/resolve-queries/) reference documentation. +**Note:** You can use the `codeql resolve queries /path/to/suite.qls` command to see which queries are selected by a query suite definition. For more information, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/resolve-queries/)." {% endnote %} @@ -373,25 +373,25 @@ instruction: - description: ``` -This value is displayed when you run [codeql resolve queries](https://codeql.github.com/docs/codeql-cli/manual/resolve-queries/), if the suite is added to a “well-known” -directory. For more information, see “[Specifying well-known query suites](#specifying-well-known-query-suites).” +This value is displayed when you run [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/resolve-queries/), if the suite is added to a "well-known" +directory. For more information, see "[Specifying well-known query suites](#specifying-well-known-query-suites)." {% ifversion codeql-packs %} ## Saving a query suite Save your query suite in a file with a `.qls` extension and add it to a CodeQL -pack. For more information, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#custom-codeql-packs).” +pack. For more information, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#custom-codeql-packs)." ## Specifying well-known query suites -You can use {% data variables.product.prodname_codeql %} packs to declare directories that contain “well-known” query -suites. You can use “well-known” query suites on the command line by referring +You can use {% data variables.product.prodname_codeql %} packs to declare directories that contain "well-known" query +suites. You can use "well-known" query suites on the command line by referring to their file name, without providing their full path. This gives you a simple way of specifying a set of queries, without needing to search inside {% data variables.product.prodname_codeql %} packs and distributions. -To declare a directory that contains “well-known” query suites, add the directory +To declare a directory that contains "well-known" query suites, add the directory to the `suites` property in the `qlpack.yml` file at the root of your {% data variables.product.prodname_codeql %} pack. -For more information, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#codeqlpack-yml-properties).” +For more information, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#codeqlpack-yml-properties)." {% endif %} ## Using query suites with CodeQL @@ -400,8 +400,8 @@ You can specify query suites on the command line for any command that accepts `.qls` files. For example, you can compile the queries selected by a suite definition using `query compile`, or use the queries in an analysis using `database analyze`. For more information about analyzing {% data variables.product.prodname_codeql %} databases, see -“[Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli).” +"[Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli)." ## Further reading -- “[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)” +- "[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)" diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli.md b/content/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli.md index 84c48beddace..f57b60039b94 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/getting-started-with-the-codeql-cli.md @@ -29,8 +29,8 @@ The {% data variables.product.prodname_codeql_cli %} can be set up to support ma structures. To get started quickly, we recommend adopting a relatively simple setup, as outlined in the steps below. -If you use Linux, Windows, or macOS version 10.14 (“Mojave”) or earlier, simply -follow the steps below. For macOS version 10.15 (“Catalina”) or newer, there are additional notes for some of the steps. If you are using macOS +If you use Linux, Windows, or macOS version 10.14 ("Mojave") or earlier, simply +follow the steps below. For macOS version 10.15 ("Catalina") or newer, there are additional notes for some of the steps. If you are using macOS on Apple Silicon (for example, Apple M1), ensure that the [Xcode command-line developer tools](https://developer.apple.com/downloads/index.action) and [Rosetta 2](https://support.apple.com/en-us/HT211861) are installed. @@ -54,34 +54,34 @@ Conditions](https://securitylab.github.com/tools/codeql/license). **Important:** There are several versions of the CLI available to download, depending on your use case: - If you want to use the most up to date {% data variables.product.prodname_codeql %} tools and features, download the version tagged `latest`. -- If you want to generate code scanning data to upload to {% data variables.product.prodname_enterprise %} server, then download the version that is compatible with the {% data variables.product.prodname_codeql_cli %} used in your CI system. For more information, see “[Installing {% data variables.product.prodname_codeql_cli %} in your CI system](/enterprise-server@latest/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system#downloading-the-codeql-cli).” +- If you want to generate code scanning data to upload to {% data variables.product.prodname_enterprise %} server, then download the version that is compatible with the {% data variables.product.prodname_codeql_cli %} used in your CI system. For more information, see "[Installing {% data variables.product.prodname_codeql_cli %} in your CI system](/enterprise-server@latest/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system#downloading-the-codeql-cli)." {% endnote %} -If you use Linux, Windows, or macOS version 10.14 (“Mojave”) or earlier, simply +If you use Linux, Windows, or macOS version 10.14 ("Mojave") or earlier, simply [download the zip archive](https://github.com/github/codeql-cli-binaries/releases) for the version you require. If you want the CLI for a specific platform, download the appropriate `codeql-PLATFORM.zip` file. Alternatively, you can download `codeql.zip`, which contains the CLI for all supported platforms. -#### Download information for macOS “Catalina” (or newer) users +#### Download information for macOS "Catalina" (or newer) users -If you use macOS version 10.15 (“Catalina”), version 11 (“Big Sur”), or the upcoming version 12 (“Monterey”), you need to ensure that your web browser does not automatically extract zip files. If you use Safari, complete the following steps before downloading the {% data variables.product.prodname_codeql_cli %} zip archive: +If you use macOS version 10.15 ("Catalina"), version 11 ("Big Sur"), or the upcoming version 12 ("Monterey"), you need to ensure that your web browser does not automatically extract zip files. If you use Safari, complete the following steps before downloading the {% data variables.product.prodname_codeql_cli %} zip archive: 1. Open Safari. 2. From the Safari menu, select **Preferences…**. 3. Click the **General** Tab. -4. Ensure the check-box labeled **Open “safe” files after downloading** is unchecked. +4. Ensure the check-box labeled **Open "safe" files after downloading** is unchecked. ### 2. Extract the zip archive -For Linux, Windows, and macOS users (version 10.14 “Mojave”, and earlier) +For Linux, Windows, and macOS users (version 10.14 "Mojave", and earlier) simply extract the zip archive. -#### Extraction information for macOS “Catalina” (or newer) users +#### Extraction information for macOS "Catalina" (or newer) users -macOS “Catalina”, “Big Sur”, or “Monterey” users should run the following commands in the Terminal, where `${extraction-root}` is the path to the directory where you will extract the {% data variables.product.prodname_codeql_cli %} zip archive: +macOS "Catalina", "Big Sur", or "Monterey" users should run the following commands in the Terminal, where `${extraction-root}` is the path to the directory where you will extract the {% data variables.product.prodname_codeql_cli %} zip archive: 1. `mv ~/Downloads/codeql\*.zip ${extraction-root}` 2. `cd ${extraction-root}` @@ -97,7 +97,7 @@ package. - By adding `/codeql` to your `PATH`, so that you can run the executable as just `codeql`. -At this point, you can execute {% data variables.product.prodname_codeql %} commands. For a full list of the {% data variables.product.prodname_codeql_cli %} commands, see the “[{% data variables.product.prodname_codeql_cli %} manual](https://codeql.github.com/docs/codeql-cli/manual/).” +At this point, you can execute {% data variables.product.prodname_codeql %} commands. For a full list of the {% data variables.product.prodname_codeql_cli %} commands, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual)." {% note %} @@ -111,7 +111,7 @@ At this point, you can execute {% data variables.product.prodname_codeql %} comm {% data variables.product.prodname_codeql_cli %} has subcommands you can execute to verify that you are correctly set up to create and analyze databases: - Run `codeql resolve languages` to show which languages are available for database creation. This will list the languages supported by default in your {% data variables.product.prodname_codeql_cli %} package.{% ifversion codeql-packs %} -- (Optional) You can download some “[{% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)” containing pre-compiled queries you would like to run. To do this, run `codeql pack download [...pack-name]`, where `pack-name` is the name of the pack you want to download. The core query packs are a good place to start. They are: +- (Optional) You can download some "[{% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)" containing pre-compiled queries you would like to run. To do this, run `codeql pack download [...pack-name]`, where `pack-name` is the name of the pack you want to download. The core query packs are a good place to start. They are: - `codeql/cpp-queries` - `codeql/csharp-queries` @@ -171,7 +171,7 @@ For more information, see the [Relocation announcement](https://github.com/githu Within this repository, the queries and libraries are organized into {% data variables.product.prodname_codeql %} packs. Along with the queries themselves, {% data variables.product.prodname_codeql %} packs contain important metadata that tells the {% data variables.product.prodname_codeql_cli %} how to process the query files. For more information, -see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs).” +see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)." {% endif %} {% note %} @@ -185,7 +185,7 @@ see “[About {% data variables.product.prodname_codeql %} packs](/code-security ### 4. Extract the zip archive -For Linux, Windows, and macOS users (version 10.14 “Mojave”, and earlier) simply extract the zip archive into the directory you created in step 2. +For Linux, Windows, and macOS users (version 10.14 "Mojave", and earlier) simply extract the zip archive into the directory you created in step 2. For example, if the path to your copy of the {% data variables.product.prodname_codeql %} repository is `$HOME/codeql-home/codeql-repo`, then extract the CLI into `$HOME/codeql-home/`. diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs.md b/content/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs.md index ed4278d251f4..565d015fa143 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/publishing-and-using-codeql-packs.md @@ -94,7 +94,7 @@ codeql analyze / / {% ifversion query-pack-compatibility %} {% note %} -**Note:** The `codeql pack download` command stores the pack it downloads in an internal location that is not intended for local modification. Unexpected (and hard to troubleshoot) behavior may result if the pack is modified after downloading. For more information about customizing packs, see “[Creating and working with {% data variables.product.prodname_codeql %} packs](#creating-and-working-with-codeql-packs)." +**Note:** The `codeql pack download` command stores the pack it downloads in an internal location that is not intended for local modification. Unexpected (and hard to troubleshoot) behavior may result if the pack is modified after downloading. For more information about customizing packs, see "[Creating and working with {% data variables.product.prodname_codeql %} packs](#creating-and-working-with-codeql-packs)." {% endnote %} diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md b/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md index 96e4181648a1..ea9138145703 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md @@ -26,7 +26,7 @@ tests on them using the `test run` subcommand. ## Setting up a test {% data variables.product.prodname_codeql %} pack for custom queries -All {% data variables.product.prodname_codeql %} tests must be stored in a special “test” {% data variables.product.prodname_codeql %} pack. That is, a directory for test files with a `qlpack.yml` file that defines: +All {% data variables.product.prodname_codeql %} tests must be stored in a special "test" {% data variables.product.prodname_codeql %} pack. That is, a directory for test files with a `qlpack.yml` file that defines: ```yaml name: @@ -38,7 +38,7 @@ extractor: The `dependencies` value specifies the {% data variables.product.prodname_codeql %} packs containing queries to test. Typically, these packs will be resolved from source, and so it is not necessary -to specify a fixed version of the pack. The `extractor` defines which language the CLI will use to create test databases from the code files stored in this {% data variables.product.prodname_codeql %} pack. For more information, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs).” +to specify a fixed version of the pack. The `extractor` defines which language the CLI will use to create test databases from the code files stored in this {% data variables.product.prodname_codeql %} pack. For more information, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)." You may find it useful to look at the way query tests are organized in the [{% data variables.product.prodname_codeql %} repository](https://github.com/github/codeql). Each language has a `src` directory, `ql//ql/src`, that contains libraries and queries for analyzing codebases. Alongside the `src` directory, there is a `test` directory with tests for these libraries and queries. @@ -53,7 +53,7 @@ Each `test` directory is configured as a test {% data variables.product.prodname For each query you want to test, you should create a sub-directory in the test {% data variables.product.prodname_codeql %} pack. Then add the following files to the subdirectory before you run the test command: -- A query reference file (`.qlref` file) defining the location of the query to test. The location is defined relative to the root of the {% data variables.product.prodname_codeql %} pack that contains the query. Usually, this is a {% data variables.product.prodname_codeql %} pack specified in the `dependencies` block of the test pack. For more information, see “[Query reference files](/code-security/codeql-cli/codeql-cli-reference/query-reference-files).” +- A query reference file (`.qlref` file) defining the location of the query to test. The location is defined relative to the root of the {% data variables.product.prodname_codeql %} pack that contains the query. Usually, this is a {% data variables.product.prodname_codeql %} pack specified in the `dependencies` block of the test pack. For more information, see "[Query reference files](/code-security/codeql-cli/codeql-cli-reference/query-reference-files)." You do not need to add a query reference file if the query you want to test is stored in the test directory, but it is generally good practice to store queries separately from tests. The only exception is unit tests for QL libraries, which tend to be stored in test packs, separate from queries that generate alerts or paths. @@ -94,7 +94,7 @@ You can also specify: - `--threads:` optionally, the number of threads to use when running queries. The default option is `1`. You can specify more threads to speed up query execution. Specifying `0` matches the number of threads to the number of logical processors. -For full details of all the options you can use when testing queries, see the [test run reference documentation](https://codeql.github.com/docs/codeql-cli/manual/test-run/). +For full details of all the options you can use when testing queries, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/test-run/)." ## Example @@ -129,7 +129,7 @@ other custom queries. For example, `custom-queries/java/queries/EmptyThen.ql`. codeql/java-queries: "*" ``` - For more information about {% data variables.product.prodname_codeql %} packs, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs).” + For more information about {% data variables.product.prodname_codeql %} packs, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)." 4. Create a {% data variables.product.prodname_codeql %} pack for your Java tests by adding a `qlpack.yml` file with the following contents to `custom-queries/java/tests`, updating the `dependencies` to match the name of your {% data variables.product.prodname_codeql %} pack of custom queries: @@ -214,8 +214,8 @@ This information may be sufficient to debug trivial test failures. For failures that are harder to debug, you can import `EmptyThen.testproj` into {% data variables.product.prodname_codeql %} for VS Code, execute `EmptyThen.ql`, and view the results in the -`Test.java` example code. For more information, see “[Analyzing your projects](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects)” in the {% data variables.product.prodname_codeql %} for VS Code help. +`Test.java` example code. For more information, see "[Analyzing your projects](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#analyzing-your-projects)" in the {% data variables.product.prodname_codeql %} for VS Code help. ## Further reading -- “[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)” +- "[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)" - "[Testing {% data variables.product.prodname_codeql %} queries in Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code/#testing-codeql-queries-in-visual-studio-code)." diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files.md b/content/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files.md index 244f5ee3c29f..f57ae9274d2e 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files.md @@ -25,7 +25,7 @@ Query help is documentation that accompanies a query to explain how the query wo The {% data variables.product.prodname_codeql_cli %} includes a command to test query help and render the content as markdown, so that you can easily preview the content in your IDE. Use the command to validate query help files before uploading them to the {% data variables.product.prodname_codeql %} repository or sharing them with other users. From {% data variables.product.prodname_codeql_cli %} 2.7.1 onwards, you can also include the markdown-rendered query help in SARIF files generated during {% data variables.product.prodname_codeql %} analyses so that the query help can be displayed in the code scanning UI. For more information, see -“[Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli).” +"[Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](/code-security/codeql-cli/using-the-codeql-cli/analyzing-databases-with-the-codeql-cli)." ## Prerequisites @@ -45,7 +45,7 @@ where `` is one of: - the path to a `.qhelp` file. - the path to a `.ql` file. - the path to a directory containing queries and query help files. -- the path to a query suite, or the name of a well-known query suite for a {% data variables.product.prodname_codeql %} pack. For more information, see “[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites).” +- the path to a query suite, or the name of a well-known query suite for a {% data variables.product.prodname_codeql %} pack. For more information, see "[Creating {% data variables.product.prodname_codeql %} query suites](/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites)." You must specify a `--format` option, which defines how the query help is rendered. Currently, you must specify `markdown` to render the query help as markdown. @@ -54,7 +54,7 @@ The `--output` option defines a file path where the rendered query help will be - For directories containing `.qhelp` files or a query suites defining one or more `.qhelp` files, you must specify an `--output` directory. Filenames within the output directory will be derived from the `.qhelp` file names. - For single `.qhelp` or `.ql` files, you may specify an `--output` option. If you don’t specify an output path, the rendered query help is written to `stdout`. -For full details of all the options you can use when testing query help files, see the [generate query-help reference documentation](https://codeql.github.com/docs/codeql-cli/manual/generate-query-help/). +For full details of all the options you can use when testing query help files, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/generate-query-help/)." ## Results @@ -66,8 +66,8 @@ By default, the {% data variables.product.prodname_codeql_cli %} will print a wa - Any `.qhelp` files specified in the command don’t have the same base name as an accompanying `.ql` file - Any `.ql` files specified in the command don’t have the same base name as an accompanying `.qhelp` file -You can tell the {% data variables.product.prodname_codeql_cli %} how to handle these warnings by including a `--warnings` option in your command. For more information, see the [generate query-help reference documentation](https://codeql.github.com/docs/codeql-cli/manual/generate-query-help/#cmdoption-codeql-generate-query-help-warnings). +You can tell the {% data variables.product.prodname_codeql_cli %} how to handle these warnings by including a `--warnings` option in your command. For more information, see "[AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/generate-query-help#--warningsmode)." ## Further reading -- “[Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/#query-help-files)” +- "[Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/#query-help-files)" diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli.md b/content/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli.md index d39f7e9fcd00..dbbd0ac10d9d 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/using-custom-queries-with-the-codeql-cli.md @@ -21,7 +21,7 @@ topics: You can customize your {% data variables.product.prodname_codeql %} analyses by writing your own queries to highlight specific vulnerabilities or errors. -This topic is specifically about writing queries to use with the [database analyze](https://codeql.github.com/docs/codeql-cli/manual/database-analyze/) command to produce [interpreted results](https://codeql.github.com/docs/codeql-overview/about-codeql/#interpret-query-results). +This topic is specifically about writing queries to use with the [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-analyze/) command to produce [interpreted results](https://codeql.github.com/docs/codeql-overview/about-codeql/#interpret-query-results). {% data reusables.codeql-cli.advanced-query-execution %} @@ -29,7 +29,7 @@ This topic is specifically about writing queries to use with the [database analy ## Writing a valid query -Before running a custom analysis you need to write a valid query, and save it in a file with a `.ql` extension. There is extensive documentation available to help you write queries. For more information, see “[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries).” +Before running a custom analysis you need to write a valid query, and save it in a file with a `.ql` extension. There is extensive documentation available to help you write queries. For more information, see "[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)." ## Including query metadata @@ -41,11 +41,11 @@ When running queries with the `database analyze` command, you must include the f - Query type (`@kind`): identifies the query as a simple alert (`@kind problem`), an alert documented by a sequence of code locations (`@kind path-problem`), for extractor troubleshooting (`@kind diagnostic`), or a summary metric (`@kind metric` and `@tags summary`). -For more information about these metadata properties, see “[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)” and the [Query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md). +For more information about these metadata properties, see "[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)" and the [Query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md). {% note %} -**Note:** Metadata requirements may differ if you want to use your query with other applications. For more information, see “[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries).” +**Note:** Metadata requirements may differ if you want to use your query with other applications. For more information, see "[Metadata for {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)." {% endnote %} @@ -57,13 +57,13 @@ For more information about these metadata properties, see “[Metadata for {% da -When you write your own queries with the intention to share them with others, you should save them in a custom {% data variables.product.prodname_codeql %} pack. You can publish the pack as a {% data variables.product.prodname_codeql %} pack to {% data variables.product.prodname_registry %} - the {% data variables.product.prodname_dotcom %} {% data variables.product.prodname_container_registry %}. For more information, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs).” +When you write your own queries with the intention to share them with others, you should save them in a custom {% data variables.product.prodname_codeql %} pack. You can publish the pack as a {% data variables.product.prodname_codeql %} pack to {% data variables.product.prodname_registry %} - the {% data variables.product.prodname_dotcom %} {% data variables.product.prodname_container_registry %}. For more information, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs)." {% data variables.product.prodname_codeql %} packs organize the files used in {% data variables.product.prodname_codeql %} analysis and can store queries, library files, query suites, and important metadata. Their root directory must contain a file named `qlpack.yml`. Your custom queries should be saved in the {% data variables.product.prodname_codeql %} pack root, or its subdirectories. -For each {% data variables.product.prodname_codeql %} pack, the `qlpack.yml` file includes information that tells the {% data variables.product.prodname_codeql_cli %} how to compile the queries, which other {% data variables.product.prodname_codeql %} packs and libraries the pack depends on, and where to find query suite definitions. For more information about what to include in this file, see “[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#codeqlpack-yml-properties).” +For each {% data variables.product.prodname_codeql %} pack, the `qlpack.yml` file includes information that tells the {% data variables.product.prodname_codeql_cli %} how to compile the queries, which other {% data variables.product.prodname_codeql %} packs and libraries the pack depends on, and where to find query suite definitions. For more information about what to include in this file, see "[About {% data variables.product.prodname_codeql %} packs](/code-security/codeql-cli/codeql-cli-reference/about-codeql-packs#codeqlpack-yml-properties)." {% endif %} @@ -75,4 +75,4 @@ If you would like to share your query with other {% data variables.product.prodn ## Further reading -- “[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)” +- "[{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)" diff --git a/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md b/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md index f177157e4a07..10e33f5078fc 100644 --- a/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md +++ b/content/code-security/dependabot/working-with-dependabot/removing-dependabot-access-to-public-registries.md @@ -69,7 +69,7 @@ Set `replaces-base` as `true` in the `dependabot.yml` file. For more information To configure the Gradle ecosystem to only access private registries, you can use these configuration methods. -Define the private registry configuration in a dependabot.yml file. For more information, see “[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#maven-repository).” +Define the private registry configuration in a dependabot.yml file. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#maven-repository)." {% note %} diff --git a/content/code-security/getting-started/auditing-security-alerts.md b/content/code-security/getting-started/auditing-security-alerts.md index 062dd86b9128..72d5c11b6fbd 100644 --- a/content/code-security/getting-started/auditing-security-alerts.md +++ b/content/code-security/getting-started/auditing-security-alerts.md @@ -84,7 +84,7 @@ For more information, see "[{% data variables.product.prodname_secret_scanning_c You can list all {% data variables.product.prodname_code_scanning %} alerts for a repository, organization, or enterprise, or use path parameters to list only alerts that meet a specific set of criteria. Alternatively, you can get full details for an alert or update the alert. -For more information, see “[{% data variables.product.prodname_code_scanning_caps %}](/rest/code-scanning)." +For more information, see "[{% data variables.product.prodname_code_scanning_caps %}](/rest/code-scanning)." ## Further reading - [AUTOTITLE](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository) diff --git a/data/reusables/codeql-cli/advanced-query-execution.md b/data/reusables/codeql-cli/advanced-query-execution.md index d1e3820c3006..aed73eeb991b 100644 --- a/data/reusables/codeql-cli/advanced-query-execution.md +++ b/data/reusables/codeql-cli/advanced-query-execution.md @@ -2,9 +2,9 @@ **Note:** Queries run with `database analyze` have strict [metadata requirements](https://codeql.github.com/docs/codeql-cli/using-custom-queries-with-the-codeql-cli/#including-query-metadata). You can also execute queries using the following plumbing-level subcommands: -- [database run-queries](https://codeql.github.com/docs/codeql-cli/manual/database-run-queries/), which outputs non-interpreted results in an intermediate binary format called [BQRS](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#bqrs-file). -- [query run](https://codeql.github.com/docs/codeql-cli/manual/query-run/), which will output BQRS files, or print results tables directly to the command line. Viewing results directly in the command line may be useful for iterative query development using the CLI. +- [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/database-run-queries/), which outputs non-interpreted results in an intermediate binary format called [BQRS](https://codeql.github.com/docs/codeql-overview/codeql-glossary/#bqrs-file). +- [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/query-run/), which will output BQRS files, or print results tables directly to the command line. Viewing results directly in the command line may be useful for iterative query development using the CLI. -Queries run with these commands don’t have the same metadata requirements. However, to save human-readable data you have to process each BQRS results file using the [bqrs decode](https://codeql.github.com/docs/codeql-cli/manual/bqrs-decode/) plumbing subcommand. Therefore, for most use cases it’s easiest to use database analyze to directly generate interpreted results. +Queries run with these commands don’t have the same metadata requirements. However, to save human-readable data you have to process each BQRS results file using the [AUTOTITLE](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode/) plumbing subcommand. Therefore, for most use cases it’s easiest to use database analyze to directly generate interpreted results. {% endnote %}