Skip to content

Commit 30b188f

Browse files
sophiethekingCopilotmchammer01
authored
[EDI] Running a security campaign to fix alerts at scale (#59863)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent cc3b143 commit 30b188f

File tree

3 files changed

+72
-63
lines changed

3 files changed

+72
-63
lines changed

content/code-security/how-tos/manage-security-alerts/remediate-alerts-at-scale/creating-managing-security-campaigns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Security campaigns are created and managed from the **Security** tab for your or
2828

2929
You choose the alerts that you want to include in the campaign by using either:
3030

31-
* **Campaign templates**: Campaign templates contain filters for the most common alert selections. {% ifversion security-campaigns-autofix %}For code campaigns, they also all include the requirement that {% data variables.copilot.copilot_autofix %} is supported for all the alert types included (that is, `autofix:supported`).{% endif %}
32-
* **Custom filters**: Creating a campaign using custom filters lets you define your own criteria for selecting alerts for the campaign, and lets you tailor your campaign to your organization's specific needs.
31+
* **Campaign templates**: Campaign templates contain filters for the most common alert selections. {% ifversion security-campaigns-autofix %}For code campaigns, they also all include the requirement that {% data variables.copilot.copilot_autofix %} is supported for all the alert types included (that is, `autofix:supported`).{% endif %}
32+
* **Custom filters**: Creating a campaign using custom filters lets you define your own criteria for selecting alerts for the campaign, and lets you tailor your campaign to your organization's specific needs.
3333

3434
{% data reusables.code-scanning.campaigns-api %}
3535

content/code-security/how-tos/manage-security-alerts/remediate-alerts-at-scale/filtering-alerts-in-security-overview.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ You can combine multiple filters to narrow your results. For example, you can sh
2828

2929
For a complete list of available filters, see [AUTOTITLE](/code-security/reference/security-alert-management/available-filters-for-security-overview).
3030

31-
3231
> [!NOTE]
3332
> {% data reusables.security-overview.information-varies-GHAS %}
3433
Lines changed: 70 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Best practices for fixing security alerts at scale
2+
title: Running a security campaign to fix alerts at scale
33
shortTitle: Fix alerts at scale
4-
intro: Guidance on how to create successful security campaigns that engage developers and help them grow their understanding of secure coding.
4+
intro: Launch a focused security campaign to remediate a specific class of security alerts, such as cross-site scripting (XSS), across your organization.
55
allowTitleToDifferFromFilename: true
66
product: '{% data reusables.gated-features.security-campaigns %}'
77
audience:
@@ -19,105 +19,115 @@ redirect_from:
1919
- /code-security/securing-your-organization/fixing-security-alerts-at-scale
2020
---
2121

22-
## Elements of a successful security campaign
22+
## Launching your first campaign
2323

24-
Successful security campaigns to fix alerts at scale have many features in common, including:
24+
In this tutorial, you’ll plan and run your first organization-wide security campaign focused on XSS alerts. Along the way, you’ll learn how to select the right alerts, prepare developers for success, and structure a campaign that drives meaningful improvements in your security posture.
2525

26-
* Selecting a related group of security alerts for remediation.{% ifversion security-campaigns-autofix %}
27-
* For code campaigns, using {% data variables.copilot.copilot_autofix_short %} suggestions where possible to help developers remediate alerts faster and more effectively.{% endif %}
28-
* Making sure that the campaign managers are available for collaboration, reviews, and questions about fixes.
29-
* Providing access to educational information about the type of alerts included in the campaign.
30-
* Making {% data variables.copilot.copilot_chat %} available for developers to use to learn about the vulnerabilities highlighted by the security alerts in the campaign.
31-
* Defining a realistic deadline for campaign, bearing in mind the number of alerts you aim to fix.
32-
* Publicizing the collaboration to developer teams and identifying the best way to engage them for your organization.
26+
Imagine you’ve identified a recurring pattern of XSS vulnerabilities in several repositories. Rather than addressing alerts one by one, you decide to run a coordinated campaign that reduces risk while helping developers build confidence in secure coding.
3327

34-
For information about the developer experience, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/fixing-alerts-in-security-campaign).
28+
## 1. Define a focused goal
3529

36-
## Selecting security alerts for remediation
30+
When running a campaign at scale, it’s tempting to target all urgent alerts at once. If your developers already have a strong foundation in secure coding and available capacity, that may work.
3731

