Creating and managing security campaigns

You can manage security campaigns directly from the security overview for your organization.

Note

Campaigns for secret scanning alerts are currently in public preview and are subject to change.

Creating a security campaign

Security campaigns are created and managed from the Security and quality tab for your organization.

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

In addition, you can use the REST API to create and interact with campaigns more efficiently and at scale. For more information, see REST API endpoints for security campaigns.

Create a campaign

  1. On GitHub, navigate to the main page of the organization.
  2. Under your organization name, click the Security and quality tab.
  3. In the left sidebar, click Campaigns.
  4. Click Create campaign , then select one of the following options:
  5. Review the set of alerts to be included in the campaign, and adjust the filters as necessary. Make sure you have chosen 1000 alerts or fewer.
  6. When you are satisfied with the scope of the campaign, click Save as, then choose whether you want to create a draft campaign, or move straight ahead to finalizing the details of the campaign before publishing it:
  7. Optionally, if you have chosen to create a draft campaign, edit, save, and review the details of the campaign:
  8. On the "Publish campaign" page, review or edit the campaign details:
  9. Optionally, for "Code" campaigns, to create a campaign issue in each repository included in the campaign, on the "Publish campaign" page, under "Automations", select the checkbox next to "Create issues for NUMBER repositories in this campaign".
  10. Click Publish campaign.

The security campaign is created and the campaign overview page is displayed.

Did you successfully create a security campaign for your organization?

Yes No

Examples of useful filters

All the template filters use is:open to include only alerts that need to be resolved. For code scanning alerts, they must also be present in the default branch.

Additional default filters for code scanning alerts:

Note

When agentic autofix is enabled for your organization, the autofix filter is unavailable. Adding autofix:supported does not change the results. For alerts in repositories where agentic autofix is enabled, you can use Assign to Copilot for any code scanning alert in a campaign.

For more information about filtering alerts, see Running a security campaign to fix alerts at scale and Filtering alerts in security overview.

Code scanning alert filters

Use autofilter:true with rule:, tag:, or severity: to scope your campaign.

Secret scanning alert filters

In addition to the core filters, you will usually want to add a filter to limit results to a specific provider, secret type, or secrets that bypassed push protection (enterprise accounts only).

Launching a security campaign

When you create a code campaign, all the alerts are automatically submitted to GitHub Copilot Autofix to be processed as capacity allows. This ensures that suggestions for alerts found in pull requests aren't delayed by a new campaign. In most cases, you should find that all suggestions that can be created are ready within an hour. At busy times of day, or for particularly complex alerts, it will take longer.

How developers know a security campaign has started

The new campaign is shown in the sidebar of the Security and quality tab for each repository included.

Tip

You can assign a campaign alert to anyone with write access to the repository. See Assigning alerts.

For more information about the developer experience, see Fixing alerts in a security campaign.

How to increase engagement with the security campaign

The best way to increase engagement with a campaign is to publicize it to the teams you want to collaborate with to remediate alerts. For example, you might work with engineering managers to choose a quieter development period to run a series of security campaigns, each focused on a different type of alert, with associated training sessions. For more ideas, see Running a security campaign to fix alerts at scale.

Editing security campaign details

You can edit the name, description, due date, and manager for a campaign.

  1. On GitHub, navigate to the main page of the organization.
  2. Under your organization name, click the Security and quality tab.
  3. In the left sidebar, click Campaigns.
  4. From the list of campaigns, click the name of the campaign to display the campaign tracking view.
  5. In the campaign title row, click and select Edit campaign.
  6. In the "Edit campaign" dialog make your changes and then click Save changes.

The changes are made immediately.

Closing, reopening and deleting security campaigns

There is a limit of 10 active campaigns. When a campaign is complete, or if you want to pause it, you should close it. You can still view all closed campaigns in the "Closed" campaign list, and you can reopen a closed campaign.

If you don't need to retain the campaign or its data, you can delete it.

Close a campaign

  1. On GitHub, navigate to the main page of the organization.
  2. Under your organization name, click the Security and quality tab.
  3. In the left sidebar, click Campaigns.
  4. To the right of the campaign you want to close, click , then select Close campaign.

Reopen a closed campaign

  1. On GitHub, navigate to the main page of the organization.
  2. Under your organization name, click the Security and quality tab.
  3. In the left sidebar, click Campaigns.
  4. Above the list of campaigns, click Closed to view the list of closed campaigns.
  5. To the right of the campaign you want to reopen, click , then select Reopen campaign.

Delete a campaign

  1. On GitHub, navigate to the main page of the organization.
  2. Under your organization name, click the Security and quality tab.
  3. In the left sidebar, click Campaigns.
  4. To the right of the campaign you want to delete, click , then select Delete campaign.

Next steps