Skip to content

Commit 54682c3

Browse files
authored
Merge branch 'main' into flytewizard-keyboard-shortcut-discussions
2 parents 353c774 + 2f832b6 commit 54682c3

36 files changed

Lines changed: 672 additions & 190 deletions

.github/review-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- [ ] I've worked through build failures and tests are passing.
66
- [ ] For REST API content, I've verified that endpoints, parameters, and responses are correct and work as expected and provided curl samples below.
77

8-
For more information, check out our [full review guidelines and checklist](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/reviews-and-feedback/review-process.md).
8+
For more information, check out our [full review guidelines and checklist](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/reviews-and-feedback/review-process.md).
99

1010
## Review request
1111

.github/workflows/add-review-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# Jump through some hoops to work with a multi-line file
2323
- name: Store review template in variable
2424
run: |
25-
TEMPLATE=$(cat .github/workflows/review-template.md)
25+
TEMPLATE=$(cat .github/review-template.md)
2626
echo "TEMPLATE<<EOF" >> $GITHUB_ENV
2727
echo "$TEMPLATE" >> $GITHUB_ENV
2828
echo "EOF" >> $GITHUB_ENV
667 KB
Loading

content/actions/guides/creating-postgresql-service-containers.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ topics:
2222

2323
### Introduction
2424

25-
This guide shows you workflow examples that configure a service container using the Docker Hub `postgres` image. The workflow runs a script to create a PostgreSQL client and populate the client with data. To test that the workflow creates and populates the PostgreSQL client, the script prints the client's data to the console.
25+
This guide shows you workflow examples that configure a service container using the Docker Hub `postgres` image. The workflow runs a script that connects to the PostgreSQL service, creates a table, and then populates it with data. To test that the workflow creates and populates the PostgreSQL table, the script prints the data from the table to the console.
2626

2727
{% data reusables.github-actions.docker-container-os-support %}
2828

@@ -81,10 +81,10 @@ jobs:
8181
run: npm ci
8282
8383
- name: Connect to PostgreSQL
84-
# Runs a script that creates a PostgreSQL client, populates
85-
# the client with data, and retrieves data
84+
# Runs a script that creates a PostgreSQL table, populates
85+
# the table with data, and then retrieves the data.
8686
run: node client.js
87-
# Environment variable used by the `client.js` script to create a new PostgreSQL client.
87+
# Environment variables used by the `client.js` script to create a new PostgreSQL table.
8888
env:
8989
# The hostname used to communicate with the PostgreSQL service container
9090
POSTGRES_HOST: postgres
@@ -141,8 +141,8 @@ steps:
141141
run: npm ci
142142
143143
- name: Connect to PostgreSQL
144-
# Runs a script that creates a PostgreSQL client, populates
145-
# the client with data, and retrieves data
144+
# Runs a script that creates a PostgreSQL table, populates
145+
# the table with data, and then retrieves the data.
146146
run: node client.js
147147
# Environment variable used by the `client.js` script to create
148148
# a new PostgreSQL client.
@@ -204,11 +204,11 @@ jobs:
204204
run: npm ci
205205
206206
- name: Connect to PostgreSQL
207-
# Runs a script that creates a PostgreSQL client, populates
208-
# the client with data, and retrieves data
207+
# Runs a script that creates a PostgreSQL table, populates
208+
# the table with data, and then retrieves the data
209209
run: node client.js
210-
# Environment variable used by the `client.js` script to create
211-
# a new PostgreSQL client.
210+
# Environment variables used by the `client.js` script to create
211+
# a new PostgreSQL table.
212212
env:
213213
# The hostname used to communicate with the PostgreSQL service container
214214
POSTGRES_HOST: localhost
@@ -268,11 +268,11 @@ steps:
268268
run: npm ci
269269
270270
- name: Connect to PostgreSQL
271-
# Runs a script that creates a PostgreSQL client, populates
272-
# the client with data, and retrieves data
271+
# Runs a script that creates a PostgreSQL table, populates
272+
# the table with data, and then retrieves the data
273273
run: node client.js
274-
# Environment variable used by the `client.js` script to create
275-
# a new PostgreSQL client.
274+
# Environment variables used by the `client.js` script to create
275+
# a new PostgreSQL table.
276276
env:
277277
# The hostname used to communicate with the PostgreSQL service container
278278
POSTGRES_HOST: localhost
@@ -286,9 +286,9 @@ steps:
286286

