> 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/detections/rules/derived.md).

# 파생 디택션

## 개요

Panther에서 하나의 기본 디택션으로부터 하나 이상의 파생 디택션을 만들 수 있습니다. 파생 디택션은 변경할 수 없는 기본 디택션의 핵심 로직과, 덮어쓸 수 있는 메타데이터 및 알러트 필드 값을 상속합니다.

디택션 파생은 다음과 같이 생성된 룰에서 사용할 수 있습니다 [Simple 디택션](/ko/detections.md#simple-detections) 또는 [Python 탐지](/ko/detections/rules/python.md).

### 파생 디택션 사용 사례

파생은 다음과 같은 경우 특히 유용합니다:

* 동일한 룰의 여러 복사본을 유지 관리하며, 각각의 메타데이터가 다른 경우
* CLI 워크플로우에서 다음을 사용하고 사용자 지정하며 [Panther가 관리하는 규칙](/ko/detections/panther-managed.md)그리고 Panther가 업데이트를 릴리스할 때 병합 충돌을 해결해야 하는 상황을 피하고 싶은 경우
  * 전체 예제 보기: [병합 충돌을 피하기 위해 파생 디택션 사용](/ko/detections/rules/derived/using-derived-detections-to-avoid-merge-conflicts.md)
* 인시던트에 대응하는 동안 다음 결정을 내리는 데 도움이 되는 텔레메트리를 수집하기 위해 하나의 디택션의 여러 변형을 배포할 수 있기를 원하는 경우
* 팀의 한 구성원(예: 위협 연구 책임자)이 다른 사람들(예: SOC 분석가)이 수정할 수 있는 기본 디택션 세트를 만들고 싶어 하는 경우

## 기본 디택션과 파생 디택션

기본 디택션은 사용자 정의 또는 [Panther에서 관리하는](/ko/detections/panther-managed.md) 파생 디택션이 생성된 룰입니다.

파생 디택션은 기본 디택션에서 생성되며:

* 기본 디택션의 핵심 디택션 로직을 상속합니다
  * 핵심 디택션 로직은 기본 디택션의 `룰()` 함수(Python 디택션의 경우) 또는 `디택션` 필드(Simple 디택션의 경우)입니다.
  * 파생 디택션은 자체 디택션 로직을 지정할 수 없습니다. CLI 워크플로우에서 파생 디택션에 다음이 포함되어 있으면 `디택션` key가 포함되어 있더라도, 그 내용은 무시됩니다.
* 기본 디택션의 메타데이터/알러트 필드 값을 상속하지만, 일부 필드는 덮어쓸 수 있습니다
  * 참조 [디택션 파생의 제한 사항](#limitations-of-detection-derivation) 현재 덮어쓸 수 있는 필드의 전체 목록은
  * 파생 디택션에서 수행한 덮어쓰기는 기본 디택션에서 상속한 필드 값을 완전히 대체합니다. 예를 들어, 기본 디택션과 파생 디택션 모두 다음을 정의하면 [인라인 필터](/ko/detections/rules/inline-filters.md) ( `InlineFilters` key 또는 **이벤트만 포함하도록 필터링** 필드(콘솔에서), 파생 디택션의 인라인 필터만 적용됩니다.
  * 덮어쓰기는 한 방향으로만 가능합니다. 즉, 파생 디택션에서 수행한 덮어쓰기는 기본 디택션 값에 영향을 주지 않습니다. 예를 들어, 기본 디택션이 다음 값을 가지면 `Enabled: False` 그리고 해당 파생 디택션이 다음 값을 가지면 `Enabled: True`, 파생 디택션만 활성화됩니다.

### 기본 디택션이 업데이트되면 어떻게 되는가

기본 디택션의 핵심 로직이 업데이트되면, 변경 사항이 연결된 모든 파생 디택션에 전파됩니다.

기본 디택션의 메타데이터가 업데이트되었을 때, 연결된 파생 디택션이 이미 업데이트된 필드의 값(들)을 덮어쓴 경우에는 변경 사항이 없습니다. 연결된 파생 디택션이 업데이트된 필드의 값(들)을 덮어쓰지 않은 경우에는 메타데이터 업데이트가 파생 디택션으로 전파됩니다.

### 중복 알러트를 방지하려면 기본 디택션을 비활성화하세요

대부분의 경우 기본 디택션과 파생 디택션은 동일한 수신 로그 집합에 대해 실행됩니다(다만 다음을 사용할 수는 있지만 [인라인 필터](/ko/detections/rules/inline-filters.md) 다른 이벤트를 대상으로 지정할 수 있습니다). 이 경우 디택션들이 핵심 로직을 공유하므로 둘 다 활성화되어 있으면 중복 알러트를 생성합니다.

이를 피하려면 기본 디택션을 비활성화하세요. 비활성화된 기본 디택션이 업데이트되더라도 해당 변경 사항은 여전히 파생 디택션으로 전파됩니다 [위에서 설명한 대로](#what-happens-when-a-base-detection-is-updated).

#### CLI 워크플로우에서 기본 디택션을 자동으로 비활성화하기

CLI 워크플로우에서는 기본 디택션을 자동으로 비활성화하는 두 가지 방법이 있습니다:

* **옵션 1(권장)**: 다음 설정을 `.panther_settings.yml` 파일에 추가하세요:

  ```yaml
  auto_disable_base: true
  # ... other settings ...
  ```
* **옵션 2**): 사용 `--auto-disable-base` 과 [Panther Analysis Tool `업로드` 명령](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly).
  * 이 옵션을 사용하는 경우, 다음 사항에 유의하세요 `--auto-disable-base` 이후의 모든 업로드 실행에서 사용해야 합니다. 생략하면 기본 디택션이 다시 활성화됩니다.

{% hint style="warning" %}
하나 이상의 기본 디택션이 이미 활성화된 상태로 Panther 인스턴스에 업로드되어 있고, 이후 위의 방법 중 하나를 사용해 기본 디택션을 자동으로 비활성화하는 경우에는 다음을 포함하지 않도록 하세요 `--filter enabled: true` 다음에 [PAT `업로드` 명령](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly). 그렇게 하면 기본 디택션이 다음보다 먼저 비활성화됩니다 `업로드` (다음이 적용될 때 `enabled: true` 필터가 적용되며), 새로 비활성화된 기본 디택션은 Panther 인스턴스에 다시 업로드되지 않습니다(그대로 유지되거나 활성화된 상태로 남습니다).
{% endhint %}

## 파생 디택션을 만드는 방법

{% tabs %}
{% tab title="Panther Console" %}
**Panther Console에서 파생 디택션 만들기**

1. Panther Console의 왼쪽 탐색 모음에서 **디택션**.
2. 새 파생 디택션의 기본 디택션이 될 디택션을 찾아 이름을 클릭하세요.
3. 오른쪽 상단에서 다음을 클릭합니다: `...`.
4. 다음을 클릭합니다: **파생**:\ <img src="/files/b0bed9c8331eefd327d1dc7bdddb8c2038bb8145" alt="In the Panther Console, the three dots menu on a detection&#x27;s page is open, and the Derive option is circled." data-size="original">
5. 다음에서 **기본 정보** 페이지에서 선택적으로 **이름** 그리고 **ID** 파생 디택션의 필드를 편집하세요.
   * 이름이 기본 디택션의 이름과 구별되도록 하세요.
6. 다음을 클릭합니다: **계속**.
7. 아래로 스크롤하여 **필터** 그리고 **알러트 필드 설정** 섹션에서 InlineFilters와 알러트 필드에 원하는 덮어쓰기를 설정하세요:\
   ![The edit detection page in the Panther Console is shown. A Filter section is visible, along with a Set Alert Fields section. Within the latter are sub-sections for Required Fields and Optional Fields.](/files/27da81e138f3f95043b24b53cc933861c4ca5446)
8. 오른쪽 상단에서 다음을 클릭합니다: **배포**.
   * 해당 디택션에는 `DERIVED` 레이블이 붙습니다:\ <img src="/files/6aa31e34dccc2bcd26e42f318e8b942135b45a39" alt="The word &#x22;DERIVED&#x22; is shown in teal." data-size="original">
     {% endtab %}

{% tab title="CLI 워크플로" %}
**CLI 워크플로우에서 파생 디택션 만들기**

1. 다음을 사용하는 디렉터리에서 [Panther Analysis Tool (PAT)](/ko/panther/detections-repo/pat.md), 파생 디택션용 새 YAML 파일을 만드세요.
2. 이 YAML 파일에 파생 디택션에 필요한 다음 필드를 추가하세요:
   * `Base디택션`: 현재 Panther 인스턴스에 있거나 PAT를 사용해 업로드할 로컬 디렉터리에 있는 모든 룰의 룰 ID를 제공하세요.
     * 해당 `Base디택션` key는 이 파생 디택션과 기본 디택션을 연결하는 링크이며, 상속을 적용해야 함을 나타냅니다.
   * `룰ID`: 앞서 제공한 ID와 다른 값을 `Base디택션` 키.
   * `AnalysisType`: 이것이 다음인지 표시하세요 `룰`, `scheduled_룰`, 또는 `정책`.
     * 현재는 룰만 지원됩니다.
3. 덮어쓰려는 메타데이터 필드와 해당 새 값을 추가하세요.
   * 다음을 참조하세요 [제한 사항](#limitations-of-detection-derivation) 섹션에서 사용할 수 있는 덮어쓰기 필드 목록을 확인하세요.
   * 다음을 사용할 수 있습니다 [여기에 설명된 동적 알러트 필드](/ko/detections/rules/writing-simple-detections.md#dynamic-alert-keys-in-simple-detections).
4. 다음을 사용하여 디택션을 업로드하세요 [`panther_analysis_tool upload`](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly) 명령을 사용합니다.
   * 권장되는 작업은 [기본 디택션을 자동으로 비활성화하는 것입니다](#automatically-disabling-base-detections-in-the-cli-workflow).

**CLI 워크플로우 예제**

아래는 Python 기본 디택션([panther-analysis 저장소의 표준 디택션](https://github.com/panther-labs/panther-analysis/blob/main/rules/auth0_rules/auth0_mfa_policy_enabled.yml)), 그리고 그 아래는 해당 파생 디택션입니다.

```yaml
# 기본 디택션
AnalysisType: 룰
설명: 조직 테넌트에 대해 Auth0 사용자가 MFA 정책을 활성화함.
표시 이름: "Auth0 MFA Policy Enabled"
Enabled: True
파일 이름: auth0_mfa_policy_enabled.py
런북: 이것이 사용자가 유효한 업무상 이유로 수행한 예상된 작업인지 평가하세요. 이 알러트는 최선의 보안 관행에 부합하는 설정 변경을 나타내므로, 후속 조치가 필요하지 않을 수 있습니다.
심각도: Medium
DedupPeriodMinutes: 60
LogTypes:
    - Auth0.Events
룰ID: "Auth0.MFA.Policy.Enabled"
Threshold: 1
테스트:
    - ExpectedResult: True
      Log:
        data:
            client_id: 1HXWWGKk1Zj3JF8GvMrnCSirccDs4qvr
            client_name: ""
            date: "2023-05-16 17:26:16.782000000"
            설명: 다단계 인증 정책을 설정함
            details:
                request:
                    auth:
                        credentials:
                            jti: 0107c849078d8d889af711840197ba7c
                            scopes:
                                - create:actions
                                - create:actions_log_sessions
                                # shortened for brevity
                        strategy: jwt
                        user:
                            email: user.name@yourcompany.io
                            name: User Name
                            user_id: google-oauth2|105261262156475850461
                    body:
                        - all-applications
                    channel: https://manage.auth0.com/
                    ip: 12.12.12.12
                    method: put
                    path: /api/v2/guardian/policies
                    query: {}
                    userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
                response:
                    body:
                        - all-applications
                    statusCode: 200
            ip: 12.12.12.12
            log_id: "90020230515215719063964000000000000001223372037488829643"
            type: sapi
            user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
            user_id: google-oauth2|105261262156475850461
        log_id: "90020230515215719063964000000000000001223372037488829643"
        p_any_ip_addresses:
            - 12.12.12.12
        p_any_usernames:
            - google-oauth2|105261262156475850461
        p_event_time: "2023-05-16 17:26:16.782"
        p_log_type: Auth0.Events
        p_parse_time: "2023-05-16 17:28:28.572"
        p_row_id: 2660c447622fa4c3dbb08f9918979102
        p_schema_version: 0
        p_source_id: b9031579-b2c5-45c2-b15c-632b995a4e36
        p_source_label: 조직 Auth0 테넌트 레이블
      이름: MFA Policy Enabled First
```

```yaml
# 파생 디택션

# 필수 필드
AnalysisType: 룰
룰ID: "Auth0.MFA.Policy.Enabled.Custom.Severity"
Base디택션: "Auth0.MFA.Policy.Enabled"

# 기본 디택션에서 상속한 기본값을 덮어쓰는 필드
표시 이름: "Auth0 MFA Policy Enabled - Severity Critical"
Enabled: True
심각도: Critical
설명: 조직 테넌트에 대해 Auth0 사용자가 MFA 정책을 활성화함 - 심각도가 Critical로 덮어써짐.
```

{% endtab %}
{% endtabs %}

## 모든 파생 디택션을 보는 방법

Panther 인스턴스에서 모든 파생 디택션을 보려면:

1. Panther 콘솔의 왼쪽 탐색 표시줄에서 다음을 클릭합니다: **디택션**.
2. 다음을 클릭합니다: **필터** 아이콘.\
   ![](/files/e93b640635fb883d93b52de9cb48025a24670fcc)
3. 다음의 **디택션 유형** 드롭다운 필드에서 다음을 선택하세요 **파생 룰**.
4. 다음을 클릭합니다: **필터 적용**.

## 디택션 파생의 제한 사항

* 다음에는 파생을 사용할 수 없습니다 [예약 룰](/ko/detections/rules.md) 또는 [정책](/ko/detections/policies.md).
* 파생은 한 단계만 가능합니다. 즉, 파생 디택션은 다시 파생될 수 없습니다 *에서.*
* 콘솔 워크플로우에서는 파생 디택션이 생성될 때 테스트가 상속되지만, 이후 기본 디택션의 테스트가 업데이트되어도 상속되지는 않습니다.
* Python 기본 디택션에서 메타데이터 필드의 값이 Python 함수로 설정되면, 해당 값이 파생 디택션에서 제공된 동일한 정적 덮어쓰기 값보다 우선합니다. 예를 들어, Python [`severity()`](/ko/detections/rules/python.md#severity) 함수가 기본 디택션에 있으면, 그 값이 파생 디택션의 덮어쓰기 값보다 우선합니다 `심각도` CLI 워크플로우의 YAML key 또는 **심각도** 필드(콘솔에서)보다 우선합니다.
  * 메타데이터 값을 설정하는 Python 함수("알러트 함수"라고 함) 전체 목록과, YAML/콘솔에서 어떤 필드를 덮어쓰는지는 다음에서 확인하세요 [Python 디택션의 알러트 함수](/ko/detections/rules/python.md#alert-functions-in-python-detections) 테이블.
  * 이는 *있거나* 다음과 같이 일부 Python 알러트 함수가 설정한 값을 덮어쓸 수 있습니다 [동적 알러트 키](/ko/detections/rules/writing-simple-detections.md#dynamic-alert-keys-in-simple-detections) 파생 디택션에서. 예를 들어, Python 기본 디택션의 값을 덮어쓸 수 있습니다 [`severity()`](/ko/detections/rules/python.md#severity) 파생 디택션에서 다음을 사용하여 함수 값을 덮어쓸 수 있습니다 [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#dynamicseverities) 필드에 붙여넣습니다.
    * [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#dynamicseverities) 덮어쓰기 [`severity()`](/ko/detections/rules/python.md#severity)
    * [`알러트Title`](/ko/detections/rules/writing-simple-detections.md#alerttitle) 덮어쓰기 [`title()`](/ko/detections/rules/python.md#title)
    * [`알러트Context`](/ko/detections/rules/writing-simple-detections.md#alertcontext) 덮어쓰기 [`알러트_context()`](/ko/detections/rules/python.md#alert_context)
    * [`GroupBy`](/ko/detections/rules/writing-simple-detections.md#groupby) 덮어쓰기 [`dedup()`](/ko/detections/rules/python.md#dedup)
* 콘솔 워크플로우에서 파생 디택션을 만들고 있고 기본 디택션이 Python 디택션인 경우, 알러트 필드를 동적으로 설정할 수 없습니다. 정적으로만 설정할 수 있습니다.
  * 이는 *있거나* 기본 디택션이 Simple 디택션인 경우 콘솔 워크플로우에서 알러트 필드를 동적으로 설정할 수 있습니다.
  * 이는 *있거나* CLI 워크플로우에서(다음을 사용하여) 알러트 필드를 동적으로 설정할 수 있습니다 [`알러트Title`](/ko/detections/rules/writing-simple-detections.md#alerttitle), [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#groupby), [`알러트Context`](/ko/detections/rules/writing-simple-detections.md#alertcontext), 그리고 [`GroupBy`](/ko/detections/rules/writing-simple-detections.md#groupby)기본 디택션이 Python 또는 YAML 디택션인지와 관계없이.
* 현재 아래 필드만 덮어쓸 수 있습니다. 이는 CLI 워크플로우에 적용되는 YAML 필드 이름이며, 콘솔에서 대응하는 필드가 있는 경우 해당 콘솔 필드도 덮어쓸 수 있습니다.
  * `활성화`
  * `심각도`
  * `설명`
  * `CreateAlert`
  * `DedupPeriodMinutes`
  * `InlineFilters`
  * `DisplayName`
  * `OnlyUseBaseRiskScore`
  * `OutputIds`
  * `참조`
  * `런북`
  * `SummaryAttributes`
  * `Threshold`
  * `Tags`
  * `Reports`
  * `DynamicSeverities`
  * `알러트Title`
  * `알러트Context`
  * `GroupBy`
  * `Tests`


---

# 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/detections/rules/derived.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.
