0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Kiro - Command approval and security

0
Posted at

Command approval and security

Kiroに任せて、いちいち確認せずにコマンドが自動的実行されることは便利です。
その一方で、知らないうちに意図しないコマンドが実行されると危ない事態に陥る可能性もあります。

そのため、Trusted CommandsとCommand Denylistの両方を設定すべきです。

Trusted Commands

  • use prefix matching to automatically approve commands that start with specific patterns.
    image.png

Command Denylist

  • uses substring matching - if any denied string appears anywhere in the command, it will require manual approval.

image.png

両方設定される場合の評価Logic

IAM policyの評価Logicと似ています。
Denylistに含まれていれば、明示的なDenyとなり、その時点で自動実行が禁止されます。
Trusted Commandsに含まれていれば、明示的な自動実行許可となります。
どこにも設定されていない場合、defaultで自動実行は禁止されます。

image.png

Geminiに作成してもらった図

上記の評価Logicを図で表したいため、以下のPromptでGeminiに指示しました。

以下のルールに合致するイラスト
Denylist check (highest priority) - If the command contains any denied pattern, manual approval is required
Trust check - If the command matches a trusted pattern, it's auto-approved
Default - If neither applies, manual approval is required

3人がサッカースタジアムに入るとき、身分証明で反社と判明、ticket を持っている, no ticketの3パターン

分かりやすいイラストを作成してくれました。
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?