# Snyk 로그

## 개요

Panther는 다음을 쿼리하여 Snyk 감사 로그를 가져올 수 있습니다 [Snyk 감사 API](https://docs.snyk.io/snyk-api/reference/audit-logs).

Panther는 다음에 나열된 모든 이벤트를 모니터링합니다 [Snyk 감사 로그 문서](https://docs.snyk.io/snyk-api/reference/audit-logs) 제외하고 `api.access` 이벤트 대신, `api.access` 이벤트보다 각 액션에 대한 더 풍부한 컨텍스트 정보를 포함하고 있으므로 Snyk의 명시적 액션 로그를 사용하는 것이 권장됩니다.

{% hint style="warning" %}
기본적으로 Snyk 로그에는 금고(vault) 및 로그인 자격 증명과 같은 객체에 대한 사람이 읽을 수 있는 값이 포함되어 있지 않습니다. 다음을 [조회 테이블 가이드를 참조하세요](https://docs.panther.com/guides/using-lookup-tables-1password-uuids) 범용 고유 식별자(UUID) 값을 사람이 읽을 수 있는 이름으로 변환하는 방법을 알아보려면.
{% endhint %}

#### 비디오 개요

{% embed url="<https://www.youtube.com/watch?v=IC6pHT2qkE8>" %}

## Snyk 로그를 Panther에 온보딩하는 방법

### 1단계: Snyk에서 API 토큰 생성

Snyk API를 사용하려면 먼저 Snyk에서 API 토큰을 가져와야 합니다. Snyk의 API 사용에 대한 자세한 내용은 다음을 참조하세요 [Snyk 문서: API 인증](https://docs.snyk.io/snyk-api-info/authentication-for-api).

{% hint style="info" %}
또는 감사 로그 액세스 권한이 있는 역할을 가진 서비스 계정을 사용할 수 있습니다. 자세한 내용은 다음을 참조하세요 [Snyk의 서비스 계정 문서](https://docs.snyk.io/enterprise-setup/service-accounts#set-up-a-group-or-organization-level-service-account).
{% endhint %}

1. 다음에 로그인하세요 [귀하의 Snyk 계정](https://app.snyk.io/account).
2. 로 이동합니다 **계정 설정 > 일반.**
3. 다음 항목을 찾으세요: **API 토큰** 섹션. 다음에서 **키** 필드 아래에서 **표시하려면 클릭**그런 다음 해당 필드의 값을 선택하고 복사합니다. 다음 단계에서 필요하므로 안전한 장소에 보관하세요.\
   ![In Snyk, the API Token section is displayed. There is a field labeled "Key," and inside the field there is text that says "Click to show." On the right, there is a red button labeled "Revoke and Regenerate."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-6f642406c2530ebe9b9daab7b0f0728adac92fe2%2Fimage%20\(12\)%20\(1\)%20\(1\)%20\(2\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

### 2단계: Panther에서 새 Snyk 로그 소스 생성

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **로그 소스**.
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **새로 만들기.**
3. “Synk”를 검색한 다음 해당 타일을 클릭하세요.
4. 슬라이드 아웃 패널에서 클릭하세요 **설정 시작**.
5. 다음 화면에서 소스에 대한 설명 이름을 입력합니다. 예: `내 Snyk 로그`.
6. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **Panther 콘솔에서 필드에 값을 입력하세요:**
7. 페이지에서 **자격증명 설정** 페이지에서 양식을 작성하세요:
   * **조직 ID**: Snyk 조직 ID를 입력하세요.
   * **API 토큰**: Snyk 계정의 API 토큰을 입력하세요.
8. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **설정**. 성공 화면으로 이동됩니다:\\

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e55cedf82c6a6adc66ec5c14ebdcb164c3b1dcca%2FScreenshot%202023-08-03%20at%204.33.30%20PM.png?alt=media" alt="The success screen reads, &#x22;Everything looks good! Panther will now automatically pull &#x26; process logs from your account&#x22;" width="281"><figcaption></figcaption></figure>

   * 성공 화면으로 이동됩니다: [선택적으로 하나 이상의](https://docs.panther.com/detections/panther-managed/packs).
   * 사용자를 사용할 것이며, **가 활성화될 수 있습니다** "이벤트가 처리되지 않을 때 알러트를 트리거" **설정의 기본값은**. 로그 소스에서 일정 기간 동안 데이터 흐름이 중단되면 알림을 받으므로 이 옵션을 활성화 상태로 두는 것을 권장합니다. 시간 범위는 구성 가능하며 기본값은 24시간입니다.\\

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-c48119abd559990173004bde99ff4907fdd2ded2%2FScreenshot%202023-08-03%20at%204.26.54%20PM.png?alt=media" alt="The &#x22;Trigger an alert when no events are processed&#x22; toggle is set to YES. The &#x22;How long should Panther wait before it sends you an alert that no events have been processed&#x22; setting is set to 1 Day" width="320"><figcaption></figcaption></figure>

## 지원되는 로그 유형

### Snyk.GroupAudit

Snyk.GroupAudit 항목 사용법. 참고: <https://docs.snyk.io/snyk-api/reference/audit-logs>

```yaml
스키마: Snyk.GroupAudit
설명: 그룹의 감사 로그입니다.
참조URL: https://docs.snyk.io/snyk-api/reference/audit-logs
필드:
  - 이름: groupId
    설명: 그룹 id
    type: string
  - 이름: orgId
    설명: 조직 id
    type: string
  - name: userId
    설명: 사용자 id
    type: string
    지표:
      - actor_id
  - 이름: projectId
    설명: 프로젝트 id
    type: string
  - name: event
    required: true
    설명: 이벤트 유형
    type: string
  - 이름: created
    required: true
    설명: rfc3339 표준 형식의 이벤트 날짜 및 시간
    type: timestamp
    timeFormats:
      - rfc3339
    isEventTime: true
  - 이름: content
    설명: 이벤트와 관련된 내용
    유형: json
```

### Snyk.OrgAudit

Snyk.OrgAudit 항목 사용법. 참고: <https://docs.snyk.io/snyk-api/reference/audit-logs>

```yaml
스키마: Snyk.OrgAudit
설명: 조직의 감사 로그입니다.
참조URL: https://docs.snyk.io/snyk-api/reference/audit-logs
필드:
  - 이름: groupId
    설명: 그룹 id
    type: string
  - 이름: orgId
    설명: 조직 id
    type: string
  - name: userId
    설명: 사용자 id
    type: string
    지표:
      - actor_id
  - 이름: projectId
    설명: 프로젝트 id
    type: string
  - name: event
    required: true
    설명: 이벤트 유형
    type: string
  - 이름: created
    required: true
    설명: rfc3339 표준 형식의 이벤트 날짜 및 시간
    type: timestamp
    timeFormats:
      - rfc3339
    isEventTime: true
  - 이름: content
    설명: 이벤트와 관련된 내용
    유형: json
```
