> For the complete documentation index, see [llms.txt](https://docs.medcrypt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medcrypt.com/ko/helm/automate-and-integrate/automate-sbom-management-via-github-actions.md).

# GitHub Actions를 통해 SBOM 관리 자동화

Helm을 CI/CD 프로세스에 간편하게 통합하여 제품 및 제품 버전을 생성하고 SBOM을 Helm에 업로드하는 과정을 간소화하고 자동화할 수 있습니다. GitHub Action을 독립적으로 사용하거나 기존 GitHub Action 워크플로에 통합할 수 있으므로, 최소한의 노력으로 제품 구성 요소, 종속성 및 취약점에 관한 포괄적이고 최신인 문서를 유지할 수 있습니다.

## SBOM을 수동으로 유지 관리하는 데 드는 시간과 노력을 절감합니다

설정이 완료되면 연결된 GitHub 리포지토리에 새 SBOM이나 업데이트된 SBOM이 추가될 때, 이벤트 트리거에 따라 Helm이 제품을 자동으로 추가하고 해당 제품 버전의 SBOM을 추가하거나 업데이트합니다.

* **효율성:** SBOM을 유지 관리하는 데 노동력이 많이 드는 프로세스를 자동화하여 팀이 개발에 집중할 수 있도록 합니다.
* **정확성 및 일관성:** 코드베이스의 모든 변경 사항이 SBOM에 반영되도록 합니다.
* **원활한 통합:** 기존 GitHub 워크플로에 자연스럽게 적용되어, 업무에 지장을 주지 않으면서 DevOps 관행을 개선합니다.
* **규정 준수 및 투명성:** 상세하고 최신인 SBOM을 제공하여 규제 요구 사항 준수를 지원하고 이해관계자와의 투명성을 높입니다.

{% hint style="info" %}
**어떤 형식이 지원되나요?**\
현재 CycloneDX JSON만 지원합니다. SPDX 지원이 필요하시면  [알려주세요](mailto:support@medcrypt.com).
{% endhint %}

## **GitHub 리포지토리에서 SBOM 업로드 자동화**

당사의  [GitHub Action](https://github.com/marketplace/actions/medcrypt-helm-sbom-upload) 은 GitHub 리포지토리에서 제품 버전과 해당 SBOM 파일을 생성하고 업로드하는 작업을 자동화하여 SBOM 관리를 간소화합니다.

1. 시작하려면 Helm API 액세스 권한과 API 인증 정보, 그리고 Helm API URL( `api-base-url`).
2. GitHub 리포지토리에서 /workflows 디렉터리를 만듭니다: `.github/workflows`
3. 새 워크플로  `.yml` 파일을  `.github/workflows/` 아래에 만듭니다. 이미 파일이 있다면 jobs: > steps 아래에 해당 단계를 추가합니다.
4. SBOM을 업로드하는 단계를  `jobs` 섹션에 만듭니다.
5. 단계에서 아래 표의 매개변수 또는 각 매개변수에 대한  **Readme** 를 참고하여 필요한 매개변수를 추가할 수 있습니다.
6. 제품이 할당되어 있거나(새 제품을 만드는 경우에는 할당될)  `workspace-name` 을 입력합니다. 이 항목은 선택 사항입니다. 입력하지 않으면 기본 워크스페이스가 사용됩니다.
7. product-name `을 입력하고` 및  `product-version-name`.
8. 제품이 없고 새로 생성하려면  `create-product-if-not-found` 를  `true`.
9. 로 설정합니다. 제품 버전이 없고 새로 생성하려면  `create-version-if-not-found` 를  `true`.
10. 로 설정합니다. `client-id` 및 `client-secret`. 이는 Helm API 자격 증명입니다. `client-id` (API 키를 생성한 사용자의) 이메일 주소이며, `client-secret` 해당 사용자의 API 키입니다.
11. 다음 값을 입력하세요: `sbom-file-path`.
12. 이 작업에서는 현재 다음과 같이 설정합니다: `on` 다음 값으로 `workflow_dispatch`를 사용하면 GitHub UI에서 수동으로 실행할 수 있지만, 다음과 같은 `push`, `pull_request`와 같이 원하는 트리거로 설정하거나 일정에 따라 실행하도록 설정할 수도 있습니다.

{% hint style="success" %}
**Visual Studio Code 편집기를 사용하시나요?**

GitHub Actions 플러그인을 설치하면 매개변수 위에 마우스를 올려 아래 표나 Readme 파일에서 관련 정보를 확인할 수 있습니다.
{% endhint %}

#### YAML 파일에 포함할 매개변수

의 `uses:` 매개변수는 다음과 같이 설정됩니다. `/medcrypt/action-helm-sbom-upload@your_version_branch`

다음 `with:` 매개변수에서 다음 정보를 지정합니다.

<table><thead><tr><th width="207">매개변수</th><th width="227">값</th><th>설명</th></tr></thead><tbody><tr><td>저장소</td><td>'https://helm.environment.medcrypt.co/sub-path/'</td><td>Helm API의 루트 URL이며 Medcrypt에서 제공합니다.</td></tr><tr><td>워크스페이스 이름</td><td>'Workspace name'</td><td>제품이 할당되어 있거나(새 제품을 만드는 경우) 할당될 작업 공간입니다. 이 항목은 선택 사항입니다. 지정하지 않으면 기본 작업 공간이 사용됩니다.</td></tr><tr><td>product-name</td><td>'your product name'</td><td>제품 이름입니다. 따옴표는 선택 사항입니다.</td></tr><tr><td>product-version-name</td><td>'1.0'</td><td>제품 버전입니다. 숫자 값이 잘리지 않도록 따옴표로 묶어야 합니다.</td></tr><tr><td>create-product-if-not-found</td><td>'false'</td><td>Helm에 제품이 없을 경우 제품을 생성할지 여부를 나타냅니다. 기본값은 false입니다. 주의해서 사용하세요.</td></tr><tr><td>create-version-if-not-found</td><td>'false'</td><td>Helm에 제품 또는 버전이 없는 경우 제품 버전을 생성할지 여부를 나타냅니다. 기본값은 false입니다. 주의해서 사용하세요.</td></tr><tr><td>client-id</td><td>${{ secrets.CLIENT_ID }}</td><td>Helm API에 액세스할 수 있는 사용자의 이메일 주소입니다.</td></tr><tr><td>client-secret</td><td>${{ secrets.CLIENT_SECRET }}</td><td>Helm API의 API 키입니다.</td></tr><tr><td>sbom-file-path</td><td>./api_test_sbom.json</td><td>SBOM 파일의 경로입니다. 소스 코드를 체크아웃하거나 아티팩트를 다운로드한 후와 같이 현재 GitHub 작업 공간 내에서 파일이 위치한 경로를 지정해야 합니다.</td></tr></tbody></table>

### *동일한 저장소에서 여러 제품의 SBOM 수집*

작업을 자체 워크플로 파일로 감싼 다음, 다음을 사용하여 재사용 가능한 워크플로를 작성합니다. `on: workflow_call` 를 사용해 해당 워크플로를 호출합니다.

### *서로 다른 저장소에서 여러 제품의 SBOM 수집*

해당 저장소의 yml 파일에 단계를 복사하여 붙여넣기만 하면 됩니다. 원하는 경우, 조직 전체에서 동일하게 사용할 `client-id` 및 `client-secret`등을 저장하는 자체 재사용 가능 작업을 만들 수 있습니다.

### *SBOM 업로드 중 오류가 발생하면 어떻게 되나요?*

오류가 발생하면 작업을 확인하여 오류가 발생한 위치를 파악할 수 있습니다.

### *실수로 잘못된 제품이나 버전을 추가하면 어떻게 되나요?*

UI에서 [제품을 제거하거나](/ko/helm/manage-sbom/managing-products-and-versions-archive-and-removal.md) 또는 [버전을 삭제할 수 있습니다](/ko/helm/manage-sbom/managing-products-and-versions-archive-and-removal.md). 제품을 제거하면 보관 처리되므로 다시 추가할 수 있습니다. 하지만 버전을 삭제하면 해당 버전의 SBOM에 더 이상 액세스할 수 없으며, 다시 추가해야 합니다.

### *구성을 변경하거나 저장소 연결을 해제해야 하면 어떻게 하나요?*

언제든지 이 작업의 사용을 중단하거나 설정을 수정할 수 있습니다. 여기에는 저장소 변경 또는 연결 해제, 이벤트 트리거 변경 등이 포함됩니다.

<br>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.medcrypt.com/ko/helm/automate-and-integrate/automate-sbom-management-via-github-actions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