38-
Your first thought may be to identify all the most urgent alerts and create a security campaign to fix them. If your developers already have a good understanding of secure coding and are keen to remediate potential vulnerabilities, this could be a successful approach for your company. However, if you need to build up knowledge of secure coding{% ifversion security-campaigns-secrets %}, exposed secrets,{% endif %} and common vulnerabilities, you will benefit from a more strategic approach.
32+
However, if your goal is to both reduce risk and improve secure coding practices, a focused campaign is often more effective. Choosing a single vulnerability type, such as cross-site scripting, allows developers to recognize patterns, apply learning across multiple fixes, and build momentum.
3933

40-
{% ifversion security-campaigns-secrets %}
34+
For this campaign, you decide to focus on XSS alerts across your organization, within the limits of how many alerts a single campaign can include.
4135

42-
### Example approach for a code campaign
36+
## 2. Select alerts for your campaign
4337

44-
{% endif %}
38+
On the security alerts page, start by filtering for cross-site scripting alerts. You can also use a predefined campaign template, such as **Cross-site scripting (CWE-79)**, to quickly define the scope. For information on filtering alerts, see [AUTOTITLE](/code-security/how-tos/manage-security-alerts/remediate-alerts-at-scale/filtering-alerts-in-security-overview).
4539

46-
For a campaign to raise awareness and fix cross-site scripting vulnerabilities, you could:
40+
> [!NOTE]
41+
> Security campaigns can include up to 1000 alerts. If your organization has more than 1000 XSS alerts, narrow your filters (for example, by repository, severity, or language) until the number of matching alerts is within this limit, or plan multiple campaigns to cover the remaining alerts.
4742
48-
* Create educational content for developers in a repository using resources from the OWASP Foundation, see [Cross Site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/).{% ifversion security-campaigns-autofix %}
49-
* Create a campaign to remediate all alerts for this vulnerability where {% data variables.copilot.copilot_autofix_short %} is supported, using the `autofix:supported` filter.{% endif %}
50-
* Include a link to the educational content in the campaign description.
51-
* Hold a training session or other event to highlight this opportunity to gain confidence in secure coding while fixing real bugs.
52-
* Make sure that the security team members assigned to manage the campaign are available to review the pull requests created to fix the campaign alerts, collaborating as needed.
43+
{% ifversion security-campaigns-autofix %}If {% data variables.copilot.copilot_autofix_short %} is available for your campaign, you can further refine the scope by using the `autofix:supported` filter. This allows developers to take advantage of AI-generated fix suggestions to remediate alerts more efficiently.{% endif %}
5344

54-
{% ifversion security-campaigns-secrets %}
45+
Before launching the campaign, you also prepare supporting educational materials. For example:
5546

56-
### Example approach for a secrets campaign
47+
* Create a repository with guidance on preventing XSS vulnerabilities.
48+
* Link to resources from the OWASP Foundation, such as [Cross Site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/).
49+
* Provide examples of secure coding patterns and testing approaches.
5750

58-
{% data reusables.security.secrets-campaign-preview %}
51+
You’ll include links to these resources in the campaign description so developers can reference them as they work through their assigned alerts.
5952

60-
For a campaign to raise awareness and fix exposed passwords, you could:
53+
## 3. Assign campaign managers and define communication channels
6154

62-
* Create educational content for developers about storing passwords securely, for example, as {% data variables.product.github %} secrets, see [AUTOTITLE](/code-security/getting-started/understanding-github-secret-types).
63-
* Create a campaign to remediate all alerts for exposed passwords, including a link to the educational content in the campaign description.
64-
* Make sure that the security team members assigned to manage the campaign are available to ensure secrets are revoked and rotated acceptably, collaborating as needed.
55+
Before launching the campaign, decide who will support developers throughout the remediation process.
6556

66-
{% endif %}
57+
When you create a security campaign, you must assign one or more **campaign managers**. Campaign managers must be:
6758

68-
### Campaign filter templates
59+
* A user with the organization owner role or the security manager role, or
60+
* A member of a team with one of those roles
6961

70-
When you select alerts to include in a security campaign, you can use any of the filters on the security alerts page to define a subset of alerts. Alternatively, you can choose a campaign template to use one of the pre-defined filters for common needs, for example: "Cross-site scripting (CWE-79)."
62+
Choose managers who can:
7163

