Skip to content

Commit 022bef8

Browse files
authored
Merge pull request #40516 from github/repo-sync
Repo sync
2 parents 0aee973 + dc2a9ed commit 022bef8

File tree

24 files changed

+217
-60
lines changed

24 files changed

+217
-60
lines changed
309 KB
Loading
284 KB
Loading

content/code-security/code-scanning/managing-code-scanning-alerts/assessing-code-scanning-alerts-for-your-repository.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ By default, the {% data variables.product.prodname_code_scanning %} alerts page
3737
![Screenshot of a {% data variables.product.prodname_code_scanning %} alert. The "Show paths" and "Show more" links are outlined in dark orange.](/assets/images/help/repository/code-scanning-alert-details.png)
3838

3939
1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
40+
{% data reusables.security.alert-assignee-step %}
4041

4142
For more information, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts).
4243

content/code-security/code-scanning/managing-code-scanning-alerts/best-practices-for-participating-in-a-security-campaign.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Best practices for participating in a security campaign
2+
title: Best practices for participating in a code security campaign
33
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.'
4+
intro: 'Learn how you can successfully take part in a security campaign for {% data variables.product.prodname_code_scanning %} alerts and how it can benefit your career as well as your code.'
55
allowTitleToDifferFromFilename: true
66
permissions: '{% data reusables.permissions.code-scanning-all-alerts %}'
77
product: '{% data reusables.gated-features.security-campaigns %}'
@@ -15,9 +15,9 @@ topics:
1515
- Repositories
1616
---
1717

18-
## What is a security campaign
18+
## What is a code security campaign
1919

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.
20+
A security campaign is a group of {% data variables.product.prodname_code_scanning %} alerts, detected in the default branches of repositories, chosen by an organization owner or security manager for remediation.
2121

2222
You can take part in a security campaign by fixing one or more of the alerts included in the campaign.
2323

@@ -40,6 +40,8 @@ Adopting a few key best practices can help you participate successfully in a cam
4040

4141
You'll automatically receive email updates about security campaigns for any repositories you have **write** access to, so you can stay informed about relevant updates.
4242

43+
{% data reusables.security.alert-assignee-mention %}
44+
4345
### View campaign details
4446

4547
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.

content/code-security/secret-scanning/managing-alerts-from-secret-scanning/viewing-alerts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Alerts for {% data variables.product.prodname_secret_scanning %} are displayed u
9595
> {% data reusables.secret-scanning.secret-scanning-user-owned-repo-access %}
9696
9797
{% endif %}
98+
{% data reusables.security.alert-assignee-step %}
9899

99100
## Filtering alerts
100101

content/code-security/securing-your-organization/fixing-security-alerts-at-scale/about-security-campaigns.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,80 @@ intro: 'You can fix security alerts at scale by creating security campaigns and
55
product: '{% data reusables.gated-features.security-campaigns %}'
66
allowTitleToDifferFromFilename: true
77
type: overview
8+
audience:
9+
- driver
10+
contentType: concepts
811
versions:
912
feature: security-campaigns
1013
topics:
1114
- Code Security
15+
- Secret Protection
1216
- Organizations
1317
- Security
1418
---
1519

16-
Once you have identified security alerts in the default branches of your repositories, the next step is to identify the most urgent alerts and get them fixed. Security campaigns are a way to group alerts and share them with developers, so you can collaborate to remediate vulnerabilities in the code.
20+
Once you have identified security alerts the next step is to identify the most urgent alerts and get them fixed. Security campaigns are a way to group alerts and share them with developers, so you can collaborate to remediate vulnerabilities in the code{% ifversion security-campaigns-secrets %} and any exposed secrets{% endif %}.
1721

1822
## Security campaigns in your day-to-day work
1923

2024
You can use security campaigns to support many of your aims as a security leader.
2125

