# Public Fork

Panther에서 관리하는 Python 디택션을 귀하의 [CI/CD 워크플로 내에서 활용하는 한 가지 방법은](/ko/panther/detections-repo/ci-cd.md) 의 공개 포크를 만드는 것입니다. [panther-analysis](https://github.com/panther-labs/panther-analysis).

조직이 디택션 콘텐츠를 공개적으로 공유하고자 하거나 콘텐츠를 상위 저장소로 가져오고 싶다면 공개 포크를 권장합니다. [panther-labs/panther-analysis](https://github.com/panther-labs/panther-analysis).

리포지토리의 비공개 클론을 만드는 방법에 대한 정보는 [비공개 클론](/ko/panther/detections-repo/setup/deprecated/private-cloned-repo.md).

{% hint style="info" %}
새로운 [태그가 지정된 릴리스](https://github.com/panther-labs/panther-analysis/releases)가 있을 때 panther-analysis의 상위 변경 사항을 가져오는 것이 좋습니다. 또한 [main 브랜치](https://github.com/panther-labs/panther-analysis/tree/main)에서도 가져올 수 있습니다. 다른 어떤 브랜치도 안정적이라고 간주해서는 안 됩니다.
{% endhint %}

## panther-analysis의 공개 포크 구성

이 과정은 `panther-analysis` 리포지토리의 공개 포크를 귀하의 조직에 생성합니다. 이는 `panther-analysis`의 작업 복사본 역할을 하며, 조직에서 필요한 모든 변경 사항은 여기에서 수행할 수 있고, 정의한 구성된 CI 검사를 거치게 됩니다.

참고로 다음을 보세요. [GitHub의 리포지토리 포크에 대한 전체 안내](https://docs.github.com/en/get-started/quickstart/fork-a-repo).

1. GitHub에 로그인한 다음 다음으로 이동하세요. [panther-labs/panther-analysis](https://github.com/panther-labs/panther-analysis).\
   ![The image shows the upper right corner of the panther-analysis repo in Github. There is an arrow pointing to the "Fork" button.](/files/68b454b8baae6caa3f4bb4dacbbafd8e6827f818)
2. 리포지토리 메인 페이지의 오른쪽 상단에서 **Fork**.
3. 에서 **새 포크 만들기** 페이지:
   1. 다음의 선택을 취소하세요. **복사 `develop` 브랜치만** 상자.\
      ![A "Create a new fork" page in GitHub has a few form fields, like "Repository name" and "Copy the develop branch only," which is circled.](/files/03ec24f42da315a36ac808fa48b81244aa6df550)
   2. 을 클릭합니다 **포크 만들기**.
4. 다음으로 이동합니다. **설정** 포크된 리포지토리의 페이지.
5. 내부에서 **기본 브랜치**, 기본 브랜치를 편집하려면 연필 아이콘을 클릭하세요.
   1. 에서 **기본 브랜치를 다른 브랜치로 전환** 팝업 모달에서 `main`.\
      ![A "Switch default branch to another branch" modal is shown, with a dropdown field with a "main" value. There is also an "Update" button.](/files/aaec9c6155370eaf0d1d0c78c7bfc2a00693ad41)
   2. 을 클릭합니다 **업데이트**.
6. (선택 사항) 사용자 지정 디택션을 포크된 버전의 동일한 디렉터리에 압축 해제하세요. `panther-analysis`.

## 공개 포크를 상위 panther-analysis 업데이트와 동기화 유지하기

상위 변경 사항과 동기화를 유지하려면 다음 사용을 권장합니다. [Sync Panther Analysis from Upstream](https://github.com/panther-labs/panther-analysis/blob/main/.github/workflows/sync-from-upstream.yml) GitHub Action은 주기적으로 최신 변경 사항을 포함하여 리포지토리의 기본 브랜치를 대상으로 pull request를 엽니다. `panther-analysis`.

이 Action을 구성하려면:

1. 다음 권한을 가진 GitHub 토큰을 만드세요:
   * `Administration - 읽기`
   * `Contents - 읽기 및 쓰기`
   * `Metadata - 읽기`
   * `Pull Requests - 읽기 및 쓰기`
   * `Workflows - 읽기 및 쓰기`
2. 포크된 리포지토리에서 다음 이름의 새 비밀 변수를 추가하세요. `PANTHER_SYNC_UPSTREAM` 그리고 해당 값을 이전 단계에서 만든 토큰으로 설정하세요.

{% hint style="warning" %}
이 단계를 건너뛰면 상위 리포지토리에 `.github/workflows` 디렉터리 내 변경 사항이 있을 때마다 이 Action은 PR을 열지 못하고 실패합니다.
{% endhint %}

3. Action을 처음 실행하여 포크를 상위 리포지토리와 동기화하려면, GitHub의 리포지토리에서 다음을 클릭하세요. **Actions** > **Sync Panther Analysis from Upstream**.
4. 을 클릭합니다 **Run Workflow > Run workflow.**
   * 작업이 완료되면 워크플로 실행 옆에 녹색 원이 표시됩니다. 변경 사항이 있으면 GitHub Actions가 작성한 새로 열린 pull request를 볼 수 있습니다. 변경 사항이 없으면 “Local repo already synced to latest release.”와 유사한 메시지가 표시됩니다.
   * the **Sync Panther Analysis from Upstream** 이 Action은 매주 화요일 15:00Z에 cron 일정으로 실행되도록 구성되어 있습니다. 이 일정을 다음 파일의 6번째 줄에서 수정할 수 있습니다. `.github/workflows/sync-from-upstream.yml`.
5. 일반적인 pull request처럼 pull request를 기본 브랜치에 병합하세요.

리포지토리는 병합을 최신 변경 사항으로 반영하며, 비공개 리포지토리와 panther-analysis의 git 기록을 모두 볼 수 있습니다.

병합 충돌이 발생하거나 "all jobs have failed,"라는 오류가 표시되면 다음 문제 해결 문서를 참조하세요: [GitHub Action sync-panther-analysis-from-upstream을 사용할 때 병합 충돌과 동기화 실패를 어떻게 해결하나요?](https://help.panther.com/Panther_Developer_Workflows/panther-analysis/How_do_I_resolve_merge_conflicts_and_failed_syncs_when_using_the_GitHub_Action_sync-panther-analysis-from-upstream%3F)

### 수동 업데이트

또는 포크를 수동으로 업데이트할 수 있습니다. 다음을 참조하세요. [GitHub 문서](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 를 통해 이 경우 panther-labs/panther-analysis인 원본에서 포크를 수동으로 업데이트하는 과정에 대해 자세히 알아보세요.

조직에 맞는 변경 사항만 가져오고 있는지 확인하기 위해 이 문서에 자세히 설명된 "compare" 옵션을 항상 사용하는 것이 좋습니다. 이렇게 하면 업데이트가 Pull Request로 표시되며 변경 사항과 댓글을 추가할 수 있습니다.

## 다음 단계

리포지토리를 포크한 후 Panther 디택션을 CI/CD 워크플로에 통합할 수 있습니다. 다음 문서를 참조하세요. [CircleCI](/ko/panther/detections-repo/ci-cd/deployment-workflows/circle-ci.md) Run Panther AI [GitHub Actions](/ko/panther/detections-repo/ci-cd/deployment-workflows/github-actions.md).

### GitHub Actions

Panther 인스턴스에 디택션 콘텐츠를 업로드하는 자체 GitHub Action을 만들 수 있으며, 이 Action은 리포지토리로 병합된 각 pull request마다 자동으로 실행되도록 구성할 수 있습니다.

자세한 내용은 [GitHub Actions를 통한 콘텐츠 관리](/ko/panther/detections-repo/ci-cd/deployment-workflows/github-actions.md) 를 참조하세요.

### 고객 기여 콘텐츠

panther-analysis로 콘텐츠를 다시 상위 저장소에 기여하시기를 권장합니다. 그렇게 하려면 panther-analysis 리포지토리를 대상으로 pull request를 생성하면 Panther의 Threat Research 팀이 이를 검토합니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/ko/panther/detections-repo/setup/deprecated/public-fork.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
