Skip to content

Commit 43ead04

Browse files
authored
Merge pull request #43106 from github/repo-sync
Repo sync
2 parents 8d8afd5 + 2f875d2 commit 43ead04

File tree

40 files changed

+1056
-505
lines changed

40 files changed

+1056
-505
lines changed

content/admin/concepts/identity-and-access-management/setup-user.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ The setup user is **only** intended to be used for:
1515

1616
* Configuring authentication and provisioning
1717
* SCIM provisioning via its {% data variables.product.pat_generic %}
18-
* Regaining access to your enterprise in the event of an issue with your identity provider, by utilizing the enterprise's SAML recovery codes
18+
* Regaining access to your enterprise in the event of an issue with your identity provider, by utilizing the enterprise's recovery codes
1919

2020
For other enterprise administration tasks, such as creating organizations, use a provisioned managed user account with the appropriate administrative role.
2121

2222
## How do I sign in as the setup user?
2323

24-
After we create your enterprise, you will receive an **email** inviting you to choose a password for the setup user.
24+
After we create your enterprise, you will receive an **email** inviting you to choose a password for the setup user.
2525

26-
When you create the password, you should enable two-factor authentication (2FA) for the account. All subsequent login attempts for the setup user account will require a successful 2FA challenge response.
26+
When you create the password, you should enable two-factor authentication (2FA) for the account.
2727