2226
* Improving the security posture of the company by leading work to remediate alerts.
23-
* Reinforcing security training for developers by creating a campaign of related alerts to fix collaboratively.
27+
* Reinforcing security training for developers by creating a campaign of related, {% data variables.product.prodname_code_scanning %} alerts to fix collaboratively.{% ifversion security-campaigns-secrets %}
28+
* Ensuring that {% data variables.product.prodname_secret_scanning %} alerts are resolved within your remediation target.{% endif %}
2429
* Building collaborative relationships between the security team and developers to promote shared ownership of security alerts.
2530
* Providing clarity to developers on the most urgent alerts to fix and monitoring alert remediation.
2631

2732
## Benefits of using security campaigns
2833

2934
A security campaign has many benefits over other ways of encouraging developers to remediate security alerts. In particular,
3035

31-
* Developers are notified about any security campaigns taking place in repositories they work in or subscribe to by email.
36+
* Developers are notified about any security campaigns that they can contribute to.
3237
* Developers can see the alerts you've highlighted for remediation without leaving their normal workflows.
3338
* Each campaign has a named point of contact for questions, reviews, and collaboration. {% ifversion security-campaigns-autofix %}
34-
* {% data variables.copilot.copilot_autofix %} is automatically triggered to suggest a resolution for each security alert. {% endif %}
39+
* For {% data variables.product.prodname_code_scanning %} alerts, {% data variables.copilot.copilot_autofix %} is automatically triggered to suggest a resolution. {% endif %}
3540

3641
You can use one of the templates to select a group of closely related alerts for a campaign. This allows developers to build on the knowledge gained by resolving one alert and use it to fix several more, providing them with an incentive to fix multiple alerts.
3742

3843
{% data reusables.code-scanning.campaigns-api %}
3944

45+
{% ifversion security-campaigns-secrets %}
46+
47+
## Differences between code and secret campaigns
48+
49+
{% data reusables.security.secrets-campaign-preview %}
50+
51+
The creation workflow is the same for all campaigns, but you will notice a few differences in progress tracking and developer experience.
52+
53+
{% rowheaders %}
54+
55+
| Property | Code | Secret |
56+
|--|--|--|
57+
| Alerts available for inclusion | {% octicon "check" aria-label="Supported" %} Default branch only | {% octicon "check" aria-label="Supported" %}
58+
| Repository tracking issues | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
59+
| Developer notifications | {% octicon "check" aria-label="Supported" %} Requires write access to repository | {% octicon "check" aria-label="Supported" %} Requires view access to alerts list |
60+
| {% ifversion code-secret-alert-assignees %} |
61+
| Alert assignment | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} May raise permissions |
62+
| {% endif %} |
63+
| Automatic remediation support | {% octicon "check" aria-label="Supported" %} {% data variables.copilot.copilot_autofix %} | {% octicon "x" aria-label="Not supported" %} |
64+
65+
{% endrowheaders %}
66+
67+
{% endif %}
68+
69+
{% ifversion code-secret-alert-assignees %}
70+
71+
### Assigning alerts
72+
73+
>[!NOTE]
74+
> The option to assign {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_secret_scanning %} alerts to users is currently in public preview and is subject to change.
75+
76+
You can assign a {% data variables.product.prodname_code_scanning %} or {% data variables.product.prodname_secret_scanning %} alert to any user who has **write** access for the repository.
77+
78+
If the assignee for a {% data variables.product.prodname_secret_scanning %} alert **cannot view the alert list**, their permissions are temporarily raised for that alert. Any additional permissions are revoked when they are unassigned from the alert.
79+
80+
{% endif %}
81+
4082
## Next steps
4183

4284
* [AUTOTITLE](/code-security/securing-your-organization/fixing-security-alerts-at-scale/best-practice-fix-alerts-at-scale)

content/code-security/securing-your-organization/fixing-security-alerts-at-scale/best-practice-fix-alerts-at-scale.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ intro: 'Guidance on how to create successful security campaigns that engage deve
55
allowTitleToDifferFromFilename: true
66
product: '{% data reusables.gated-features.security-campaigns %}'
77
type: reference
8+
audience:
9+
- driver
10+
contentType: tutorials
811
versions:
912
feature: security-campaigns
1013
topics:
1114
- Code Security
15+
- Secret Protection
1216
- Organizations
1317
- Security
1418
---
@@ -17,30 +21,47 @@ topics:
1721

