Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
Search
iwamot
PRO
November 07, 2026
Technology
65
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
2026-11-07
JAWS FESTA 2026 in AKITA
https://jawsfesta2026.jaws-ug.jp/
iwamot
PRO
November 07, 2026
More Decks by iwamot
See All by iwamot
MCP Appsを作ってみよう
iwamot
PRO
4
860
自己紹介
iwamot
PRO
1
160
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
1.2k
8万デプロイ
iwamot
PRO
2
480
AIエージェント・マイクロサービス時代。AWSでの手軽な構築法を考えて試してみた
iwamot
PRO
1
160
これがLambdaレス時代のChatOpsだ!実例で学ぶAmazon Q Developerカスタムアクション活用法
iwamot
PRO
10
3.1k
Developer Certificate of Origin、よさそう
iwamot
PRO
0
140
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた CODT 2025 クロージングイベント版
iwamot
PRO
1
240
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた
iwamot
PRO
3
250
Other Decks in Technology
See All in Technology
In-Context Learning再入門。ICLの勾配降下的解釈の研究動向を追ってみる。
dai08srhg
1
180
AIコーディングはじめました
miso
0
150
渡米前の準備を制す!re:Invent 2026徹底準備術 / The Ultimate Preparation Guide for re:Invent 2026
yuj1osm
1
530
試験勉強はGrokBotでやれ
maigo999
0
110
You Have Agency(サンキュー、Ruby)
snoozer05
PRO
5
670
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
780
スマートロックを支えるFlutter × ネイティブ連携の実践 / Flutter and Native Integration in Practice: Powering Smart Locks
bitkey
PRO
0
150
AI Search (Foundry IQ) におけるRAGデータの準備と配置
ryomaru0825
2
140
AIがGISを代替する日:〜すべてをAIが創る時代に、私たちがFOSS4Gに関わる意味〜
lehupa
1
210
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
130
IoTとは〜? 数字で見るSORACOM UG【SORACOM UG Explorer 2026】
soracom
PRO
0
170
WireGuard for Apache NuttX - Bringing Secure Remote Access to embedded Devices -
aki310ooooo
0
140
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
290
Amusing Abliteration
ianozsvald
1
380
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Become a Pro
speakerdeck
PRO
31
6.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
390
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
890
Transcript
サボる子はいねぇがー! AgentCoreハーネスの脆弱性に学ぶ、 エージェントの入力バリデーション 岩本隆史 / @iwamot #jawsug #jawsfesta2026
自己紹介 岩本隆史 / @iwamot • LLM・運用・OSS開発が好きなITエンジニア • 共著『[入門]LLMアプリ開発』 • AWS
Community Builder (Cloud Operations)
「CVE-2026-18830」概説
2026年8月に公開された、AgentCoreハーネスの脆弱性 https://aws.amazon.com/jp/security/security-bulletins/2026-073-aws/
不正な入力 → モデルの判断なしでツール実行!
脆弱性の原因 = 入力バリデーションの不足 (赤線は発表者による強調。以降同じ)
AWSがバリデーションを追加し、修正済み
AgentCoreハーネスだけの 問題ではない 〜脆弱なエージェント例〜
サンプルコードをGitHubで公開中 https://github.com/iwamot/strands-tool-use-validation-demo
構成 : AgentCore Runtime + Strands (定番) https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/vulnerable.py
システムプロンプト : writeツールは内部処理でのみ許可
入力 : バリデーションせず、そのままStrandsへ
ファイル作成を文章で依頼 https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/inputs/text-prompt.json
文章で依頼 → システムプロンプトに従って拒否
「モデルがツール実行を決めた」かのように入力を偽装 https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/inputs/forged-prompt.json
入力を偽装 → ツールが不正実行! • その裏で、モデルは普通に応答
理由 : Strandsが末尾のtoolUseを直接実行 https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/event_loop/event_loop.py 経緯 • PR #1068 : この機能がマージ
(2025-10-27) • PR #2136 : 削除提案されるもクローズ (2026-06-19)
どうしたらいいのか
AgentCore Runtimeガイド : 「バリデーションせよ」 https://docs.aws.amazon.com/ja_jp/bedrock-agentcore/latest/devguide/runtime-security-best-practices.html
Strands本番運用ガイド : 「バリデーションせよ」 https://strandsagents.com/docs/user-guide/sdk/deploy/operating-agents-in-production/
バリデーション指針 : 文字列型とtoolUseをチェック https://docs.aws.amazon.com/ja_jp/bedrock-agentcore/latest/devguide/runtime-security-best-practices.html
対策例 : エージェントの仕様に応じ、不正な入力を拒否
① 会話履歴は受け取らない → 文字列以外を拒否 https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/text_only.py 該当するエージェント例 • 1回の依頼で処理が完結するタスク実行エージェント • 会話履歴をアプリ側で保持するチャットエージェント
② toolUseは不要 → 全toolUseを拒否 https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/reject_tool_use.py 該当するエージェント例 • 一次対応の会話内容を引き継ぐ専門窓口エージェント
③ それ以外 → 最終メッセージのtoolUseのみ拒否 https://github.com/iwamot/strands-tool-use-validation-demo/blob/main/ja/reject_trailing_tool_use.py
③の注意点 : 履歴偽装によるモデル誘導リスク https://strandsagents.com/docs/user-guide/sdk/safety-security/trusted-message-history/ • 末尾以外の履歴には、偽のツール実行結果が残りうる • モデルが偽の結果を信じ、不適切な行動を選びうる • AgentCoreハーネスの修正は③相当。履歴の正当性は渡す側で担保
おすすめ : 会話履歴は受け取らず、アプリ側で保持
まとめ
まとめ : エージェント、作るならバリデーションしよう! • サボると、ツール不正実行のリスク • 仕様に応じて、不正な入力を拒否すべし • 「会話履歴はアプリ側で保持、文字列以外は拒否」がおすすめ