28-
If the enterprise account has enabled single sign-on and the setup user has **not** enabled 2FA, they must use an enterprise recovery code to authenticate. To avoid being locked out of your account, after enabling single sign-on, **save your enterprise recovery codes**. See [AUTOTITLE](/admin/managing-iam/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes#downloading-codes-for-an-enterprise-with-enterprise-managed-users).
28+
Unlike provisioned managed users, the setup user cannot sign in via SSO. Instead, the following applies:
29+
30+
* **With 2FA enabled**: All subsequent login attempts for the setup user account will require a successful 2FA challenge response. After completing the 2FA challenge, you will be prompted for a recovery code. You can skip this prompt and navigate directly to {% data variables.product.prodname_dotcom_the_website %} to access the setup user account. However, accessing your enterprise settings will always require a recovery code.
31+
* **Without 2FA enabled**: You must provide a recovery code every time you sign in.
32+
33+
We strongly recommend enabling 2FA on the setup user to avoid needing a recovery code for every sign-in attempt. To avoid being locked out of your account, after enabling single sign-on, **save your recovery codes**. See [AUTOTITLE](/admin/managing-iam/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes#downloading-codes-for-an-enterprise-with-enterprise-managed-users).
2934

3035
{% data reusables.enterprise-accounts.emu-password-reset-session %}

content/code-security/concepts/code-scanning/codeql/codeql-query-packs.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,22 @@ contentType: concepts
1616

1717
## About {% data variables.product.prodname_codeql %} packs
1818

19-
{% data variables.product.prodname_codeql %} packs are used to create, share, depend on, and run {% data variables.product.prodname_codeql %} queries and libraries. {% data variables.product.prodname_codeql %} packs contain queries, library files, query suites, and metadata. You can customize your {% data variables.product.prodname_codeql %} analysis by downloading packs created by others and running them on your codebase.
19+
{% data variables.product.prodname_codeql %} packs are used to create, share, depend on, and run {% data variables.product.prodname_codeql %} queries and libraries. You can customize your {% data variables.product.prodname_codeql %} analysis by downloading packs created by others and running them on your codebase.
20+
21+
Each {% data variables.product.prodname_codeql %} pack requires a `qlpack.yml` file in its root directory that specifies:
22+
23+
* How to compile the queries
24+
* Dependencies on other {% data variables.product.prodname_codeql %} packs and libraries
25+
* Query suite definitions
26+
27+
For more information about `qlpack.yml` properties, see [AUTOTITLE](/code-security/codeql-cli/getting-started-with-the-codeql-cli/customizing-analysis-with-codeql-packs#codeqlpack-yml-properties).
28+
29+
Additionally, a {% data variables.product.prodname_codeql %} pack can contain:
30+
31+
* Custom queries (`.ql` files)
32+
* Library files
33+
* Query suites
34+
* Metadata
2035

2136
The {% data variables.product.prodname_codeql_cli %} bundle includes queries that are maintained by {% data variables.product.company_short %} experts, security researchers, and community contributors. If you want to run queries developed by other organizations, {% data variables.product.prodname_codeql %} query packs provide an efficient and reliable way to download and run queries, while model packs ({% data variables.release-phases.public_preview %}) can be used to expand {% data variables.product.prodname_code_scanning %} analysis to recognize libraries and frameworks that are not supported by default.
2237

@@ -47,4 +62,13 @@ For more information about compatibility between published query packs and diffe
4762

4863
You can also use the {% data variables.product.prodname_codeql_cli %} to create your own {% data variables.product.prodname_codeql %} packs, add dependencies to packs, and install or update dependencies.
4964

50-
You can publish {% data variables.product.prodname_codeql %} packs that you have created, using the {% data variables.product.prodname_codeql_cli %}. For more information on publishing and downloading {% data variables.product.prodname_codeql %} packs, see [AUTOTITLE](/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/publishing-and-using-codeql-packs).
65+
## Publishing and sharing {% data variables.product.prodname_codeql %} packs
66+
67+
You can share custom queries with the broader {% data variables.product.prodname_codeql %} community by:
68+
69+
* Publishing to {% data variables.product.prodname_registry %}: Make your pack publicly available for other users to discover and use.
70+
* Contributing to the {% data variables.product.prodname_codeql %} repository: Submit queries that would benefit the wider community by opening a pull request to the official repository.
71+
72+
For more information about publishing and downloading {% data variables.product.prodname_codeql %} packs, see [AUTOTITLE](/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/publishing-and-using-codeql-packs).
73+
74+
For information about contributing to {% data variables.product.prodname_codeql %}, see [Contributing to {% data variables.product.prodname_codeql %}](https://github.com/github/codeql/blob/main/CONTRIBUTING.md).
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Custom CodeQL queries
3+
shortTitle: Custom queries
4+
intro: Custom queries extend {% data variables.product.prodname_codeql %}'s built-in security analysis to detect vulnerabilities and enforce coding standards specific to your codebase.
5+
product: '{% data reusables.gated-features.codeql %}'
6+
versions:
7+
fpt: '*'
8+
ghes: '*'
9+
ghec: '*'
10+
topics:
11+
- Code Security
12+
- Code scanning
13+
- CodeQL
14+
contentType: concepts
15+
---
16+
17+
## What are custom {% data variables.product.prodname_codeql %} queries?
18+
19+
Custom queries extend {% data variables.product.prodname_codeql %}'s built-in security analysis to detect vulnerabilities, coding standards, and patterns specific to your codebase.
20+
21+
{% data reusables.codeql-cli.advanced-query-execution %}
22+
23+
## When to use custom queries
24+
25+
Use custom queries to:
26+
27+
* Detect vulnerabilities specific to your application's architecture or frameworks
28+
* Enforce organization-specific coding standards or best practices
29+
* Find patterns not covered by standard {% data variables.product.prodname_codeql %} query packs
30+
* Analyze {% data variables.product.prodname_codeql %} databases with the `database analyze` command using the {% data variables.product.prodname_codeql_cli %} to produce interpreted results
31+
32+
## Query structure
33+
34+
Custom queries are written in query files, which are saved with the `.ql` extension. These files also contain important metadata that provides information about the query's purpose and tells the {% data variables.product.prodname_codeql_cli %} how to process results. Required properties include:
35+
36+
* **Query identifier (`@id`)**: Lowercase letters or digits, delimited by `/` or `-`
37+
* **Query type (`@kind`)**: One of:
38+
* `problem` - Simple alert
39+
* `path-problem` - Alert with code location sequence
40+
* `diagnostic` - Extractor troubleshooting
41+
* `metric` - Summary metric (requires `@tags summary`)
42+
43+
> [!NOTE]
44+
> 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).
45+
46+
For more information about query metadata, 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).
47+
48+
## Query documentation
49+
50+
Query documentation helps users understand what a query detects and how to address identified issues. You can include documentation for your custom queries in two formats:
51+
52+
* **Markdown files**: Saved alongside the query, can be included in SARIF files and displayed in the {% data variables.product.prodname_code_scanning %} UI
53+
* **`.qhelp` files**: Consistent with standard {% data variables.product.prodname_codeql %} queries, but must be converted to Markdown for use with {% data variables.product.prodname_code_scanning %}
54+
55+
When SARIF files containing query help are uploaded to {% data variables.product.prodname_dotcom %}, the documentation appears in the {% data variables.product.prodname_code_scanning %} UI for any alerts generated by the query.
56+
57+
For more information, see [Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/#query-help-files).
58+
59+
## Sharing custom queries
60+
61+
You can share custom queries with the community by publishing your own query packs. See [AUTOTITLE](/code-security/tutorials/customize-code-scanning/publishing-and-using-codeql-packs).
62+
63+
## Further reading
64+
65+
* [AUTOTITLE](/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/using-custom-queries-with-the-codeql-cli)
66+
* [{% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/#codeql-queries)

content/code-security/concepts/code-scanning/codeql/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ contentType: concepts
1212
children:
1313
- /about-code-scanning-with-codeql
1414
- /codeql-query-suites
15+
- /custom-codeql-queries
1516
- /about-the-codeql-cli
1617
- /about-codeql-for-vs-code
1718
- /about-codeql-workspaces

content/code-security/concepts/code-scanning/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ children:
2020
- /sarif-files
2121
- /merge-protection
2222
- /codeql
23+
- /tool-status-page
2324
---
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: About the tool status page
3+
shortTitle: Tool status page
4+
intro: 'The {% data variables.code-scanning.tool_status_page %} provides visibility into the health and performance of {% data variables.product.prodname_code_scanning %} tools in your repository.'
5+
permissions: '{% data reusables.permissions.code-scanning-all-alerts %}'
6+
product: '{% data reusables.gated-features.code-scanning %}'
7+
versions:
8+
fpt: '*'
9+
ghes: '*'
10+
ghec: '*'
11+
topics:
12+
- Code Security
13+
- Code scanning
14+
- CodeQL
15+
contentType: concepts
16+
---
17+
18+
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
19+
20+
## What is the {% data variables.code-scanning.tool_status_page %}?
21+
22+
The {% data variables.code-scanning.tool_status_page %} shows information about all of your {% data variables.product.prodname_code_scanning %} tools and is a good starting point for debugging problems when {% data variables.product.prodname_code_scanning %} isn't working as expected.
23+
24+
> [!NOTE]
25+
> The {% data variables.code-scanning.tool_status_page %} shows tool status at the repository level for the default branch only, not at the organization level.
26+
27+
## Tool status indicators
28+
29+
The {% data variables.code-scanning.tool_status_page %} displays one of three statuses:
30+
31+
* **All configurations are working**: All tools are operating as expected
32+
* **Some configurations need attention**: Some tools have warnings or non-critical issues
33+
* **Some configurations are not working**: One or more tools have critical errors
34+
35+
## What information is available
36+
37+
### For all {% data variables.product.prodname_code_scanning %} tools
38+
39+
* Configuration status and health
40+
* Scan scheduling
41+
* First and most recent scan times
42+
* Rules used in scans
43+
44+
### For integrated tools like {% data variables.product.prodname_codeql %}
45+
46+
In addition to the information listed above, the {% data variables.code-scanning.tool_status_page %} for integrated tools provides the following details:
47+
48+
* File coverage percentages by programming language
49+
* Configuration details for each setup type
50+
* Specific error messages
51+
* Downloadable CSV reports of analyzed files
52+
* Downloadable lists of rules used and alert counts
53+
54+
## How {% data variables.product.prodname_codeql %} defines scanned files
55+
56+
{% data variables.product.prodname_codeql %} reports a file as scanned if some lines of code in that file were processed.
57+
58+
### Interpreted languages
59+
60+
* **Default setup**: Scanned files include all source code files for languages {% data variables.product.prodname_codeql %} can analyze
61+
* **Advanced setup**: You can use `paths` and `paths-ignore` to define which files to scan. See [AUTOTITLE](/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql).
62+
63+
### Compiled languages
64+
65+
The {% data variables.code-scanning.tool_status_page %} reports files present before running autobuild or manual build steps. Files generated during the build process are not shown. See [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-autobuild-for-codeql).
66+
67+
### Coverage calculation
68+
69+
File coverage percentages respect any files excluded by `paths` and `paths-ignore` configuration properties.
70+
71+
## Understanding file coverage percentages
72+
73+
Use file coverage percentages to debug and improve your analysis:
74+
75+
* **High percentage**: {% data variables.product.prodname_code_scanning_caps %} is working as expected for that language
76+
* **Low percentage**: Investigate diagnostic output. See [AUTOTITLE](/code-security/code-scanning/troubleshooting-code-scanning/codeql-scanned-fewer-lines-than-expected)
77+
* **Zero percentage**: You may have code in languages not currently being analyzed. Update your setup to include these languages. See [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed)
78+
79+
> [!NOTE]
80+
> If you set up both advanced setup and default setup, the {% data variables.code-scanning.tool_status_page %} only shows default setup.
81+
82+
## Troubleshooting features
83+
84+
The {% data variables.code-scanning.tool_status_page %} helps you troubleshoot issues through:
85+
86+
* **Error messages**: Explains why tools aren't performing as expected with suggested actions
87+
* **File coverage data**: Shows which files and languages are being analyzed
88+
* **Configuration details**: Displays information about each analysis run
89+
* **Downloadable reports**: Provides CSV reports with detailed file and rule information
90+
91+
## Further reading
92+
93+
* [AUTOTITLE](/code-security/how-tos/scan-code-for-vulnerabilities/manage-your-configuration/use-the-tools-status-page-for-code-scanning)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: About validity checks
3+
shortTitle: Validity checks
4+
intro: 'Validity checks and extended metadata checks help you prioritize remediation of exposed credentials that pose immediate security risks.'
5+
product: |
6+
{% data reusables.gated-features.secret-scanning %}{% ifversion secret-risk-assessment %}
7+
8+
{% data variables.secret-scanning.secret-risk-assessment-cta-product %}{% endif %}
9+
contentType: concepts
10+
topics:
11+
- Secret scanning
12+
- Secret Protection
13+
versions:
14+
fpt: '*'
15+
ghec: '*'
16+
---
17+
18+
## About validity checks
19+
20+
Validity checks, a feature of {% data variables.product.prodname_secret_scanning %}, verify whether a detected secret is still active and could be exploited. This helps you prioritize remediation by focusing first on secrets that are confirmed to be active.
21+
22+
You can enable automatic validity checks for detected secrets. Once enabled, {% data variables.product.company_short %} will periodically check the validity of a detected credential by sending the secret to the issuer and testing it against APIs provided by that service. Validity checks are available for secrets from many service providers, and support continues to expand as {% data variables.product.company_short %} partners with additional services.
23+
24+
{% data variables.product.company_short %} prioritizes privacy when checking the validity of the credential. We typically make GET requests, pick the least intrusive endpoints, and select endpoints that don't return any personal information.
25+
26+
{% data variables.product.github %} displays the validation status of the secret in the alert view, so you can see if the secret is `active`, `inactive`, or if the validation status is `unknown`. You can optionally perform an "on-demand" validity check for the secret in the alert view.
27+
28+
## About extended metadata checks
29+
30+
{% data reusables.security-configurations.extended-metadata-checks %}
31+
32+
Extended metadata checks provide **additional contextual information** about detected secrets. They are often referred to as **analyzers** in other tools.
33+
34+
You can enable extended metadata checks if validity checks are enabled. Then, you'll get information that helps you:
35+
36+
* **Gain deeper insight into detected secrets**: Know who owns a secret.
37+
* **Prioritize remediation**: Understand the scope and impact of each exposed secret.
38+
* **Improve incident response**: Quickly identify responsible teams or individuals when a secret is leaked.
39+
* **Enhance compliance**: Ensure secrets align with your organization’s governance and security policies.
40+
* **Reduce false positives**: Use additional context to determine if a detection requires action.
41+
42+
The specific metadata available depends on what the service provider shares with {% data variables.product.github %}. Not all secret types support extended metadata checks. For more information, see [AUTOTITLE](/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#verifying-token-metadata).
43+
44+
## Getting started with validity and extended metadata checks
45+
46+
{% data reusables.secret-scanning.extended-metadata-checks-note %}
47+
48+
You can enable validity and extended metadata checks at the repository, organization, or enterprise level to help prioritize which exposed credentials pose the most immediate security risks.
49+
50+
For large organizations, we recommend using **security configurations** to enable these features at the organization or enterprise level. Security configurations allow you to centrally manage {% data variables.product.prodname_secret_scanning %} settings and apply them consistently across many repositories.
51+
52+
To get started:
53+
54+
* For repositories, see [AUTOTITLE](/code-security/how-tos/secure-your-secrets/customize-leak-detection/enabling-validity-checks-for-your-repository)
55+
* For an organization, see [AUTOTITLE](/code-security/how-tos/secure-at-scale/configure-organization-security/establish-complete-coverage/creating-a-custom-security-configuration)
56+
* For an enterprise, see [AUTOTITLE](/code-security/how-tos/secure-at-scale/configure-enterprise-security/establish-complete-coverage/creating-a-custom-security-configuration-for-your-enterprise)

content/code-security/concepts/secret-security/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ children:
1515
- /about-push-protection
1616
- /about-secret-security-with-github
1717
- /about-alerts
18+
- /about-validity-checks
1819
- /about-delegated-bypass-for-push-protection
1920
- /about-bypass-requests-for-push-protection
2021
- /about-secret-scanning-for-partners

0 commit comments

Comments
 (0)