287287
### Testing the PostgreSQL service container
288288

289-
You can test your workflow using the following script, which creates a PostgreSQL client and adds a new table with some placeholder data. The script then prints the values stored in the PostgreSQL client to the terminal. Your script can use any language you'd like, but this example uses Node.js and the `pg` npm module. For more information, see the [npm pg module](https://www.npmjs.com/package/pg).
289+
You can test your workflow using the following script, which connects to the PostgreSQL service and adds a new table with some placeholder data. The script then prints the values stored in the PostgreSQL table to the terminal. Your script can use any language you'd like, but this example uses Node.js and the `pg` npm module. For more information, see the [npm pg module](https://www.npmjs.com/package/pg).
290290

291-
You can modify *client.js* to include any PostgreSQL operations needed by your workflow. In this example, the script creates the PostgreSQL client instance, creates a table, adds placeholder data, then retrieves the data.
291+
You can modify *client.js* to include any PostgreSQL operations needed by your workflow. In this example, the script connects to the PostgreSQL service, adds a table to the `postgres` database, inserts some placeholder data, and then retrieves the data.
292292

293293
{% data reusables.github-actions.service-container-add-script %}
294294

@@ -324,11 +324,11 @@ pgclient.query('SELECT * FROM student', (err, res) => {
324324
});
325325
```
326326

327-
The script creates a new PostgreSQL `Client`, which accepts a `host` and `port` parameter. The script uses the `POSTGRES_HOST` and `POSTGRES_PORT` environment variables to set the client's IP address and port. If `host` and `port` are not defined, the default host is `localhost` and the default port is 5432.
327+
The script creates a new connection to the PostgreSQL service, and uses the `POSTGRES_HOST` and `POSTGRES_PORT` environment variables to specify the PostgreSQL service IP address and port. If `host` and `port` are not defined, the default host is `localhost` and the default port is 5432.
328328

329-
The script creates a table and populates it with placeholder data. To test that the PostgreSQL database contains the data, the script prints the contents of the table to the console log.
329+
The script creates a table and populates it with placeholder data. To test that the `postgres` database contains the data, the script prints the contents of the table to the console log.
330330

331-
When you run this workflow, you should see the following output in the "Connect to PostgreSQL" step confirming you created the PostgreSQL client and added data:
331+
When you run this workflow, you should see the following output in the "Connect to PostgreSQL" step, which confirms that you successfully created the PostgreSQL table and added data:
332332

333333
```
334334
null [ { id: 1,

content/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ Use the {% data variables.product.prodname_codeql_cli %} to analyze:
3838

3939
For more information, see "[Running {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/secure-coding/running-codeql-cli-in-your-ci-system)."
4040

41+
{% if currentVersion == "free-pro-team@latest" %}
42+
If you need to set up the CI system to orchestrate compiler invocations as well as running {% data variables.product.prodname_codeql %} analysis, you must use the {% data variables.product.prodname_codeql_runner %}.
43+
{% else %}
4144
You will need to use the {% data variables.product.prodname_codeql_runner %} if you need to:
42-
4345
- Set up the CI system to orchestrate compiler invocations as well as running {% data variables.product.prodname_codeql %} analysis.
4446
- Analyze more than one language in a repository.
47+
{% endif %}
4548

4649
{% data reusables.code-scanning.beta-codeql-runner %}
4750

@@ -57,4 +60,3 @@ You add the {% data variables.product.prodname_codeql_runner %} to your third-pa
5760

5861
To set up code scanning in your CI system, see "[Running {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/running-codeql-runner-in-your-ci-system)."
5962
{% endif %}
60-

content/code-security/secure-coding/configuring-code-scanning.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,35 @@ jobs:
223223
```
224224
{% endif %}
225225
226+
{% if currentVersion == "free-pro-team@latest" %}
227+
### Configuring a category for the analysis
228+
229+
Use `category` to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. The category you specify in your workflow will be included in the SARIF results file.
230+
231+
This parameter is particularly useful if you work with monorepos and have multiple SARIF files for different components of the monorepo.
232+
233+
{% raw %}
234+
``` yaml
235+
- name: Perform CodeQL Analysis
236+
uses: github/codeql-action/analyze
237+
with:
238+
# Optional. Specify a category to distinguish between multiple analyses
239+
# for the same tool and ref. If you don't use `category` in your workflow,
240+
# GitHub will generate a default category name for you
241+
category: "my_category"
242+
```
243+
{% endraw %}
244+
245+
If you don't specify a `category` parameter in your workflow, {% data variables.product.prodname_dotcom %} will generate a category name for you, based on the name of the workflow file triggering the action, the action name, and any matrix variables. For example:
246+
- The `.github/workflows/codeql-analysis.yml` workflow and the `analyze` action will produce the category `.github/workflows/codeql.yml:analyze`.
247+
- The `.github/workflows/codeql-analysis.yml` workflow, the `analyze` action, and the `{language: javascript, os: linux}` matrix variables will produce the category `.github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux`.
248+
249+
The `category` value will appear as the `<run>.automationDetails.id` property in SARIF v2.1.0. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning#runautomationdetails-object)."
250+
251+
Your specified category will not overwrite the details of the `runAutomationDetails` object in the SARIF file, if included.
252+
253+
{% endif %}
254+
226255
### Running additional queries
227256

228257
{% data reusables.code-scanning.run-additional-queries %}

content/code-security/secure-coding/configuring-codeql-runner-in-your-ci-system.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ Analyzes the code in the {% data variables.product.prodname_codeql %} databases
174174
| `--no-upload` | | None. Stops the {% data variables.product.prodname_codeql_runner %} from uploading the results to {% data variables.product.product_name %}. |
175175
| `--output-dir` | | Directory where the output SARIF files are stored. The default is in the directory of temporary files. |
176176
| `--ram` | | Amount of memory to use when running queries. The default is to use all available memory. |
177-
| <nobr>`--no-add-snippets`</nobr> | | None. Excludes code snippets from the SARIF output. |
177+
| <nobr>`--no-add-snippets`</nobr> | | None. Excludes code snippets from the SARIF output. |{% if currentVersion == "free-pro-team@latest" %}
178+
| <nobr>`--category`<nobr> | | Category to include in the SARIF results file for this analysis. A category can be used to distinguish multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. This value will appear in the `<run>.automationDetails.id` property in SARIF v2.1.0. |{% endif %}
178179
| `--threads` | | Number of threads to use when running queries. The default is to use all available cores. |
179180
| `--temp-dir` | | Directory where temporary files are stored. The default is `./codeql-runner`. |
180181
| `--debug` | | None. Prints more verbose output. |

content/code-security/secure-coding/running-codeql-cli-in-your-ci-system.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ For more information and examples, see [Creating {% data variables.product.prodn
150150
| `<database>` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the path for the directory that contains the {% data variables.product.prodname_codeql %} database to analyze. |
151151
| `<queries>` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the queries to run. To run the standard queries used for {% data variables.product.prodname_code_scanning %}, use: `<language>-code-scanning.qls` where `<language>` is the short code for the language of the database. To see the other query suites included in the {% data variables.product.prodname_codeql_cli %} bundle look in `/extraction-root/codeql/qlpacks/codeql-<language>/codeql-suites`. For information about creating your own query suite, see [Creating CodeQL query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.
152152
| <nobr>`--format`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the format for the results file generated by the command. For upload to {% data variables.product.company_short %} this should be: {% if currentVersion == "free-pro-team@latest" %}`sarif-latest`{% else %}`sarifv2.1.0`{% endif %}. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning)."
153-
| <nobr>`--output`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify where to save the SARIF results file.
153+
| <nobr>`--output`</nobr> | {% octicon "check-circle-fill" aria-label="Required" %} | Specify where to save the SARIF results file.{% if currentVersion == "free-pro-team@latest" %}
154+
| <nobr>`--sarif-category`<nobr> | | Optional. Specify a category to include in the SARIF results file for this analysis. A category can be used to distinguish multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. This value will appear in the `<run>.automationId` property in SARIF v1, the `<run>.automationLogicalId` property in SARIF v2, and the `<run>.automationDetails.id` property in SARIF v2.1.0. |{% endif %}
154155
| <nobr>`--threads`</nobr> | | Optional. Use if you want to use more than one thread to run queries. The default value is `1`. You can specify more threads to speed up query execution. To set the number of threads to the number of logical processors, specify `0`.
155156
156157
For more information, see [Analyzing databases with the {% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/analyzing-databases-with-the-codeql-cli/) in the documentation for the {% data variables.product.prodname_codeql_cli %}.

0 commit comments

Comments
 (0)