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
110
3
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
eBPF 簡介 2026 版
shunghsiyu
0
170
今から始めるAWS環境の暗号移行 - ポスト量子時代に備える
sato4mi
0
150
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
170
Building Audio Plugin Ecosystem for Android in 2026
atsushieno
2
140
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
170
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
170
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
140
Flutter Webを「SDK」として配る — 50以上のゲームを支える埋め込みアーキテクチャ
masayukisuda
0
180
渡米前の準備を制す!re:Invent 2026徹底準備術 / The Ultimate Preparation Guide for re:Invent 2026
yuj1osm
1
530
200人の配信コメント、 全部Jevが仕分けます 〜 マサカリガードを作ってみた 〜
katayamatg
1
530
WireGuard for Apache NuttX - Bringing Secure Remote Access to embedded Devices -
aki310ooooo
0
140
AIに任せられるFlutterコードベースを作る 〜仕様をコードで表し、ハーネスで守る〜
myohei
1
630
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
A Soul's Torment
seathinner
8
3.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
780
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Making Projects Easy
brettharned
120
6.8k
Done Done
chrislema
187
17k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
560
Scaling GitHub
holman
464
140k
It's Worth the Effort
3n
188
29k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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ハーネスの修正は③相当。履歴の正当性は渡す側で担保
おすすめ : 会話履歴は受け取らず、アプリ側で保持
まとめ
まとめ : エージェント、作るならバリデーションしよう! • サボると、ツール不正実行のリスク • 仕様に応じて、不正な入力を拒否すべし • 「会話履歴はアプリ側で保持、文字列以外は拒否」がおすすめ