Skip to main content

Working with push protection in the GitHub UI

Learn your options for unblocking your commit when secret scanning detects a secret in your changes.

누가 이 기능을 사용할 수 있나요?

쓰기 권한이 있는 사용자

About push protection in the GitHub UI

When you upload, create, or edit files from the GitHub UI, push protection prevents you from accidentally committing secrets to a repository by blocking commits containing supported secrets.

GitHub will also block the commit if you attempt to upload files containing supported secrets.

참고 항목

웹 UI에서 파일 업로드에 대한 푸시 보호는 현재 공개 미리 보기 버전이며 변경될 수 있습니다.

You should either:

GitHub will only display one detected secret at a time in the web UI. If a particular secret has already been detected in the repository and an alert already exists, GitHub will not block that secret.

Organization owners can provide a custom link that will be displayed when a push is blocked. This custom link can contain resources and advice specific to your organization. For example, the custom link can point to a README file with information about the organization's secret vault, which teams and individuals to escalate questions to, or the organization's approved policy for working with secrets and rewriting commit history.

Resolving a blocked commit

웹 UI를 사용하여 푸시 보호로 안전하게 보호되는 리포지토리에 지원되는 비밀을 커밋하려 하면 GitHub이(가) 해당 커밋을 차단합니다.

비밀의 위치에 대한 정보와 비밀을 푸시할 수 있는 옵션이 포함된 대화 상자가 표시됩니다. 또한 비밀은 파일에서 밑줄로 표시되므로 쉽게 찾을 수 있습니다.

To resolve a blocked commit in the web UI, you need to remove the secret from the file. Once you remove the secret, you will be able to commit your changes.

참고 항목

To learn how to resolved a blocked push on the command line, see Working with push protection from the command line.

Bypassing push protection

If GitHub blocks a secret that you believe is safe to commit, you may be able to bypass the block by specifying a reason for allowing the secret.

비밀을 푸시하도록 허용하면 보안 탭에 경고가 생성됩니다. GitHub은(는) 경고를 닫고 비밀이 가양성이거나 테스트에서만 사용되도록 지정하는 경우 알림을 보내지 않습니다. 비밀이 실제이고 나중에 수정하도록 지정하면 GitHub는 보안 경고를 열어 두고 커밋 작성자와 리포지토리 관리자에게 알림을 보냅니다. 자세한 내용은 비밀 검사에서 경고 관리을(를) 참조하세요.

기여자가 비밀에 대한 푸시 보호 블록을 우회하면 GitHub는 메일 알림을 옵트인한 조직 소유자, 보안 관리자 및 리포지토리 관리자에게 메일 경고를 보냅니다.

  1. In dialog box that appeared when GitHub blocked your commit, review the name and location of the secret.

  2. 비밀을 푸시할 수 있어야 하는 이유를 가장 잘 설명하는 옵션을 선택합니다.

    • 비밀이 테스트에만 사용되고 위협이 되지 않는 경우 테스트에 사용됨을 클릭합니다.

    • 검색된 문자열이 비밀이 아니면 가양성임을 클릭합니다.

    • 비밀이 진짜이지만 나중에 수정하려는 경우 나중에 수정을 클릭합니다.

    참고 항목

    리포지토리에서 비밀 스캔이 사용 설정된 경우, 푸시 보호를 바이패스하는 이유를 지정해야 합니다.

    비밀 스캔을 사용 설정하지 않은 퍼블릭 리포지토리에 대하여 푸시하는 경우에도, 사용자 계정에 기본적으로 ON으로 설정된 사용자에 대한 푸시 보호 덕분에 우발적으로 비밀을 푸시하지 않도록 보호됩니다.

    사용자에 대한 푸시 보호를 사용하면 GitHub가 퍼블릭 리포지토리에 대한 푸시에 지원되는 비밀이 포함된 경우 해당 푸시를 자동으로 차단하지만, 비밀을 허용하는 이유를 지정하지 않아도 되고, GitHub이(가) 경고를 생성하지도 않습니다. 자세한 내용은 Push protection for users을(를) 참조하세요.

  3. Click Allow secret.

If you don't see the option to bypass the block, the repository administrator or organization owner has configured tighter controls around push protection. Instead, you should remove the secret from the commit, or submit a request for "bypass privileges" in order to push the blocked secret. For more information, see Requesting bypass privileges.

Requesting bypass privileges

If your commit has been blocked by push protection, you can request permission to bypass the block. The request is sent to a designated group of reviewers, who will either approve or deny the request.

Requests expire after 7 days.

  1. In dialog box that appeared when GitHub blocked your commit, review the name and location of the secret.
  2. Click Start request. The request will open in a new tab.
  3. "또는 권한 무시 요청"에 설명을 추가합니다. 예를 들어 비밀이 돌려주는 것이 안전하다고 생각하는 이유를 설명하거나 차단을 무시하기 위한 요청의 컨텍스트를 제공할 수 있습니다.
  4. 요청 제출을 클릭합니다.
  5. 메일 알림 요청에 대한 응답을 확인하세요.

요청이 검토되고 나면 결정 내용을 알리는 이메일을 받게 됩니다.

If your request is approved, you can commit the changes containing the secret to the file. You can also commit any future changes that contain the same secret.

If your request is denied, you will need to remove the secret from the file before you can commit your changes.

Further reading