Harness Engineering book ←

実践ガイド · Harness Engineering

AIエージェント・セキュリティチェックリスト:本番前のHarness Engineering 10項目

AIコーディングエージェントにshell、repository、cloud、deployの権限を与える前に、モデルを囲むシステムを検証してください。3,171件の公開リポジトリを調べた研究では、構成済みsetupの16.0%に確認済みのセキュリティ欠陥がありました。

自律型エージェントを囲む10個のセキュリティ検査がサプライチェーン攻撃を遮断する編集用イラスト
Original editorial illustration · September 10, 2026

Evidence classification: 確認済み:調査対象は構成ファイルであり、runtime侵害ではありません。未確認:資格情報の流出や全対象の悪用。分析:以下の対策は測定結果を本番のthreat modelへ拡張したものです。

What the study measured

2,660 setupのうち、MCP未固定9.8%、限定的に見える任意実行権限3.1%、shellを事前承認するskill 3.8%でした。重複を除く合計は16.0%。資格情報流出経路は確認されていません。

3,171repositories
16.0%security defect
9.8%unpinned MCP
3.8%skill pre-approved shell

The 10 production checks

  1. 01

    MCP依存関係を固定

    Test: version、digest、lockfileのないlauncherを拒否。

    Evidence: The study confirmed unpinned MCP packages in 9.8% of 2,660 assembled setups.

  2. 02

    権限patternを展開

    Test: patternが許す実際の実行を確認。

    Evidence: 3.1% of setups carried an arbitrary-execution grant disguised as a narrower permission.

  3. 03

    skillを実行依存として扱う

    Test: 指示、script、出所、commitを監査。

    Evidence: 3.8% of setups and 3.7% of skill collections contained a skill that pre-approved shell access.

  4. 04

    意図と権限を分離

    Test: modelは提案し、決定論的policyが許可。

    Evidence: A prompt is advisory. The harness and tool layer decide what can actually execute.

  5. 05

    影響範囲をsandbox化

    Test: 隔離workspace、短期credential、allowlistを使用。

    Evidence: Installed harness components run with developer privileges unless the execution environment narrows them.

  6. 06

    承認を正確な副作用に固定

    Test: command、宛先、payloadの変更で承認を無効化。

    Evidence: Broad approvals convert a one-time human decision into reusable authority.

  7. 07

    memoryとsecretを分離

    Test: 不要なsecretやmemoryを継承しない。

    Evidence: Composition creates paths that no individual configuration file reveals.

  8. 08

    提案・判断・結果を記録

    Test: policy、承認、tool応答、diffを保存。

    Evidence: Auditing configuration alone cannot prove what the runtime later executed.

  9. 09

    retryを冪等かつ可逆に

    Test: idempotency key、checkpoint、rollbackを使用。

    Evidence: Recovery can repeat an already completed side effect when state is ambiguous.

  10. 10

    CIでharness全体を検査

    Test: context、skill、hook、MCP、subagentを一括検査。

    Evidence: 16.0% of studied setups had at least one confirmed security defect; raw scanner output overestimated risk, so findings need validation.

Threat path: from installation to side effect

Marketplace artifact
Harness configuration
Agent context
Tool authority
External side effect

A secure harness places independent checks between every step. Reviewing the model alone cannot detect a package that changes later, a skill that carries shell permission, or an approval that authorizes more than the user saw.

Primary evidence and reproducibility

FAQ

このチェックリストとは?

エージェントを囲むharnessの10個の検証可能なgateです。

なぜMCPを固定するのですか?

将来の実行で別のcodeが取得されるのを防ぐためです。

skillは文書だけですか?

いいえ。権限を持つエージェントの実行につながります。

安全を保証しますか?

いいえ。red team、監視、incident responseも必要です。