72-
### Draft campaigns
64+
* Answer questions about XSS vulnerabilities
65+
* Review pull requests for fixes
66+
* Help resolve edge cases or complex remediation scenarios
7367

74-
It can be useful to create a draft campaign first, which lists the alerts that are set to be included in the campaign and the campaign details, so that you can collaborate on the scope of the campaign prior to publishing it. For guidance on creating a draft campaign, see [AUTOTITLE](/code-security/securing-your-organization/fixing-security-alerts-at-scale/creating-managing-security-campaigns#create-a-campaign).
68+
Because campaign managers are visible to developers participating in the campaign, this is also an opportunity to establish clear communication. When creating the campaign, include a contact link, such as a link to a {% data variables.product.prodname_discussions %} thread or another communication channel, so developers know where to ask questions.
7569

76-
### Limitations on security campaigns
70+
By setting expectations early and making support visible, you increase trust and improve remediation rates.
7771

78-
The following limitations are intended to encourage you to take a balanced and measured approach to remediating alerts in your code. An iterative approach, addressing a few targeted sets of alerts at a time, is likely to lead to a sustainable and long-term change in security posture.
72+
## 4. Create and publish the campaign
7973

80-
* A maximum of 10 active security campaigns at a time (no limits on closed campaigns).
81-
* Each campaign can contain up to 1000 alerts.
74+
Now you’re ready to create the campaign.
8275

83-
If you choose to create a campaign that exceeds these limits, alerts will be omitted to bring the campaign into line with the limits. Alerts in repositories with recent pushes are prioritized for inclusion in the campaign.
76+
When defining the campaign:
8477

85-
## Specifying campaign managers and contact links
78+
* Use your XSS filter or template to select the alerts.
79+
* Add a clear description explaining the goal of the campaign.
80+
* Include links to the educational resources you prepared earlier.
81+
* Set a realistic due date based on the number of alerts and expected remediation capacity.
8682

87-
When you create a security campaign, you must select one or more "Campaign managers." A campaign manager must be either:
88-
* A user with the organization owner role, or the security manager role.
89-
* A member of a team with either the organization owner role, or the security manager role.
83+
If you’re unsure about the scope, create a **draft campaign** first. A draft allows you to review the alerts that will be included and collaborate internally before publishing.
9084

91-
The names of the campaign managers are visible to developers when they take part in the campaign. To support communication between developers and the campaigns managers, you can also provide a contact link, such as a link to a {% data variables.product.prodname_discussions %} or another communication channel, when you create a campaign.
85+
## 5. Enable issue tracking to increase visibility
9286

93-
If you want to increase the remediation rate for alerts and scale the knowledge of the security team, this is a key opportunity to build collaborative relationships with developers. Ideally, the campaign managers are available to answer questions and collaborate on difficult fixes via the contact link. Campaign managers should also be available to review pull requests for fixes over the whole course of the campaign.
87+
To help developers track their work and provide visibility to managers, you can choose to automatically create an issue in each repository included in the campaign. This allows developers to manage their remediation work within their existing workflows and project boards.
9488

95-
## Creating issues for a campaign
89+
When you enable issue creation, the campaign’s "Short description", "Contact link", and due date are automatically included in the issue body. If you update the short description, contact link, or due date, those changes are reflected in the issues. Additionally, when the campaign reaches its due date or is closed, a comment is posted on each issue to notify developers. This integration helps maintain clear communication and keeps the campaign organized across multiple repositories.
9690

97-
When you create a campaign, you can choose to automatically open a {% data variables.product.github %} Issue in every repository involved in the campaign. This means that the work can be much more easily tracked, assigned, and managed on team project boards. What's more, when you update the details of the campaign, such as the contact link or due date, the issue body gets automatically updated with the latest information. When a campaign reaches its due date, or gets deleted or closed, a comment is automatically posted on the issue.
91+
## 6. Support developers during remediation
9892

99-
This can aid developer engagement by providing clear, up-to-date context directly within developers' existing workflows. For information on how to automate issue creation for campaigns, see [AUTOTITLE](/code-security/securing-your-organization/fixing-security-alerts-at-scale/creating-managing-security-campaigns#create-a-campaign).
93+
Once the campaign is live, your role shifts from organizer to enabler. Developers will begin reviewing and fixing XSS alerts in their repositories. To help them move efficiently and confidently:
10094

101-
## Combining security training with a security campaign
95+
* Ensure campaign managers are available to review pull requests and answer questions.
96+
* Encourage developers to use {% data variables.copilot.copilot_chat_short %} to better understand why code is vulnerable and how to validate their fixes. {% ifversion security-campaigns-autofix %}
97+
* Where supported, encourage developers to review and test {% data variables.copilot.copilot_autofix_short %} suggestions before merging changes.{% endif %}
10298

103-
If your security team already provides training for developers on secure coding, creating a campaign with alerts chosen to allow developers to use the skills from the training session is a great way to reinforce their learning. Even if you don't have a formal training program, it makes sense to provide information on the types of security vulnerabilities included in the campaign, examples of how to fix them, and how to test the fixes. This will simplify the role of the campaign manager as they will be able to direct developers to these resources for answers to basic questions.
99+
If you prepared educational resources earlier, reference them in discussions and pull request reviews. Reinforcing shared guidance reduces repeated questions and helps build long-term secure coding habits.
104100

105-
The OWASP Foundation provides many resources for learning about the most common vulnerabilities and MITRE Corporation maintain a detailed list of common weaknesses, see [About the OWASP Foundation](https://owasp.org/about/) and [About CWE](https://cwe.mitre.org/about/index.html).
101+
By staying visible and responsive during the campaign, you reinforce that this is a collaborative effort, not just a compliance exercise.
106102

107-
{% ifversion security-campaigns-autofix %}
103+
## 7. Set a realistic deadline
108104

109-
## Providing AI support for learning about code vulnerabilities
105+
You set a due date when creating the campaign. As the campaign progresses, ensure that timeline remains achievable.
110106

111-
{% data variables.copilot.copilot_autofix %} is automatically triggered to suggest a resolution for each {% data variables.product.prodname_code_scanning %} alert. However, developers will often want more information about why the original code is insecure and how to test that the fix is correct and doesn't break other components.
107+
When setting or adjusting the deadline, consider:
112108

113-
{% data variables.product.prodname_copilot %} chat is an important tool for developers who have questions about secure coding, how to fix security alerts, and test their fix. Check that all developers in your organization have access to {% data variables.product.prodname_copilot_short %} in both their IDE and {% data variables.product.github %}, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/manage-access/grant-access).
109+
* The number of alerts included in the campaign
110+
* The expected remediation capacity of developers (for example, how much time they can dedicate to fixing alerts alongside their regular work)
111+
* Any upcoming company deadlines or holidays that may impact availability
114112

115-
{% endif %}
113+
Unless alert remediation is a dedicated initiative, most developers will be balancing this work alongside feature development. Setting a realistic timeline increases participation and prevents discouragement.
116114

117-
## Considerations in starting a security campaign and defining a deadline
115+
If needed, you can run multiple focused campaigns over time rather than attempting to address all alert types at once.
118116

119-
As with any other project, it's important to define realistic timescales to avoid discouraging developers from participating in the security campaign. Unless your company is fixing security alerts as part of a larger campaign to reduce technical debt, most developers will not have time allocated to fixing alerts. You need to estimate remediation rates based on the time developers can find between scheduled tasks. It's also always worth checking on key company deadlines that developers may be working towards and checking national holidays.
117+
## 8. Close the campaign and iterate
118+
119+
As the deadline approaches, monitor progress and collaborate on any remaining complex fixes.
120+
121+
When the campaign is closed:
122+
123+
* Repository issues are updated automatically.
124+
* Developers have resolved a focused set of vulnerabilities.
125+
* Your organization has reduced risk in a measurable way.
126+
127+
Most importantly, developers have gained practical experience recognizing and fixing a specific class of vulnerability.
128+
129+
From here, you can repeat the process with another targeted set of alerts, such as SQL injection, insecure deserialization, or exposed secrets, to steadily improve your organization’s security posture over time.
120130

121131
## Next steps
122132

123-
* [AUTOTITLE](/code-security/securing-your-organization/fixing-security-alerts-at-scale/creating-managing-security-campaigns)
133+
Ready to launch your campaign? To create and manage your security campaign, see [AUTOTITLE](/code-security/securing-your-organization/fixing-security-alerts-at-scale/creating-managing-security-campaigns).

0 commit comments

Comments
 (0)