> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/panther/detections-repo/setup.md).

# Panther 콘텐츠 저장소 설정

## 새로운 Panther 콘텐츠 저장소 만들기

### 사전 요구 사항

* Panther Analysis Tool (PAT)를 설치했습니다.

### 1단계: Panther 저장소 준비

* 빈 디렉터리에서 다음을 실행하세요. `git init` Git 저장소를 초기화한 다음 다음을 실행하세요. `pat init`.

나중의 PAT 명령을 위해 저장소를 준비합니다.

해당 `init` 명령은 빈 저장소를 초기화하고 최신 콘텐츠를 `panther-analysis` 캐시로 가져옵니다.

### 2단계(선택 사항): 다음의 콘텐츠 살펴보기 `panther-analysis`

* 다음을 실행하세요. `pat explore`.

### 3단계: panther-analysis의 콘텐츠 사용 설정

panther-analysis의 콘텐츠, 예를 들어 디택션을 사용 설정하려면 다음을 실행하세요. `pat install` , 하나 이상의 콘텐츠 항목을 전달합니다. 예:

* `pat install <id>`
* `pat install --filter LogTypes=AWS.CloudTrail`

### 4단계: 새 콘텐츠가 테스트를 통과하는지 확인

* 다음을 실행하세요. `pat test`.

### 5단계: 콘텐츠를 Panther에 업로드

* 다음을 실행하세요. `pat upload`.

## 기존 저장소에서 마이그레이션하기

{% hint style="info" %}
기존 Panther 콘텐츠 저장소가 [다음에서 포크되었거나 복제되었다면 `panther-analysis`](/ko/panther/detections-repo/setup/deprecated.md)아래 단계를 따라 새 관리 워크플로로 마이그레이션하세요.
{% endhint %}

### 1단계: Panther 저장소 준비

* Panther 콘텐츠 디렉터리에서 다음을 실행하세요. `pat init`.

### 2단계: 기존 콘텐츠 서식 지정

YAML 파일에 대해 특정 서식 변경이 필요합니다(예: 중첩된 JSON 구간에서 중괄호와 대괄호를 제거하는 것, 예를 들어 디택션 단위 테스트). 이러한 변경을 하려면:

* 다음을 실행하세요. `pat fmt`.

{% hint style="warning" %}
이 단계에서 변경 사항을 커밋하는 것이 좋습니다. 왜냐하면 `pat fmt` 많은 서식 변경이 생성되어 검토하기 번거로울 수 있기 때문입니다.
{% endhint %}

### 3단계: 기존 콘텐츠 업데이트

panther-analysis 콘텐츠를 기반으로 하는 모든 분석 항목에 다음을 추가하여 마이그레이션하세요. `BaseVersion` 필드를 추가하고 최신 panther-analysis 버전과 병합하세요. 저장소가 여전히 다음에서 포크된 상태라면 `panther-analysis` 마이그레이션 후에도 다른 PAT 명령이 깨지지는 않지만, upstream에서 동기화하지 않는 것을 권장합니다. `panther-analysis` 마이그레이션 후에는 그런 작업을 하는 자동화는 제거해야 합니다.

* 다음을 실행하세요. `pat migrate`.

{% hint style="info" %}
참고로 `pat migrate` 새로운 것을 가져오지 않습니다 `panther-analysis` 콘텐츠만 마이그레이션합니다.
{% endhint %}

### 4단계: 검토 `migration_status.md` 개별 병합 충돌을 해결하세요

1. 다음을 실행하세요. `less migration_status.md`.
2. (선택 사항) 만약 `migration_status.md` 해결되지 않은 병합 충돌이 있음을 나타낸다면, 충돌이 있는 각 항목에 대해 다음을 실행하세요. `pat migrate <ID>` 해결하세요.
   * 선택적으로 다음을 사용할 수 있습니다. `--write-merge-conflicts` PAT가 대신 병합 충돌을 파일에 쓰도록 지시할 수 있습니다. 이는 AI를 사용해 충돌을 해결하거나 다음을 사용할 때 유용할 수 있습니다. `--auto-accept` 자동 해결하는 경우.

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>이 단계는 선택 사항입니다. 다음 단계로 진행하기 전에(즉, 충돌을 생성한 콘텐츠를 테스트하고 업로드하기 전에) 병합 충돌을 해결할 필요는 없기 때문입니다. <em>이 아니라</em> 병합 충돌을 생성함.</p></div>
   * YAML 파일의 충돌을 해결하려면 PAT CLI 편집기를 사용합니다.
     * Python 파일의 충돌을 해결하려면 PAT CLI 편집기 또는 원하는 코드 편집기를 사용할 수 있습니다. 원하는 코드 편집기(예: `code` (VS Code), `Cursor`, `폴란드`, `GoLand` (Go), `PyCharm`), 다음 중 하나를 사용합니다:
       * 사용합니다 `--editor` 와 `pat migrate`
       * 다음을 설정하세요 `EDITOR` 환경 변수

{% hint style="info" %}
새 콘텐츠를 사용 설정하기 전에, 이 단계에서도 커밋하는 것이 좋습니다.
{% endhint %}

### 5단계(선택 사항): 다음의 최신 콘텐츠 살펴보기 `panther-analysis`

* 다음을 실행하세요. `pat explore`.

### 6단계(선택 사항): 다음의 새 콘텐츠 사용 설정 `panther-analysis`

panther-analysis의 콘텐츠, 예를 들어 디택션을 사용 설정하려면 다음을 실행하세요. `pat install` , 하나 이상의 콘텐츠 항목을 전달합니다. 다음을 실행할 필요는 없습니다. `migrate` 지금까지 한 번도 사용한 적 없는 콘텐츠를 설치하려고 이 명령을 실행할 필요는 없습니다. 예:

* `pat install <id>`
* `pat install --filter LogTypes=AWS.CloudTrail`

### 7단계: 콘텐츠가 테스트를 통과하는지 확인

* 다음을 실행하세요. `pat test`.

### 8단계: 콘텐츠를 Panther에 업로드

* 다음을 실행하세요. `pat upload`.

### 9단계: 사용하지 않는 항목 제거 `panther-analysis` content

더 이상 사용되지 않는 관리 워크플로에서는 사용 설정 여부와 관계없이 panther-analysis의 모든 콘텐츠를 가져왔습니다. 업데이트된 워크플로에서는 실제로 사용하는 콘텐츠만 유지하면 됩니다.

이 단계에서는 환경에서 사용되지 않는 콘텐츠를 제거할 수 있습니다. 콘텐츠를 제거할 때 다음을 실행하여 `pat test` 종속성이 제거되지 않았는지 자주 검증하세요. 디택션 콘텐츠는 종종 전역 헬퍼와 데이터 모델에 의존하기 때문입니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/panther/detections-repo/setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
