1
0
mirror of synced 2025-12-25 02:17:36 -05:00
Files
docs/content/code-security/getting-started/securing-your-repository.md
Lucas Costi cde40f4847 [DO NOT MERGE] GitHub Enterprise Server 3.2 release candidate (#20666)
* Issue template stuff for creating megabranch

* Fix placeholder YAML

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* Add release candidate banner

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* [GHES 3.2]: Remove final notes about machine man preview (GA) (#20939)

* update search indexes

* update search indexes

* Add GHES versioning to "Managing your theme settings" (#20950)

* update search indexes

* [GHES 3.2]: Fix versioning for security alerts (#20761)

* made a start

* rework

* move image to an enterprise 3.1 folder

* forgot to commit

* simplify reusable

* update search indexes

* update search indexes

* update search indexes

* Updated basic 3.2 REST fiels after package change

These will be overwritten before release by the new description files when the 3.2 description is properly published

* update search indexes

* GHAE feature flag for `security alerts` custom notification option (#20979)

* made a start

* rework

* move image to an enterprise 3.1 folder

* forgot to commit

* simplify reusable

* add GHAE feature flag

* remove spurious spaces I had added

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* Update versioning (#21121)

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>

* update search indexes

* Add the new service (#21060)

* update search indexes

* update search indexes

* update search indexes

* Fix parent category index versioning for security overview

* update search indexes

* [GHES 3.2] Add documentation for GHES Referrer Policy Admin setting (#20910)

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: Jules Parker <19994093+jules-p@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>

* update search indexes

* update search indexes

* Update "Review hardware considerations" table (#21208)

Performance improvements resulted in higher maximum job throughput and the new benchmarks need to be shared with current and potential customers.

* update search indexes

* Version new GHES 3.2 Actions tested performance (#21212)

* update search indexes

* Update "Review hardware considerations" table v2

Feedback from additional reviewers requires an update to the benchmarks previously merged.

* update search indexes

* update search indexes

* [GHES 3.2] - Dependency Graph: Simplified enablement in GHES (GA) (#21078)

* document UI button for dependency graph GHES 3.2

* update search indexes

* Update getting-started-with-github-actions-for-github-enterprise-server.md

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* [GHES 3.2] Release candidate 1 release notes (#20799)

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: bwestover <bwestover@github.com>
Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Grey Baker <greysteil@github.com>
Co-authored-by: Bas van Schaik <5082246+sj@users.noreply.github.com>
Co-authored-by: William Bartholomew <iamwillbar@github.com>

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* update search indexes

* Update OpenAPI Descriptions for GHES 3.2 (#21377)

Also contains a rollup of other unmerged OpenAPI changes

Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* update search indexes

Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: GitHub Actions <action@github.com>
Co-authored-by: Docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Matthias Wenz <matthiaswenz@github.com>
Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: Jules Parker <19994093+jules-p@users.noreply.github.com>
Co-authored-by: Steve-Glass <84886334+Steve-Glass@users.noreply.github.com>
Co-authored-by: Meg Bird <megbird@github.com>
Co-authored-by: bwestover <bwestover@github.com>
Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Grey Baker <greysteil@github.com>
Co-authored-by: Bas van Schaik <5082246+sj@users.noreply.github.com>
Co-authored-by: William Bartholomew <iamwillbar@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
2021-09-09 08:56:20 -07:00

9.6 KiB

title, intro, permissions, redirect_from, versions, type, topics, shortTitle
title intro permissions redirect_from versions type topics shortTitle
Securing your repository You can use a number of {% data variables.product.prodname_dotcom %} features to help keep your repository secure. Repository administrators and organization owners can configure repository security settings.
/github/administering-a-repository/about-securing-your-repository
/github/code-security/getting-started/about-securing-your-repository
fpt ghes ghae
* >=3.0 *
how_to
Repositories
Dependencies
Vulnerabilities
Advanced Security
Secure your repository

Introduction

This guide shows you how to configure security features for a repository. You must be a repository administrator or organization owner to configure security settings for a repository.

Your security needs are unique to your repository, so you may not need to enable every feature for your repository. For more information, see "{% data variables.product.prodname_dotcom %} security features."

Some security features are only available {% ifversion fpt %}for public repositories, and for private repositories owned by organizations with {% else %}if you have {% endif %}an {% data variables.product.prodname_advanced_security %} license. {% data reusables.advanced-security.more-info-ghas %}

Managing access to your repository

The first step to securing a repository is to set up who can see and modify your code. For more information, see "Managing repository settings."

From the main page of your repository, click {% octicon "gear" aria-label="The Settings gear" %}Settings, then scroll down to the "Danger Zone."

{% ifversion fpt or ghes > 3.0 or ghae-next %}

Setting a security policy

  1. From the main page of your repository, click {% octicon "shield" aria-label="The shield symbol" %} Security.
  2. Click Security policy.
  3. Click Start setup.
  4. Add information about supported versions of your project and how to report vulnerabilities.

For more information, see "Adding a security policy to your repository."

{% endif %}

{% ifversion fpt or ghes > 2.22 %}

Managing the dependency graph

Once you have enabled the dependency graph, it is automatically generated for {% ifversion fpt or ghes > 2.22 %} all public repositories, and you can choose to enable it for private repositories.{% else %} all repositories.{% endif %}

  1. From the main page of your repository, click {% octicon "gear" aria-label="The Settings gear" %} Settings.
  2. Click Security & analysis.
  3. Next to Dependency graph, click Enable or Disable.

For more information, see "Exploring the dependencies of a repository."

{% endif %}

{% ifversion fpt or ghes > 2.22 %}

Managing {% data variables.product.prodname_dependabot_alerts %}

By default, {% data variables.product.prodname_dotcom %} detects vulnerabilities in public repositories and generates {% data variables.product.prodname_dependabot_alerts %}. {% data variables.product.prodname_dependabot_alerts %} can also be enabled for private repositories.

  1. Click your profile photo, then click Settings.
  2. Click Security & analysis.
  3. Click Enable all next to {% data variables.product.prodname_dependabot_alerts %}.

For more information, see "About alerts for vulnerable dependencies{% ifversion fpt %}" and "Managing security and analysis settings for your user account{% endif %}."

{% endif %}

{% ifversion fpt or ghes > 3.1 %}

Managing dependency review

Dependency review lets you visualize dependency changes in pull requests before they are merged into your repository. Dependency review is available in all public repositories and in repositories owned by organizations with an {% data variables.product.prodname_advanced_security %} license that have the dependency graph enabled. For more information, see "About dependency review."

{% endif %}

{% ifversion fpt %}

Managing {% data variables.product.prodname_dependabot_security_updates %}

For any repository that uses {% data variables.product.prodname_dependabot_alerts %}, you can enable {% data variables.product.prodname_dependabot_security_updates %} to raise pull requests with security updates when vulnerabilities are detected.

  1. From the main page of your repository, click {% octicon "gear" aria-label="The Settings gear" %}Settings.
  2. Click Security & analysis.
  3. Next to {% data variables.product.prodname_dependabot_security_updates %}, click Enable.

For more information, see "About {% data variables.product.prodname_dependabot_security_updates %}" and "Configuring {% data variables.product.prodname_dependabot_security_updates %}."

Managing {% data variables.product.prodname_dependabot_version_updates %}

You can enable {% data variables.product.prodname_dependabot %} to automatically raise pull requests to keep your dependencies up-to-date. For more information, see "About {% data variables.product.prodname_dependabot_version_updates %}."

To enable {% data variables.product.prodname_dependabot_version_updates %}, you must create a dependabot.yml configuration file. For more information, see "Enabling and disabling version updates."

{% endif %}

{% ifversion fpt or ghes > 2.22 or ghae %}

Configuring {% data variables.product.prodname_code_scanning %}

{% data variables.product.prodname_code_scanning_capc %} is available {% ifversion fpt %}for all public repositories, and for private repositories owned by organizations with {% else %} for organization-owned repositories if you have {% endif %}an {% data variables.product.prodname_advanced_security %} license.

You can set up {% data variables.product.prodname_code_scanning %} to automatically identify vulnerabilities and errors in the code stored in your repository by using a {% data variables.product.prodname_codeql_workflow %} or third-party tool. For more information, see "Setting up {% data variables.product.prodname_code_scanning %} for a repository."

Configuring {% data variables.product.prodname_secret_scanning %}

{% data variables.product.prodname_secret_scanning_caps %} is available {% ifversion fpt %}for all public repositories, and for private repositories owned by organizations with {% else %} for organization-owned repositories if you have {% endif %}an {% data variables.product.prodname_advanced_security %} license.

{% data variables.product.prodname_secret_scanning_caps %} may be enabled for your repository by default depending upon your organization's settings.

  1. From the main page of your repository, click {% octicon "gear" aria-label="The Settings gear" %}Settings.
  2. Click Security & analysis.
  3. If {% data variables.product.prodname_GH_advanced_security %} is not already enabled, click Enable.
  4. Next to {% data variables.product.prodname_secret_scanning_caps %}, click Enable.

{% endif %}

Next steps

You can view and manage alerts from security features to address dependencies and vulnerabilities in your code. For more information, see {% ifversion fpt or ghes > 2.22 %} "Viewing and updating vulnerable dependencies in your repository,"{% endif %} {% ifversion fpt %}"Managing pull requests for dependency updates," {% endif %}"Managing {% data variables.product.prodname_code_scanning %} for your repository," and "Managing alerts from {% data variables.product.prodname_secret_scanning %}."

{% ifversion fpt %}If you have a security vulnerability, you can create a security advisory to privately discuss and fix the vulnerability. For more information, see "About {% data variables.product.prodname_security_advisories %}" and "Creating a security advisory." {% endif %}