> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality.md).

# PR ゲート概要

Aikido の CI ゲートは、機能ブランチが本番に到達する前にスキャンします。これにより、新たに導入された問題をブロックし、どの既存の問題をそのブランチが解決しているかを確認できます。オープンソース依存関係（SCA）、IaC、シークレット、SAST、マルウェア、ライセンスリスク、コード品質の問題を対象とします。

## 概要

Aikido には 2 つのゲートモードがあります：

* **PR ゲート：** 主にネイティブ統合（GitHub、GitLab、Bitbucket、Azure）で処理されます。ブランチの差分をスキャンします。
* **リリースゲート：** Aikido CLI で処理されます。デプロイ前に最終ビルドがクリーンであることを保証します。

## 設定オプション

ゲートは 2 通りの方法で設定できます：

1. **Aikido インターフェース：** 次の 1 クリック設定を使用してください： [GitHub](/docs/docs-ja/pr-torirsunogtingu/github-ci-pr-gating-via-aikido-dashboard.md), [GitLab](/docs/docs-ja/pr-torirsunogtingu/gitlab-mr-gating.md), [Bitbucket](/docs/docs-ja/pr-torirsunogtingu/bitbucket-pr-gating.md)、そして [Azure](/docs/docs-ja/pr-torirsunogtingu/azure-pipelines-ci-pr-gating-via-aikido-dashboard-with-a-personal-access-token.md)。この設定は Aikido インターフェース内で完全に管理され、全体像を把握しやすく、 **CI 分を消費しません。**
2. **CI パイプライン：** 自分たちの環境で設定を管理したいチーム向けです。次を使用できます： [Bitbucket Pipes](/docs/docs-ja/pr-torirsunogtingu/bitbucket-pr-gating/bitbucket-pipes-setting-up-gating-for-pull-requests-via-code.md) をネイティブに、または [Aikido CLI](https://help.aikido.dev/~/revisions/SGhJfnCIOpxRjx1gC1k5/pr-and-release-gating/cli-for-pr-and-release-gating) 、あるいは当社の [公開 CI API](https://help.aikido.dev/en/articles/8711075-aikido-ci-api).

## CI ゲートの設定

Aikido でゲートを設定すると、何が失敗を引き起こすかを細かく制御できます。これらの設定は次へ移動すると見つかります： **連携 > PR 品質ゲート > \[あなたの設定]**.

ここから次のことができます：

* **デフォルトを設定：** ワークスペースに追加されるすべての新しいリポジトリのデフォルトゲート設定を定義します。参照： [新しく追加されたリポジトリの自動設定](/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality/default-pr-mr-gating-configuration-for-new-repositories.md).
* **一括編集：** 複数のリポジトリを選択して、プロジェクト全体に設定変更を適用できます。
* **きめ細かな制御：** 個々のリポジトリの設定を調整して、特定のプロジェクト要件に対応します。
* **詳細設定：** Aikido がワークフローとどう連携するかを微調整します。

<div data-with-frame="true"><figure><img src="/files/e0911bd144e4585278efecf45c680b0ed8389b64" alt=""><figcaption></figcaption></figure></div>

### 重大度のしきい値

CI ゲートを失敗させる最小の重大度レベルを選択してください（例： **重大** または **高**).

* このレベル以上で検出された新しい問題は、ビルドを失敗させます。
* このしきい値未満の問題は引き続き報告されますが、マージはブロックされません。

<div data-with-frame="true"><figure><img src="/files/b2dcc221055611746bd8ced1c5b915fb6e6b3987" alt=""><figcaption></figcaption></figure></div>

### 実行するスキャン

CI ゲートで特定のスキャン種類をオン/オフに切り替えます。これにより、ワークフローに最も関連するセキュリティカテゴリに集中できます。

<div data-with-frame="true"><figure><img src="/files/57a1a9c0d9960112865fe38e618533a5e8766f9a" alt=""><figcaption></figcaption></figure></div>

### 高度な設定

開発速度を維持するために、Aikido がワークフローとどう連携するかを細かく調整します：

* **PR チェックを常に成功にする：** マージを実際にはブロックせずにセキュリティの可視性を得るために使用します。Aikido はフルスキャンを実行しますが、git プロバイダーには常に「Success」ステータスを報告します。初期の「可視化フェーズ」にあるチームに最適です。
* **ドラフト Pull Request でチェックを無効にする：** 作業中のコードで不要な通知を出さないようにします。スキャンは PR が「Ready for Review」に移動した時点でのみ実行されます。
* **制限する `@AikidoSec` コマンドを Aikido ユーザーに：** Aikido ワークスペースのメンバーのみが、PR または MR コメントからアクションを実行できます（例： `@AikidoSec ignore`）。他のユーザーからのコメントは返信付きで拒否されます。

<div data-with-frame="true"><figure><img src="/files/946fc69368a23cf6162f7481ce05b37f8027a7c0" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**制限する `@AikidoSec` Aikido ユーザー向けのコマンド** は GitHub と GitLab で利用できます。Bitbucket と Azure DevOps のサポートは近日対応予定です。
{% endhint %}

## **結果を確認する**

CI 実行後、Aikido はその特定のブランチのスキャン結果への直接リンクを提供します。Aikido はリポジトリ全体ではなくブランチの差分をスキャンするため、次の違いを明確に区別します： **修正済みの問題** および **新たに導入されたリスク**.

* **ブランチで修正済み：** PR が既存の脆弱性を解消すると、Aikido はフィード上でそれを「PR open」と表示し、マージ前に修正を確認できるようにします。
* **新しい問題：** ブランチで導入されたもののうち、重大度のしきい値を超えるものはすべて失敗を引き起こします（「Always Green」が有効な場合を除く）。

<div data-with-frame="true"><figure><img src="/files/93aafda08d1fd7e4ee9f17b3b5e5d6f382b38adb" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><img src="/files/97939866cefc2a34fdeca2b7efb973ecb0f9123b" alt="未解決の重要なセキュリティ問題を、未完了タスク付きで一覧表示する表。"></div>

### 失敗状態を回避する <a href="#bypassing-a-failed-state" id="bypassing-a-failed-state"></a>

失敗状態を回避したい場合は、CI ゲートの失敗原因となった問題を無視することで可能です。問題をクリックし、右上で次の操作を行います： **アクションメニュー** 「Ignore」または「Snooze」を選択します。すると、この問題は今後の CI のどのブランチでも無視/スヌーズされます。

{% hint style="info" %}
問題をスヌーズまたは無視する権限を持つユーザーのみが CI ゲートをバイパスできます。
{% endhint %}


---

# 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://help.aikido.dev/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality.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.