1822
Successful security campaigns to fix alerts at scale have many features in common, including:
1923

20-
* Selecting a related group of security alerts for remediation.
21-
* Using {% data variables.copilot.copilot_autofix_short %} suggestions where possible to help developers remediate alerts faster and more effectively.
24+
* Selecting a related group of security alerts for remediation.{% ifversion security-campaigns-autofix %}
25+
* For code campaigns, using {% data variables.copilot.copilot_autofix_short %} suggestions where possible to help developers remediate alerts faster and more effectively.{% endif %}
2226
* Making sure that the campaign managers are available for collaboration, reviews, and questions about fixes.
23-
* Providing access to educational information about the type of alerts included in the campaign.{% ifversion ghec %}
24-
* Making {% data variables.copilot.copilot_chat %} available for developers to use to learn about the vulnerabilities highlighted by the security alerts in the campaign. {% endif %}
27+
* Providing access to educational information about the type of alerts included in the campaign.
28+
* Making {% data variables.copilot.copilot_chat %} available for developers to use to learn about the vulnerabilities highlighted by the security alerts in the campaign.
2529
* Defining a realistic deadline for campaign, bearing in mind the number of alerts you aim to fix.
2630
* Publicizing the collaboration to developer teams and identifying the best way to engage them for your organization.
2731

2832
For information about the developer experience, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/fixing-alerts-in-security-campaign).
2933

3034
## Selecting security alerts for remediation
3135

32-
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 and common vulnerabilities, you will benefit from a more strategic approach.
36+
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.
3337

34-
For example, if you have many alerts for cross-site scripting vulnerabilities, you could:
38+
{% ifversion security-campaigns-secrets %}
3539

36-
* 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/).
37-
* Create a campaign to remediate all alerts for this vulnerability, including a link to the educational content in the campaign description.
40+
### Example approach for a code campaign
41+
42+
{% endif %}
43+
44+
For a campaign to raise awareness and fix cross-site scripting vulnerabilities, you could:
45+
46+
* 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 %}
47+
* 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 %}
48+
* Include a link to the educational content in the campaign description.
3849
* Hold a training session or other event to highlight this opportunity to gain confidence in secure coding while fixing real bugs.
3950
* 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.
4051

41-
### Using {% data variables.copilot.copilot_autofix_short %} to help remediate security alerts
52+
{% ifversion security-campaigns-secrets %}
53+
54+
### Example approach for a secrets campaign
4255

43-
{% data variables.copilot.copilot_autofix %} is an expansion of {% data variables.product.prodname_code_scanning %} that provides users with targeted recommendations to help fix {% data variables.product.prodname_code_scanning %} alerts. When you select alerts to include in a security campaign, you can preferentially include alerts that are eligible to be fixed with the help of {% data variables.copilot.copilot_autofix %} using the `autofix:supported` filter.
56+
{% data reusables.security.secrets-campaign-preview %}
57+
58+
For a campaign to raise awareness and fix exposed passwords, you could:
59+
60+
* 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).
61+
* Create a campaign to remediate all alerts for exposed passwords, including a link to the educational content in the campaign description.
62+
* 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.
63+
64+
{% endif %}
4465

4566
### Campaign filter templates
4667

@@ -83,11 +104,11 @@ The OWASP Foundation provides many resources for learning about the most common
83104

84105
{% ifversion security-campaigns-autofix %}
85106

86-
## Providing AI support for learning about security vulnerabilities
107+
## Providing AI support for learning about code vulnerabilities
87108

88-
{% data variables.copilot.copilot_autofix %} is automatically triggered to suggest a resolution for each security 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.
109+
{% 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.
89110

90-
{% data variables.product.prodname_copilot %} 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/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/granting-access-to-copilot-for-members-of-your-organization).
111+
{% 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).
91112

92113
{% endif %}
93114

0 commit comments

Comments
 (0)