본문으로 건너뛰기
Skillpedia
보안40k · #7419

secret-scanning

하는 일

이 도구는 비밀번호나 액세스 키처럼 민감한 정보가 실수로 GitHub 코드에 노출되는 것을 찾아내고 막는 데 도움을 줍니다. 유출을 알려 주고, 비밀 정보가 포함된 푸시를 차단할 수도 있습니다.

사용하는 경우

  • ✓프로젝트의 GitHub 보안을 설정할 때.
  • ✓비밀번호나 키가 실수로 올라갔다고 의심될 때.
  • ✓비밀 정보가 저장소로 전송되지 않도록 막고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/secret-scanning/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/secret-scanning/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 저장소의 푸시 보호를 어떻게 설정하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

GitHub는 코드에서 알려진 비밀 정보 패턴을 검사합니다. 무언가를 찾으면 설정에 따라 알려 주거나 푸시를 차단할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Secret Scanning

This skill provides procedural guidance for configuring GitHub secret scanning — detecting leaked credentials, preventing secret pushes, defining custom patterns, and managing alerts.

When to Use This Skill

Use this skill when the request involves:

  • Enabling or configuring secret scanning for a repository or organization
  • Setting up push protection to block secrets before they reach the repository
  • Defining custom secret patterns with regular expressions
  • Resolving a blocked push from the command line
  • Triaging, dismissing, or remediating secret scanning alerts
  • Configuring delegated bypass for push protection
  • Excluding directories from secret scanning via secret_scanning.yml
  • Understanding alert types (user, partner, push protection)
  • Enabling validity checks or extended metadata checks
  • Scanning local code changes for secrets before committing (via MCP / AI coding agent) — see the Pre-Commit Scanning via AI Coding Agents section below for the recommended plugin

How Secret Scanning Works

Secret scanning automatically detects exposed credentials across:

  • Entire Git history on all branches
  • Issue descriptions, comments, and titles (open and closed)
  • Pull request titles, descriptions, and comments
  • GitHub Discussions titles, descriptions, and comments
  • Wikis and secret gists

Availability

Repository Type Availability
Public repos Automatic, free
Private/internal (org-owned) Requires GitHub Secret Protection on Team/Enterprise Cloud
User-owned Enterprise Cloud with Enterprise Managed Users

Core Workflow — Enable Secret Scanning

Step 1: Enable Secret Protection

  1. Navigate to repository Settings → Advanced Security
  2. Click Enable next to "Secret Protection"
  3. Confirm by clicking Enable Secret Protection

For organizations, use security configurations to enable at scale:

  • Settings → Advanced Security → Global settings → Security configurations

Step 2: Enable Push Protection

Push protection blocks secrets during the push process — before they reach the repository.

  1. Navigate to repository Settings → Advanced Security
  2. Enable "Push protection" under Secret Protection

Push protection blocks secrets in:

  • Command line pushes
  • GitHub UI commits
  • File uploads
  • REST API requests
  • REST API content creation endpoints

Step 3: Configure Exclusions (Optional)

Create .github/secret_scanning.yml to auto-close alerts for specific directories:

paths-ignore:
  - "docs/**"
  - "test/fixtures/**"
  - "**/*.example"

Limits:

  • Maximum 1,000 entries in paths-ignore
  • File must be under 1 MB
  • Excluded paths also skip push protection checks

Best practices:

  • Be as specific as possible with exclusion paths
  • Add comments explaining why each path is excluded
  • Review exclusions periodically — remove stale entries
  • Inform the security team about exclusions

Step 4: Enable Additional Features (Optional)

Non-provider patterns — detect private keys, connection strings, generic API keys:

  • Settings → Advanced Security → enable "Scan for non-provider patterns"

AI-powered generic secret detection — uses Copilot to detect unstructured secrets like passwords:

  • Settings → Advanced Security → enable "Use AI detection"

Validity checks — verify if detected secrets are still active:

  • Settings → Advanced Security → enable "Validity checks"
  • GitHub periodically tests detected credentials against provider APIs
  • Status shown in alert: active, inactive, or unknown

Extended metadata checks — additional context about who owns a secret:

  • Requires validity checks to be enabled first
  • Helps prioritize remediation and identify responsible teams

Core Workflow — Resolve Blocked Pushes

When push protection blocks a push from the command line:

Option A: Remove the Secret

If the secret is in the latest commit:

# Remove the secret from the file
# Then amend the commit
git commit --amend --all
git push

If the secret is in an earlier commit:

# Find the earliest commit containing the secret
git log

# Start interactive rebase before that commit
git rebase -i <COMMIT-ID>~1

# Change 'pick' to 'edit' for the offending commit
# Remove the secret, then:
git add .
git commit --amend
git rebase --continue
git push

Option B: Bypass Push Protection

  1. Visit the URL returned in the push error message (as the same user)

…

자주 묻는 질문

'비밀 정보(secrets)'란 무엇인가요?

비밀번호, API 키, 토큰, 인증서처럼 공개되거나 코드에 노출되어서는 안 되는 민감한 정보입니다.

비밀 정보가 발견되면 어떻게 되나요?

설정에 따라 알림을 받거나, 비밀 정보를 지우거나 처리할 때까지 코드 푸시가 차단될 수 있습니다.

특정 파일이나 폴더를 무시할 수 있나요?

네, 비밀 정보가 정당하게 있고 검사할 필요가 없는 특정 경로를 무시하도록 GitHub를 설정할 수 있습니다.

상세 정보

작성자의 원본 설명

Guide for configuring and managing GitHub secret scanning, push protection, custom patterns, and secret alert remediation. For pre-commit secret scanning in AI coding agents via the GitHub MCP Server, this skill references the Advanced Security plugin (`advanced-security@copilot-plugins`). Use this skill when enabling secret scanning, setting up push protection, defining custom patterns, triaging

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7419
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