> 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) または [Public CI API](https://help.aikido.dev/en/articles/8711075-aikido-ci-api).

## CIゲートの設定

Aikido でゲーティングを設定すると、何が失敗を引き起こすかをきめ細かく制御できます。これらの設定は、 **Integrations > PR Quality Gating > \[Your Setup]**.

に移動すると見つかります。ここから次のことができます:

* **デフォルトを設定:** ワークスペースに追加されたすべての新しいリポジトリに対するデフォルトのゲーティング設定を定義します。詳細は [新しく追加されたリポジトリの自動設定](/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ゲートを失敗させる最小の重大度レベルを選択します（例: **重大** または **高**).

* このレベル以上で検出された新しい問題は、ゲートを失敗させます。
* このしきい値未満の問題は引き続き報告されますが、マージはブロックされません。
* 選択 **常に合格** 有効なスキャンを実行するが、PRチェックは失敗させないようにします。

<div data-with-frame="true"><figure><img src="/files/e8db823a4acbc091b0b6da1562f58985c7462cab" alt="The Always Pass option in a repository&#x27;s PR-gating failure threshold menu."><figcaption></figcaption></figure></div>

### 実行するスキャン

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

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

### 詳細設定

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

* **PRチェックを常にグリーンにする:** Aikido が有効なすべてのスキャン結果を引き続き報告しながら、ワークスペース全体のPRチェックをグリーンに保ちます。これは、設定されたすべてのゲートとリポジトリに適用されます。
* **ドラフトPull Requestでのチェックを無効にする:** 作業中のコードでノイズが出ないようにします。スキャンはPRが「レビュー準備完了」に移動した時点でのみ実行されます。
* **制限 `@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」としてマークし、マージ前に修正を確認できるようにします。
* **新規問題:** ブランチで導入されたもので、重大度しきい値を超えるものは、失敗を引き起こします（ただし **常に合格** が有効である場合を除く）。

<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ゲートを失敗させた問題を無視することで可能です。問題をクリックし、右上の **アクションメニュー** から「無視」または「スヌーズ」を選択します。その後、この問題は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.
