Skip to main content

Configuring settings for GitHub Copilot cloud agent

Learn how to configure settings for Copilot cloud agent

Enabling or disabling built-in code quality and security validation tools

By default, Copilot cloud agent checks code it generates for security issues and gets a second opinion on its code with Copilot-Codeüberprüfung. It attempts to resolve issues identified prior to completing the pull request. This improves code quality and reduces the likelihood of the code generated by Copilot cloud agent introducing problems such as hardcoded secrets, insecure dependencies, and other vulnerabilities.

Optionally, you can choose to disable these tools to help Copilot work faster or avoid conflicts with other code quality or security products you're using.

You must be a repository administrator to configure these settings.

  1. Navigieren Sie auf GitHub zur Hauptseite des Repositorys.

  2. Klicke unter dem Repositorynamen auf Settings. Wenn die Registerkarte „Einstellungen“ nicht angezeigt wird, wähle im Dropdownmenü die Option Einstellungen aus.

    Screenshot eines Repositoryheaders mit den Registerkarten. Die Registerkarte „Einstellungen“ ist dunkelorange umrandet.

  3. In the "Code & automation" section of the sidebar, click Copilot then Cloud agent.

  4. In the "Validation tools" section, toggle the tool, or tools, you want to enable or disable.

Allowing GitHub Actions workflows to run automatically when Copilot pushes

By default, GitHub Actions workflows will not run automatically when Copilot pushes changes to a pull request.

GitHub Actions workflows can be privileged and have access to sensitive secrets. Überprüfe die vorgeschlagenen Änderungen im Pull Request, und stelle sicher, dass dir die Ausführung deiner Workflows im Pull Request-Branch zusagt. Du solltest besonders auf vorgeschlagene Änderungen im .github/workflows/-Verzeichnis achten, die sich auf Workflowdateien auswirken.

To allow GitHub Actions workflows to run, click the Approve and run workflows button in the pull request's merge box.

Screenshot of the merge box on a pull request from Copilot with the "Approve and run workflows" button.

Optionally, you can configure Copilot cloud agent to allow GitHub Actions workflows to run without human intervention.

Warnung

Allowing GitHub Actions workflows to run without approval may allow unreviewed code written by Copilot to gain write access to your repository or access your GitHub Actions secrets.

You must be a repository administrator to configure these settings.

  1. Navigieren Sie auf GitHub zur Hauptseite des Repositorys.

  2. Klicke unter dem Repositorynamen auf Settings. Wenn die Registerkarte „Einstellungen“ nicht angezeigt wird, wähle im Dropdownmenü die Option Einstellungen aus.

    Screenshot eines Repositoryheaders mit den Registerkarten. Die Registerkarte „Einstellungen“ ist dunkelorange umrandet.

  3. In the "Code & automation" section of the sidebar, click Copilot then cloud agent.

  4. In the "Actions workflow approval" section, disable the Require approval for workflow runs setting.