diff --git a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md index 28b7fd49953a..b37fbf573db4 100644 --- a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md +++ b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md @@ -64,7 +64,7 @@ The {% data variables.product.prodname_codeql %} action supports three different * `none` - the {% data variables.product.prodname_codeql %} database is created directly from the codebase without building the codebase (supported for all interpreted languages, and additionally supported for {% data variables.code-scanning.no_build_support %}). * `autobuild` - {% data variables.product.prodname_codeql %} detects the most likely build method and uses this to attempt to build the codebase and create a database for analysis (supported for all compiled languages). -* `manual` - you define the build steps to use for the codebase in the workflow (supported for all compiled languages). +* `manual` - you define the build steps to use for the codebase in the workflow (supported for all compiled languages{% ifversion codeql-rust-public-preview %}, except Rust{% endif %}). ### Comparison of the build modes diff --git a/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md b/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md index e0bf7f0ec4b6..715d80e42d21 100644 --- a/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md +++ b/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md @@ -52,7 +52,7 @@ For information about {% data variables.product.prodname_code_scanning %} alerts {% data reusables.code-scanning.codeql-languages-bullets %} > [!IMPORTANT] -> {% data variables.product.prodname_codeql %} does **not** support languages that are not listed above. This includes, but is not limited to, **Rust**, **PHP**, **Scala**, and others. Attempting to use {% data variables.product.prodname_codeql %} with unsupported languages may result in no alerts being generated and incomplete analysis. +> {% data variables.product.prodname_codeql %} does **not** support languages that are not listed above. This includes, but is not limited to, **PHP**, **Scala**, and others. Attempting to use {% data variables.product.prodname_codeql %} with unsupported languages may result in no alerts being generated and incomplete analysis. ## Modeling custom or niche frameworks diff --git a/content/copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks.md b/content/copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks.md index 19a56a1b279a..f5f57a107dc8 100644 --- a/content/copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks.md +++ b/content/copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks.md @@ -102,11 +102,12 @@ This is a Go based repository with a Ruby client for certain API endpoints. It i 3. Use dependency injection patterns where appropriate 4. Write unit tests for new functionality. Use table-driven unit tests when possible. 5. Document public APIs and complex logic. Suggest changes to the `docs/` folder when appropriate -``` + +If you choose not to include a `.github/copilot-instructions.md` file in your repository, {% data variables.product.prodname_copilot_short %} will fall back to pre-existing custom instructions including `CLAUDE.md`, `AGENTS.md` and `GEMINI.md`. ## Using the Model Context Protocol (MCP) -You can extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by using MCP. This allows {% data variables.copilot.copilot_coding_agent %} to use tools provided by local MCP servers. The {% data variables.product.github %} MCP server is enabled by default. For more information, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp). +You can extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by using MCP. This allows {% data variables.copilot.copilot_coding_agent %} to use tools provided by local and remote MCP servers. The {% data variables.product.github %} MCP server and [Playwright MCP server](https://github.com/microsoft/playwright-mcp) are enabled by default. For more information, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp). ## Pre-installing dependencies in {% data variables.product.prodname_copilot %}'s environment @@ -117,7 +118,3 @@ If {% data variables.product.prodname_copilot_short %} is able to build, test an To do that, it will need your project's dependencies. {% data variables.product.prodname_copilot_short %} can discover and install these dependencies itself via a process of trial and error - but this can be slow and unreliable, given the non-deterministic nature of large language models (LLMs). You can configure a `copilot-setup-steps.yml` file to pre-install these dependencies before the agent starts working so it can hit the ground running. For more information, see [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent#preinstalling-tools-or-dependencies-in-copilots-environment). - -## Further reading - -* **Hands-on practice**: Try the [Expand your team with {% data variables.copilot.copilot_coding_agent %}](https://github.com/skills/expand-your-team-with-copilot/) Skills course for practical experience with {% data variables.copilot.copilot_coding_agent %}. diff --git a/content/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp.md b/content/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp.md index 75e6a6a3525e..61e81dd24cb3 100644 --- a/content/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp.md +++ b/content/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp.md @@ -22,7 +22,7 @@ redirect_from: {% data reusables.copilot.coding-agent.mcp-brief-intro %} -The agent can use tools provided by local MCP servers. For example, the [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools to interact with web pages and pull in additional context when executing on the requested task. Some MCP servers are configured by default to provide the best experience for getting started. +The agent can use tools provided by local MCP servers. Some MCP servers are configured by default to provide the best experience for getting started. For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction). For information on some of the currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main). @@ -37,6 +37,9 @@ The following MCP servers are configured automatically for {% data variables.cop * **{% data variables.product.github %}**: The {% data variables.product.github %} MCP server gives {% data variables.product.prodname_copilot_short %} access to {% data variables.product.github %} data like issues and pull requests. To learn more, see [AUTOTITLE](/copilot/customizing-copilot/using-model-context-protocol/using-the-github-mcp-server). * By default, the {% data variables.product.github %} MCP server connects to {% data variables.product.github %} using a specially scoped token that only has read-only access to the current repository. You can customize it to use a different token with broader access. For more details, see [Customizing the built-in {% data variables.product.github %} MCP server](#customizing-the-built-in-github-mcp-server) below. +* **Playwright**: The [Playwright MCP server](https://github.com/microsoft/playwright-mcp) gives {% data variables.product.prodname_copilot_short %} access to web pages, including the ability to read, interact and take screenshots. + * By default, the Playwright MCP server is only able to access web resources hosted within {% data variables.product.prodname_copilot_short %}'s own environment, accessible on `localhost` or `127.0.0.1`. + ## Setting up MCP servers in a repository > [!WARNING] @@ -50,7 +53,7 @@ Once MCP servers are configured for use within a repository, the tools specified ### Creating your JSON MCP configuration -You configure MCP servers using a special JSON format. The JSON must contain an `mcpServers` object, where the key is the name of the MCP server (for example, `playwright`), and the value is an object with the configuration for that MCP server. +You configure MCP servers using a special JSON format. The JSON must contain an `mcpServers` object, where the key is the name of the MCP server (for example, `sentry`), and the value is an object with the configuration for that MCP server. ```json copy { @@ -75,29 +78,13 @@ The configuration object can contain the following keys: * `command` (`string`): The command to run to start the MCP server. * `args` (`string[]`): The arguments to pass to the `command`. * `tools` (`string[]`): The tools from the MCP server to enable. You may be able to find a list of tools in the server's documentation, or in its code. We strongly recommend that you allowlist specific read-only tools, since the agent will be able to use these tools autonomously and will not ask you for approval first. You can also enable all tools by including `*` in the array. -* `type` (`string`): Optional field. {% data variables.copilot.copilot_coding_agent %} only accepts `"local"`. +* `type` (`string`): {% data variables.copilot.copilot_coding_agent %} only accepts `"local"`. * `env` (`object`): The environment variables to pass to the server. This object should map the name of the environment variable that should be exposed to your MCP server to either of the following: * The name of a {% data variables.product.prodname_actions %} secret you have configured, beginning with `COPILOT_MCP_`. * A string value. ### Example configurations -#### Example: Playwright - -The [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools which allow {% data variables.product.prodname_copilot_short %} to browse the internet. - -```json copy -{ - "mcpServers": { - "playwright": { - "command": "docker", - "args": ["run", "-i", "--rm", "--init", "mcp/playwright"], - "tools": ["*"] - } - } -} -``` - #### Example: Sentry The [Sentry MCP server](https://github.com/getsentry/sentry-mcp) gives {% data variables.product.prodname_copilot_short %} authenticated access to exceptions recorded in [Sentry](https://sentry.io). @@ -192,7 +179,7 @@ To use the Azure MCP with {% data variables.copilot.copilot_coding_agent %}, you 1. In your repository’s {% data variables.product.prodname_copilot_short %} environment, add secrets for your `AZURE_CLIENT_ID`, `AZURE_TENANT_ID` and `AZURE_SUBSCRIPTION_ID`. 1. Configure the Azure MCP server by adding an `azure` object to your MCP configuration. - ```json copy + ```json copy { "mcpServers": { "Azure": { diff --git a/content/get-started/learning-about-github/github-language-support.md b/content/get-started/learning-about-github/github-language-support.md index e713c0654e4b..27267b85640e 100644 --- a/content/get-started/learning-about-github/github-language-support.md +++ b/content/get-started/learning-about-github/github-language-support.md @@ -45,4 +45,4 @@ Some features are supported for additional languages or package managers. If you > {% ifversion fpt or ghec %}The language support for {% data variables.product.prodname_copilot %} varies depending on the volume and diversity of training data for that language.{% endif %} > The support of Gradle for the dependency graph and {% data variables.product.prodname_dependabot_alerts %} is limited to the upload of data obtained using the {% data variables.dependency-submission-api.name %}. -[^1]: PHP, Rust, and Scala are supported for code scanning by third-party actions, but not by {% data variables.product.prodname_codeql %}. +[^1]: {% ifversion codeql-rust-public-preview %}PHP and Scala {% else %}PHP, Rust, and Scala {% endif %}are supported for code scanning by third-party actions, but not by {% data variables.product.prodname_codeql %}. diff --git a/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md b/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md index 34bc9f087f6b..fec589fa4e53 100644 --- a/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md +++ b/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md @@ -41,6 +41,9 @@ Your repository may be secured by push protection. With push protection, {% data {% endif %} +> [!WARNING] +> Use Git to push files to your repository if you need to apply the logic in your `.gitattributes` file. For example, automatic conversion of line endings. Uploading a file through the {% data variables.product.github %} web interface will ignore `.gitattributes`. + {% data reusables.repositories.navigate-to-repo %} 1. Above the list of files, select the **Add file** dropdown menu and click **Upload files**. Alternatively, you can drag and drop files into your browser. diff --git a/content/rest/campaigns/index.md b/content/rest/campaigns/index.md index 6e87b00a50de..cd4d74a2c9de 100644 --- a/content/rest/campaigns/index.md +++ b/content/rest/campaigns/index.md @@ -1,6 +1,6 @@ --- title: REST API endpoints for security campaigns -shortTitle: Security campaigns +shortTitle: Campaigns intro: Use the REST API to create and manage security campaigns for your organization. topics: - API diff --git a/content/rest/code-security/index.md b/content/rest/code-security/index.md index e0c5455f98b7..52ff759a642d 100644 --- a/content/rest/code-security/index.md +++ b/content/rest/code-security/index.md @@ -1,6 +1,7 @@ --- -title: Security settings -intro: Use the REST API to create and manage security configurations for your organization. +title: REST API endpoints for code security settings +shortTitle: Code security settings +intro: Use the REST API to create and manage code security configurations for your organization. topics: - API autogenerated: rest diff --git a/data/features/codeql-rust-public-preview.yml b/data/features/codeql-rust-public-preview.yml new file mode 100644 index 000000000000..bf3938348d9e --- /dev/null +++ b/data/features/codeql-rust-public-preview.yml @@ -0,0 +1,5 @@ +# Reference: #17830 + +versions: + fpt: '*' + ghec: '*' diff --git a/data/reusables/code-scanning/codeql-languages-bullets.md b/data/reusables/code-scanning/codeql-languages-bullets.md index 3a6fee33b771..8bea8e4c1396 100644 --- a/data/reusables/code-scanning/codeql-languages-bullets.md +++ b/data/reusables/code-scanning/codeql-languages-bullets.md @@ -5,7 +5,8 @@ * Java/Kotlin * JavaScript/TypeScript * Python -* Ruby +* Ruby{% ifversion codeql-rust-public-preview %} +* Rust (public preview){% endif %} * Swift {% ifversion code-scanning-actions-language %}* {% data variables.product.prodname_actions %} workflows{% endif %} diff --git a/data/reusables/supported-languages/rust.md b/data/reusables/supported-languages/rust.md index 1c3524a27de2..db4ff2957dd3 100644 --- a/data/reusables/supported-languages/rust.md +++ b/data/reusables/supported-languages/rust.md @@ -1 +1 @@ -| Rust {% ifversion fpt or ghec %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}
third-party [^1] | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes > 3.13 %} | {% octicon "check" aria-label="Supported" %}
third-party [^1] | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% else %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% endif %} +| Rust {% ifversion fpt or ghec %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% ifversion codeql-rust-public-preview %} {% octicon "check" aria-label="Supported" %}
(Public preview) {% else %}{% octicon "check" aria-label="Supported" %}
third-party [^1] {% endif %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes > 3.13 %} | {% octicon "check" aria-label="Supported" %}
third-party [^1] | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% else %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "x" aria-label="Unsupported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% endif %} diff --git a/data/variables/code-scanning.yml b/data/variables/code-scanning.yml index 0d13ebb30847..bd33e5fa1d92 100644 --- a/data/variables/code-scanning.yml +++ b/data/variables/code-scanning.yml @@ -10,7 +10,7 @@ tool_status_page: 'tool status page' no_build_support: '{% ifversion codeql-no-build-c-cpp %}C/C++, {% endif %}{% ifversion codeql-no-build-csharp %}C# and{% endif %} Java' # List of compiled languages -compiled_languages: 'C/C++, C#, Go, Java, Kotlin, and Swift' +compiled_languages: 'C/C++, C#, Go, Java, Kotlin, {% ifversion codeql-rust-public-preview %}Rust (public preview), {% endif %}and Swift' # List of languages where the libraries support expansion using CodeQL model packs at the repository level. codeql_model_packs_support: '{% ifversion fpt or ghec or ghes > 3.14 %} C/C++, C#, Java/Kotlin, Python, and Ruby{% elsif ghes %}C#, Java/Kotlin, and Ruby{% endif %}' diff --git a/src/dev-toc/README.md b/src/dev-toc/README.md index f0b42a3d83ad..5820ec371030 100644 --- a/src/dev-toc/README.md +++ b/src/dev-toc/README.md @@ -1,3 +1,33 @@ # Developer table of contents This directory generates a full table of contents for the docs.github.com site. + + + +The table of contents is generated locally within the `static` subdirectory as a series of `index.html` files, within version subdirectories such as `free-pro-team@latest` and `enterprise-cloud@latest` etc. + +## Generating the table of contents + +To generate the table of contents, run the following command from the Terminal: + +```bash +npm run dev-toc +``` + +After generating the files, the ToC should open in your default browser. If it doesn't, open your browser and navigate to `file:///PATH/TO/docs-internal/src/dev-toc/static/free-pro-team@latest/index.html`. + +## Generating the ToC with one or more sections auto-expanded + +Alternatively, you can generate the table of contents with a specific top-level section of the docs auto-expanded by running the following command: + +```bash +tsx src/dev-toc/generate.ts -o PRODUCT-ID [PRODUCT-ID PRODUCT-ID ...] +``` + +where `PRODUCT-ID` is the first part of the URL for the top-level section of the docs. For example, the `actions` section of the docs has the URL `https://docs.github.com/en/actions`, so the `PRODUCT-ID` is `actions`. So the command would be: + +```bash +tsx src/dev-toc/generate.ts -o actions +``` + +Note: if you generate the table more than once, with a different product ID flag you will need to refresh the page to see the changes. diff --git a/src/dev-toc/index.ts b/src/dev-toc/index.ts deleted file mode 100644 index 86211eaf765a..000000000000 --- a/src/dev-toc/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -const expandText = 'Expand All' -const closeText = 'Close All' - -document.addEventListener('DOMContentLoaded', async () => { - devToc() -}) - -function devToc(): void { - const expandButton = document.querySelector('.js-expand') as HTMLButtonElement | null - if (!expandButton) return - - const detailsElements = document.querySelectorAll('details') as NodeListOf - - expandButton.addEventListener('click', () => { - // on click, toggle all the details elements open or closed - const anyDetailsOpen = Array.from(detailsElements).find((details) => details.open) - - for (const detailsElement of detailsElements) { - anyDetailsOpen ? detailsElement.removeAttribute('open') : (detailsElement.open = true) - } - - // toggle the button text on click - anyDetailsOpen - ? (expandButton.textContent = expandText) - : (expandButton.textContent = closeText) - }) - - // also toggle the button text on clicking any of the details elements - for (const detailsElement of detailsElements) { - detailsElement.addEventListener('click', () => { - expandButton.textContent = closeText - - // we can only get an accurate count of the open details elements if we wait a fraction after click - setTimeout(() => { - if (!Array.from(detailsElements).find((details) => details.open)) { - expandButton.textContent = expandText - } - }, 50) - }) - } -} diff --git a/src/dev-toc/layout.html b/src/dev-toc/layout.html index 2ecec00cb739..fca2aa106468 100644 --- a/src/dev-toc/layout.html +++ b/src/dev-toc/layout.html @@ -61,7 +61,17 @@

TOC for {{ allVersions[currentVersion].versio {% endfor %} {% endif %} - + diff --git a/src/dev-toc/toc-screenshot.png b/src/dev-toc/toc-screenshot.png new file mode 100644 index 000000000000..f0b12a2f8930 Binary files /dev/null and b/src/dev-toc/toc-screenshot.png differ