|
| 1 | +--- |
| 2 | +title: Best practices for participating in a security campaign |
| 3 | +shortTitle: Best practices for campaigns |
| 4 | +intro: 'Learn how you can successfully take part in a security campaign and how it can benefit your career as well as your code.' |
| 5 | +allowTitleToDifferFromFilename: true |
| 6 | +permissions: '{% data reusables.permissions.code-scanning-all-alerts %}' |
| 7 | +product: '{% data reusables.gated-features.security-campaigns %}' |
| 8 | +type: how_to |
| 9 | +versions: |
| 10 | + feature: security-campaigns |
| 11 | +topics: |
| 12 | + - Code Security |
| 13 | + - Code scanning |
| 14 | + - Alerts |
| 15 | + - Repositories |
| 16 | +--- |
| 17 | + |
| 18 | +## What is a security campaign |
| 19 | + |
| 20 | +A security campaign is a group of security alerts, detected in the default branches of repositories, chosen by an organization owner or security manager for remediation. |
| 21 | + |
| 22 | +You can take part in a security campaign by fixing one or more of the alerts included in the campaign. |
| 23 | + |
| 24 | +## What are the benefits of participating in a campaign |
| 25 | + |
| 26 | +In addition to the benefit of removing an important security problem from your organization's codebase, alerts in a security campaign have several other benefits compared with fixing another alert in your repository. |
| 27 | + |
| 28 | +* You have a campaign manager on the security team to collaborate with and a specific contact link for discussing campaign activities. |
| 29 | +* You know that you are fixing a security alert that is important to the company. |
| 30 | +* Potentially, you may have access to targeted training materials.{% ifversion security-campaigns-autofix %} |
| 31 | +* You don't need to request a {% data variables.product.prodname_copilot_autofix %} suggestion, it is already available as a starting point.{% endif %}{% ifversion copilot %} |
| 32 | +* If you have access to {% data variables.product.prodname_copilot_chat %}, you can ask questions about the alert and the suggested fix.{% endif %} |
| 33 | +* You are improving and demonstrating your knowledge of secure coding. |
| 34 | + |
| 35 | +Adopting a few key best practices can help you participate successfully in a campaign. |
| 36 | + |
| 37 | +## Stay informed |
| 38 | + |
| 39 | +### Notification settings |
| 40 | + |
| 41 | +To receive email updates about security campaigns in repositories you have write access to, make sure that you: |
| 42 | + |
| 43 | +* **Watch** all repositories that you have write access to. |
| 44 | +* **Subscribe** to notifications for "All activity" or "Security alerts". |
| 45 | + |
| 46 | +### View campaign details |
| 47 | + |
| 48 | +When you open the **Security** tab for a repository with one or more campaign alerts, you can see the campaign name in the sidebar of the view. Click the campaign name to see the list of alerts included in the campaign and summary information on how the campaign is progressing. |
| 49 | + |
| 50 | +### Campaign-generated {% data variables.product.prodname_github_issues %} |
| 51 | + |
| 52 | +Some campaigns automatically create {% data variables.product.prodname_github_issues %} for each repository which details the campaign managers, contact URL, and due date. |
| 53 | + |
| 54 | +You can use this issue to plan and track campaign work as part of your usual workflows, such as: |
| 55 | + |
| 56 | +* Adding the issue to project boards |
| 57 | +* Adding assignees |
| 58 | +* Creating sub-issues or tasklists |
| 59 | + |
| 60 | +## Seek context |
| 61 | + |
| 62 | +Your security team may provide you with specific training ahead of participating in a campaign, so that you feel equipped to address the alerts included in the campaign. |
| 63 | + |
| 64 | +If no formal training program is available, you can request that the campaign manager shares information on: |
| 65 | + |
| 66 | +* Types of security vulnerabilities included in the campaign |
| 67 | +* Examples of how to fix them |
| 68 | +* How to test the fixes |
| 69 | + |
| 70 | +In addition, there are external resources for understanding common security issues: |
| 71 | + |
| 72 | +* The **OWASP Foundation** provides many resources for learning about the most common vulnerabilities, see [About the OWASP Foundation](https://owasp.org/about/). |
| 73 | +* The **MITRE Corporation** maintains a detailed list of common weaknesses, see [About CWE](https://cwe.mitre.org/about/index.html). |
| 74 | + |
| 75 | +## Group similar alerts |
| 76 | + |
| 77 | +When fixing security alerts as part of a campaign, it may be helpful to group and fix similar alerts together. By doing so, you can develop a deeper understanding of the underlying issue. As you gain confidence and efficiency in resolving a specific type of alert, it makes it easier and faster for you to resolve subsequent alerts. |
| 78 | + |
| 79 | +{% ifversion copilot %} |
| 80 | + |
| 81 | +## Leverage {% data variables.product.prodname_copilot_short %} |
| 82 | + |
| 83 | +{% ifversion code-scanning-autofix %} |
| 84 | + |
| 85 | +### {% data variables.product.prodname_copilot_autofix_short %} |
| 86 | + |
| 87 | +{% data variables.product.prodname_copilot_autofix_short %} is automatically triggered for alerts that are included in a campaign, meaning that where possible, fixes are automatically generated for you. You can commit the suggested fix to resolve the alert and then verify that continuous integration testing (CI) for the codebase is still passing. See [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/fixing-alerts-in-security-campaign). |
| 88 | + |
| 89 | +### {% data variables.product.prodname_copilot_chat_short %} |
| 90 | + |
| 91 | +{% endif %} |
| 92 | + |
| 93 | +You can ask {% data variables.product.prodname_copilot_chat_short %} for help in understanding the vulnerability, the suggested fix, and how to test that the fix is comprehensive. To access {% data variables.product.prodname_copilot_chat_short %}, navigate to https://github.com/copilot. |
| 94 | + |
| 95 | +Alternatively, when viewing a specific alert, in the top right corner of the page, click the {% data variables.product.prodname_copilot_chat_short %} icon ({% octicon "copilot" aria-hidden="true" %}) to open a chat window, and ask {% data variables.product.prodname_copilot_short %} questions about the alert. |
| 96 | + |
| 97 | +For example: |
| 98 | + |
| 99 | + ```text copy |
| 100 | +
|
| 101 | + Explain how this alert introduces a vulnerability into the code. |
| 102 | +
|
| 103 | + ``` |
| 104 | + |
| 105 | +If you don't already have access to {% data variables.product.prodname_copilot_chat_short %} through your organization{% ifversion ghec %} or enterprise{% endif %}, you can sign up to {% data variables.product.prodname_copilot_free %}. For more information, see [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-copilot-free/accessing-github-copilot-free). |
| 106 | + |
| 107 | +{% endif %} |
| 108 | + |
| 109 | +## Ask questions |
| 110 | + |
| 111 | +A security campaign will generally include a contact URL, which might link you to the campaign manager, an open forum (such as a {% data variables.product.github %} Discussion), or a website of resources. You should use this space to ask questions about the campaign or specific alerts, find useful resources, and share knowledge. |
| 112 | + |
| 113 | +To find the contact URL: |
| 114 | + |
| 115 | +1. Open the **Security** tab for your repository. |
| 116 | +1. On the left sidebar, click the name of the campaign you are participating in. |
| 117 | +1. On the campaign tracking page, to the right of the campaign manager's name, click **{% octicon "comment" aria-hidden="true" %}**. |
| 118 | + |
| 119 | +## Next steps |
| 120 | + |
| 121 | +* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/fixing-alerts-in-security-campaign) |
0 commit comments