이 문서에서는 Secure Source Manager의 통합 데이터 손실 방지 (DLP)를 사용하여 민감한 정보를 보호하는 방법을 설명합니다.
Secure Source Manager의 DLP는 저장소에 푸시된 모든 커밋을 분석하여 암호화하거나 삭제해야 하는 민감한 정보를 적극적으로 검색하여 코드베이스의 보안을 강화합니다. 이러한 데이터가 감지되면 DLP는 푸시를 자동으로 거부하여 민감한 세부정보가 실수로 병합되지 않도록 합니다.
Secure Source Manager의 DLP는 다음 정보 카테고리를 민감한 정보로 취급합니다.
암호화 키: 여기에는 SSH 공개 키와 같은 항목이 포함됩니다.
AWS 사용자 인증 정보: Amazon Web Services의 액세스 키 및 보안 비밀 키입니다.
GCP 사용자 인증 정보: 서비스 계정 키 및 기타 Google Cloud 보안 비밀입니다.
OAuth 클라이언트 보안 비밀번호: OAuth를 사용하여 애플리케이션을 인증하는 데 사용되는 보안 비밀번호입니다.
Secure Source Manager 인터페이스를 통해 저장소의 DLP를 활성화할 수 있습니다.
DLP를 사용 설정하려는 저장소로 이동합니다.
설정 아이콘을 클릭합니다.
데이터 손실 방지 전환 스위치를 찾습니다.
전환 버튼을 사용으로 슬라이드합니다.
Secure Source Manager에서 DLP 사용
DLP가 사용 설정되면 저장소에 대한 커밋을 적극적으로 모니터링합니다. 커밋에서 민감한 정보가 식별되면 시스템에서 커밋이 병합되지 않도록 하고 사용자에게 민감한 데이터가 있음을 나타내는 오류 메시지가 명령줄 인터페이스에 표시됩니다. 이 시점에서 사용자에게는 두 가지 옵션이 있습니다.
변경사항 되돌리기
민감한 정보를 삭제하려면 다음 명령어를 사용하여 문제가 있는 커밋을 되돌리면 됩니다.
gitreset--softsha1-commit-id
sha1-commit-id를 실제 커밋 ID로 바꿉니다.
Git은 모든 커밋의 기록을 유지하므로 이전 커밋에서 민감한 자료를 복구할 수 있습니다. 이 문제를 방지하려면 git reset --soft 명령어를 사용하세요. 그런 다음 파일을 수정하고 다시 커밋하여 브랜치의 최근 기록에서 데이터를 삭제합니다.
커밋 강제 푸시 (DLP 우회)
감지된 정보가 허용되는 것으로 간주되는 특정 상황에서 적절한 권한이 있는 사용자는 DLP 검사를 우회하고 커밋을 강제 푸시할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Enable data loss prevention\n\nThis document describes how to safeguard your sensitive information with\nintegrated data loss prevention (DLP) in Secure Source Manager.\n\nDLP in Secure Source Manager, enhances the security of your codebase by\nanalyzing every commit pushed to your repositories, actively scanning for\nsensitive information that should be encrypted or removed. If such data is\ndetected, DLP automatically rejects the push, preventing sensitive details from\nbeing inadvertently merged.\n| **Note:** When using DLP, it is recommended that your commit doesn't exceed 100MB.\n\nDLP in Secure Source Manager treats the following categories of information as\nsensitive:\n\n- **Encryption Keys**: This includes items like SSH public keys.\n- **AWS Credentials**: Access keys and secret keys for Amazon Web Services.\n- **GCP Credentials**: Service account keys and other Google Cloud secrets.\n- **OAuth Client Secrets**: Secrets used for application authentication using OAuth.\n- **Secret Keys**: Sensitive keys used for authentication or authorization.\n\nEnable data loss prevention\n---------------------------\n\nEnsure the following roles and settings are enabled for your repository.\n\n### Required roles\n\n\nTo get the permissions that\nyou need to enable Data Loss Prevention,\n\nask your administrator to grant you the\n\n\n[Secure Source Manager Repository Admin](/iam/docs/roles-permissions/securesourcemanager#securesourcemanager.repoAdmin) (`roles/securesourcemanager.repoAdmin`)\nIAM role on the Secure Source Manager instance.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nFor information on granting Secure Source Manager roles,\nsee [Access control with IAM](/secure-source-manager/docs/access-control) and\n[Grant users instance access](/secure-source-manager/docs/grant-users-instance-access).\n\n### Update repository settings\n\nYou can activate DLP for your repositories through the Secure Source Manager\ninterface:\n\n1. Navigate to the repository where you want to enable DLP.\n2. Click the **Settings** icon.\n3. Locate the **Data Loss Prevention** toggle switch.\n4. Slide the toggle to the **On** position.\n\nWorking with DLP in Secure Source Manager\n-----------------------------------------\n\nOnce DLP is enabled, it actively monitors commits to your repository. If any\nsensitive information is identified in a commit, the system prevents the commit\nfrom being merged, and users receive an error message in their command-line\ninterface indicating the presence of sensitive data. At this point, users have\ntwo options:\n\n### Revert the change\n\nTo remove the sensitive information, you can revert the problematic commit using\nthe following command: \n\n git reset --soft \u003cvar label=\"project id\" translate=\"no\"\u003esha1-commit-id\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003esha1-commit-id\u003c/var\u003e with the actual commit ID.\n\nBecause Git retains the history of all commits, sensitive material can still be\nrecovered from previous commits. To avoid this, use the `git reset --soft`\ncommand. Then, correct the files and commit them again to remove the data from\nthe branch's recent history.\n\n### Force-push the commit (bypass DLP)\n\nIn specific situations where the detected information is deemed acceptable,\nusers with appropriate permissions can choose to bypass the DLP check and\nforce-push the commit: \n\n git push -o dlpskip=true origin \u003cvar label=\"branch name\" translate=\"no\"\u003ebranch-name\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003ebranch-name\u003c/var\u003e with the name of the branch you're merging.\n| **Note:** Force-pushing should be used with extreme care, because it can overwrite remote history and bypass important security checks. Ensure you fully understand the implications before using this option.\n\nWhat's next\n-----------\n\n- [Branch protection overview](/secure-source-manager/docs/branch-protection-overview)"]]