{"meta":{"title":"Защита репозитория","intro":"Copilot Chat может помочь вам защитить ваш репозиторий и код.","product":"GitHub Copilot","breadcrumbs":[{"href":"/ru/copilot","title":"GitHub Copilot"},{"href":"/ru/copilot/tutorials","title":"Учебники"},{"href":"/ru/copilot/tutorials/copilot-cookbook","title":"Кулинарная книга GitHub Copilot"},{"href":"/ru/copilot/tutorials/copilot-cookbook/analyze-security","title":"Анализ безопасности"},{"href":"/ru/copilot/tutorials/copilot-cookbook/analyze-security/secure-your-repository","title":"Защита репозитория"}],"documentType":"article"},"body":"# Защита репозитория\n\nCopilot Chat может помочь вам защитить ваш репозиторий и код.\n\n## Настройка основных функций безопасности\n\n### Пример сценария\n\nПредположим, что вы недавно создали репозиторий для нового веб-приложения, вы хотите защитить его, и вы не знаете, где начать.\n\nCopilot Chat Он проведёт вас через настройку самых важных функций безопасности, чтобы ваш репозиторий оставался в безопасности.\n\n### Пример запроса\n\n```copilot copy prompt\nProvide step-by-step instructions on how to enable the following essential security features in my GitHub repository:\n\n* Secret scanning\n* Push protection\n* Dependabot alerts\n* Dependabot security updates\n* Branch protection rules, including enforced code reviews before merging\n\nExplain why each feature is important and how it helps secure my repository.\n```\n\n### Пример ответа\n\nCopilot Chat Предоставляет информацию о каждой функции безопасности и объясняет, как её включить.\n\n```markdown\nWhy it's important:\n\nSecret scanning automatically detects accidentally committed secrets (API keys, credentials, etc.) in your repository.\n\nHow it helps:\n\nLeaked secrets can allow attackers to access systems, steal data, or cause other harm. Early detection prevents misuse.\n\nHow to Enable:\n\n1. Go to your repository on GitHub.\n1. Click on Settings.\n1. In the left sidebar, click Code security.\n1. Scroll to Secret scanning.\n1. Ensure \"Secret scanning\" and \"Push protection\" are both enabled.\n1. If not, click Enable.\n```\n\n## Поощрение безопасных вкладов и рекомендаций с помощью политики безопасности\n\n### Пример сценария\n\nДопустим, вы хотите публично поделиться своим project и разработать чёткую политику безопасности, которая поможет пользователям безопасно сообщать о уязвимостях, обнаруженных в вашем репозитории.\n\nCopilot Chat Можете написать политику безопасности для вашего репозитория.\n\n### Пример запроса\n\n```copilot copy prompt\nWrite a GitHub security policy (SECURITY.md) for my repository. The policy should include:\n\n* A clear description of how users can report security vulnerabilities.\n* A response timeline for security issues.\n* Guidelines for responsible disclosure.\n* Supported versions of the software.\n\nFormat it as a well-structured Markdown document.\n```\n\n### Пример выходных данных\n\nCopilot Chat создаёт `SECURITY.md` файл, который вы можете зафиксировать в своём репозитории.\n\n```markdown\n# Security Policy\n\nThank you for helping to keep this project and its users secure! This document outlines the security policy and responsible disclosure guidelines for this repository.\n\n## Reporting a Vulnerability\n\nIf you discover a security vulnerability, please report it by emailing **security@yourdomain.com** or by using the GitHub [security advisories](https://github.com/octocat/octocat-repo/security/advisories) feature.\n**Do not** report security vulnerabilities via public GitHub issues or pull requests.\n\nWhen reporting a vulnerability, please include as much information as possible to help us understand and reproduce the issue:\n- A clear description of the vulnerability.\n- Steps to reproduce the issue.\n- Any relevant logs, screenshots, or proof-of-concept code.\n- Your assessment of the potential impact.\n\n## Response Timeline\n\nWe take security issues seriously and will respond according to the following guidelines:\n- **Acknowledgment:** We will acknowledge receipt of your report within **3 business days**.\n- **Investigation:** We will investigate and assess the report as quickly as possible, usually within **7 business days**.\n- **Resolution:** Once a fix is identified, we will work to release a security update promptly. We will coordinate with you as needed, especially if you are the reporter.\n- **Disclosure:** We will notify the community of the vulnerability and fix via a GitHub security advisory, and credit the reporter as appropriate.\n\n## Responsible Disclosure Guidelines\n\nTo protect users of this project, we ask that you:\n- Avoid public disclosure of the vulnerability until it has been investigated and patched.\n- Allow us a reasonable amount of time to resolve the issue before any public disclosure.\n- Provide relevant details privately (see \"Reporting a Vulnerability\" above).\n- Act in good faith and avoid exploiting the vulnerability beyond what is necessary for your report.\n\nWe are committed to working with security researchers and the community to ensure a safe and secure software ecosystem.\n```\n\n## Дополнительные материалы\n\n* [Инженерия подсказок для GitHub Copilot Chat](/ru/copilot/concepts/prompting/prompt-engineering)\n* [Лучшие практики использования GitHub Copilot](/ru/copilot/get-started/best-practices)"}