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 and any exposed secrets.
Security campaigns in your day-to-day work
You can use security campaigns to support many of your aims as a security leader.
- Improving the security posture of the company by leading work to remediate alerts.
- Reinforcing security training for developers by creating a campaign of related, code scanning alerts to fix collaboratively.
- Ensuring that secret scanning alerts are resolved within your remediation target.
- Building collaborative relationships between the security team and developers to promote shared ownership of security alerts.
- Providing clarity to developers on the most urgent alerts to fix and monitoring alert remediation.
Benefits of using security campaigns
A security campaign has many benefits over other ways of encouraging developers to remediate security alerts. In particular,
- Developers are notified about any security campaigns that they can contribute to.
- Developers can see the alerts you've highlighted for remediation without leaving their normal workflows.
- Each campaign has a named point of contact for questions, reviews, and collaboration.
- For code scanning alerts, GitHub Copilot Autofix is automatically triggered to suggest a resolution.
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.
Darüber hinaus kannst du die REST-API verwenden, um Kampagnen effizienter und im großen Stil zu erstellen und mit ihnen zu interagieren. Weitere Informationen finden Sie unter REST-API-Endpunkte für Sicherheitskampagnen.
Differences between code and secret campaigns
Hinweis
Kampagnen für secret scanning-Warnungen befinden sich derzeit in der öffentliche Vorschau. Änderungen sind vorbehalten.
The creation workflow is the same for all campaigns, but you will notice a few differences in progress tracking and developer experience.
| Property | Code | Secret |
|---|---|---|
| Alerts available for inclusion | Default branch only | |
| Repository tracking issues | ||
| Developer notifications | Requires write access to repository | Requires view access to alerts list |
| Alert assignment | May raise permissions | |
| Automatic remediation support | GitHub Copilot Autofix |
Assigning alerts to users and Copilot-Programmier-Agent
You can assign a code scanning or secret scanning alert to any user who has write access for the repository.
If the assignee for a 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.
GitHub notifies users:
- When they are assigned to an alert
- When that alert is dismissed
For code scanning, you can also perform some of these operations programmatically using the REST API, such as assigning or unassigning users to alerts, and filtering alerts by assignee. For more information, see REST-API-Endpunkte für die Codeüberprüfung in the REST API documentation. Additionally, webhooks are available to notify you when an alert is assigned or an assignment is removed.
If an autofix has been generated for alerts in a security campaign, you can select those alerts and assign them to Copilot-Programmier-Agent. Copilot will create a pull request and add you as a requested reviewer. See Beheben von Warnungen in einer Sicherheitskampagne.